public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SQLiteLimitClause dst = obj as SQLiteLimitClause;

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

            if (!RefCompare.Compare(_limit, dst._limit))
            {
                return(false);
            }
            if (!RefCompare.Compare(_offset, dst._offset))
            {
                return(false);
            }

            return(true);
        }
 public SQLiteSingleSelectStatement(SQLiteDistinct distinct, List <SQLiteSelectColumn> columns,
                                    SQLiteFromClause from, SQLiteExpression whereExpr, List <SQLiteExpression> groupBy,
                                    SQLiteExpression having, List <SQLiteSortItem> orderBy, SQLiteLimitClause limit)
 {
     _distinct  = distinct;
     _columns   = columns;
     _from      = from;
     _whereExpr = whereExpr;
     _groupBy   = groupBy;
     _having    = having;
     _orderBy   = orderBy;
     _limit     = limit;
 }
        public virtual object Clone()
        {
            SQLiteExpression limit = null;

            if (_limit != null)
            {
                limit = (SQLiteExpression)_limit.Clone();
            }
            SQLiteExpression offset = null;

            if (_offset != null)
            {
                offset = (SQLiteExpression)_offset.Clone();
            }

            SQLiteLimitClause res = new SQLiteLimitClause();

            res._limit  = limit;
            res._offset = offset;
            return(res);
        }
        public override object Clone()
        {
            SQLiteFromClause from = null;

            if (_from != null)
            {
                from = (SQLiteFromClause)_from.Clone();
            }
            SQLiteExpression whereExpr = null;

            if (_whereExpr != null)
            {
                whereExpr = (SQLiteExpression)_whereExpr.Clone();
            }
            SQLiteExpression having = null;

            if (_having != null)
            {
                having = (SQLiteExpression)_having.Clone();
            }
            SQLiteLimitClause limit = null;

            if (_limit != null)
            {
                limit = (SQLiteLimitClause)_limit.Clone();
            }
            List <SQLiteSelectColumn> columns = null;

            if (_columns != null)
            {
                columns = new List <SQLiteSelectColumn>();
                foreach (SQLiteSelectColumn c in _columns)
                {
                    columns.Add((SQLiteSelectColumn)c.Clone());
                }
            }
            List <SQLiteExpression> groupBy = null;

            if (_groupBy != null)
            {
                groupBy = new List <SQLiteExpression>();
                foreach (SQLiteExpression e in _groupBy)
                {
                    groupBy.Add((SQLiteExpression)e.Clone());
                }
            }
            List <SQLiteSortItem> orderBy = null;

            if (_orderBy != null)
            {
                orderBy = new List <SQLiteSortItem>();
                foreach (SQLiteSortItem i in _orderBy)
                {
                    orderBy.Add((SQLiteSortItem)i.Clone());
                }
            }

            SQLiteSingleSelectStatement res = new SQLiteSingleSelectStatement();

            res._distinct  = _distinct;
            res._from      = from;
            res._whereExpr = whereExpr;
            res._having    = having;
            res._limit     = limit;
            res._columns   = columns;
            res._groupBy   = groupBy;
            res._orderBy   = orderBy;
            return(res);
        }