Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SQLiteInExpression dst = obj as SQLiteInExpression;

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

            if (_isIn != dst._isIn)
            {
                return(false);
            }

            if (!RefCompare.CompareMany(_expr, dst._expr, _select, dst._select, _table, dst._table))
            {
                return(false);
            }
            if (!RefCompare.CompareList <SQLiteExpression>(_exprlist, dst._exprlist))
            {
                return(false);
            }

            return(base.Equals(obj));
        }
Ejemplo n.º 2
0
        public override object Clone()
        {
            SQLiteExpression expr = null;

            if (_expr != null)
            {
                expr = (SQLiteExpression)_expr.Clone();
            }
            SQLiteSelectStatement select = null;

            if (_select != null)
            {
                select = (SQLiteSelectStatement)_select.Clone();
            }
            SQLiteObjectName table = null;

            if (_table != null)
            {
                table = (SQLiteObjectName)_table.Clone();
            }
            List <SQLiteExpression> exprlist = null;

            if (_exprlist != null)
            {
                exprlist = new List <SQLiteExpression>();
                foreach (SQLiteExpression e in _exprlist)
                {
                    exprlist.Add((SQLiteExpression)e.Clone());
                }
            }

            SQLiteInExpression res = new SQLiteInExpression();

            res._expr     = expr;
            res._exprlist = exprlist;
            res._isIn     = _isIn;
            res._select   = select;
            res._table    = table;
            return(res);
        }