public SQLiteCreateTriggerStatement(bool isTemp, bool ifNotExists, SQLiteObjectName triggerName,
                                     SQLiteTriggerTime triggerTime, SQLiteTriggerEventClause triggerEventClause, SQLiteObjectName table,
                                     bool foreachClause, SQLiteExpression whenExpr)
     : base(triggerName)
 {
     _isTemp             = isTemp;
     _ifNotExists        = ifNotExists;
     _triggerTime        = triggerTime;
     _triggerEventClause = triggerEventClause;
     _table         = table;
     _foreachClause = foreachClause;
     _whenExpr      = whenExpr;
 }
        public override object Clone()
        {
            SQLiteTriggerEventClause triggerEventClause = null;

            if (_triggerEventClause != null)
            {
                triggerEventClause = (SQLiteTriggerEventClause)_triggerEventClause.Clone();
            }
            SQLiteObjectName table = null;

            if (_table != null)
            {
                table = (SQLiteObjectName)_table.Clone();
            }
            SQLiteExpression whenExpr = null;

            if (_whenExpr != null)
            {
                whenExpr = (SQLiteExpression)_whenExpr.Clone();
            }
            List <SQLiteStatement> slist = null;

            if (_slist != null)
            {
                slist = new List <SQLiteStatement>();
                foreach (SQLiteStatement s in _slist)
                {
                    slist.Add((SQLiteStatement)s.Clone());
                }
            }
            SQLiteObjectName name = null;

            if (this.ObjectName != null)
            {
                name = (SQLiteObjectName)this.ObjectName.Clone();
            }

            SQLiteCreateTriggerStatement res = new SQLiteCreateTriggerStatement(name);

            res._foreachClause      = _foreachClause;
            res._ifNotExists        = _ifNotExists;
            res._isTemp             = _isTemp;
            res._slist              = slist;
            res._table              = table;
            res._triggerEventClause = triggerEventClause;
            res._triggerTime        = _triggerTime;
            res._whenExpr           = whenExpr;
            return(res);
        }
        public virtual object Clone()
        {
            List <string> columns = null;

            if (_columns != null)
            {
                columns = new List <string>();
                foreach (string str in _columns)
                {
                    columns.Add(str);
                }
            }

            SQLiteTriggerEventClause res = new SQLiteTriggerEventClause();

            res._triggerEvent = _triggerEvent;
            res._columns      = columns;
            return(res);
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SQLiteTriggerEventClause dst = obj as SQLiteTriggerEventClause;

            if (dst == null)
            {
                return(false);
            }

            if (!RefCompare.CompareList <string>(_columns, dst._columns))
            {
                return(false);
            }
            if (_triggerEvent != dst._triggerEvent)
            {
                return(false);
            }
            return(true);
        }