示例#1
0
        public override object Clone()
        {
            SQLiteExpression left = null;

            if (_left != null)
            {
                left = (SQLiteExpression)_left.Clone();
            }
            SQLiteExpression right = null;

            if (_right != null)
            {
                right = (SQLiteExpression)_right.Clone();
            }

            if (left.GetType().FullName == "SQLiteParser.SQLiteExpression")
            {
                System.Diagnostics.Debugger.Break();
            }

            SQLiteBinaryExpression res = new SQLiteBinaryExpression();

            res._left  = left;
            res._op    = _op;
            res._right = right;
            return(res);
        }
示例#2
0
        public override object Clone()
        {
            SQLiteLikeOperator likeOp = null;

            if (_likeOp != null)
            {
                likeOp = (SQLiteLikeOperator)_likeOp.Clone();
            }
            SQLiteExpression left = null;

            if (_left != null)
            {
                left = (SQLiteExpression)_left.Clone();
            }
            SQLiteExpression right = null;

            if (_right != null)
            {
                right = (SQLiteExpression)_right.Clone();
            }
            SQLiteExpression escape = null;

            if (_escape != null)
            {
                escape = (SQLiteExpression)_escape.Clone();
            }

            SQLiteLikeExpression res = new SQLiteLikeExpression();

            res._likeOp = likeOp;
            res._left   = left;
            res._right  = right;
            res._escape = escape;
            return(res);
        }
 public SQLiteBetweenExpression(SQLiteExpression left, bool between, SQLiteExpression right, SQLiteExpression and)
 {
     _left    = left;
     _between = between;
     _right   = right;
     _and     = and;
 }
        public override object Clone()
        {
            SQLiteExpression caseOperand = null;

            if (_caseOperand != null)
            {
                caseOperand = (SQLiteExpression)_caseOperand.Clone();
            }
            List <SQLiteCaseItem> caseItems = null;

            if (_caseItems != null)
            {
                caseItems = new List <SQLiteCaseItem>();
                foreach (SQLiteCaseItem ci in _caseItems)
                {
                    caseItems.Add((SQLiteCaseItem)ci.Clone());
                }
            }
            SQLiteExpression caseElse = null;

            if (_caseElse != null)
            {
                caseElse = (SQLiteExpression)_caseElse.Clone();
            }

            SQLiteCaseExpression res = new SQLiteCaseExpression();

            res._caseElse    = caseElse;
            res._caseItems   = caseItems;
            res._caseOperand = caseOperand;
            return(res);
        }
        public override object Clone()
        {
            SQLiteExpression left = null;

            if (_left != null)
            {
                left = (SQLiteExpression)_left.Clone();
            }
            SQLiteExpression right = null;

            if (_right != null)
            {
                right = (SQLiteExpression)_right.Clone();
            }
            SQLiteExpression and = null;

            if (_and != null)
            {
                and = (SQLiteExpression)_and.Clone();
            }

            SQLiteBetweenExpression res = new SQLiteBetweenExpression();

            res._and     = and;
            res._between = _between;
            res._left    = left;
            res._right   = right;
            return(res);
        }
        public override object Clone()
        {
            List <SQLiteUpdateItem> setlist = null;

            if (_setlist != null)
            {
                setlist = new List <SQLiteUpdateItem>();
                foreach (SQLiteUpdateItem item in _setlist)
                {
                    setlist.Add((SQLiteUpdateItem)item.Clone());
                }
            }
            SQLiteExpression whereExpr = null;

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

            SQLiteUpdateStatement res = new SQLiteUpdateStatement();

            res._conf      = _conf;
            res._setlist   = setlist;
            res._table     = _table;
            res._whereExpr = whereExpr;
            return(res);
        }
示例#7
0
 public SQLiteLikeExpression(SQLiteExpression left, SQLiteLikeOperator likeOp, SQLiteExpression right, SQLiteExpression escape)
 {
     _left   = left;
     _likeOp = likeOp;
     _right  = right;
     _escape = escape;
 }
示例#8
0
 public SQLiteFromTable(SQLiteFromInternalTable itable, string asName,
                        SQLiteExpression onExpr, List <string> usingOpt)
 {
     _itable   = itable;
     AsName    = asName;
     _onExpr   = onExpr;
     _usingOpt = usingOpt;
 }
 public SQLiteUpdateStatement(SQLiteResolveAction conf, string table,
                              List <SQLiteUpdateItem> setlist, SQLiteExpression whereExpr)
 {
     _conf      = conf;
     TableName  = table;
     _setlist   = setlist;
     _whereExpr = whereExpr;
 }
示例#10
0
 public SQLiteFromTable(SQLiteObjectName table, string asName,
                        SQLiteFromIndexed indexed, SQLiteExpression onExpr, List <string> usingOpt)
 {
     _table    = table;
     AsName    = asName;
     _indexed  = indexed;
     _onExpr   = onExpr;
     _usingOpt = usingOpt;
 }
示例#11
0
 public SQLiteBinaryExpression(SQLiteExpression left, SQLiteOperator op, SQLiteExpression right)
 {
     if (left.GetType().FullName == "SQLiteParser.SQLiteExpression")
     {
         System.Diagnostics.Debugger.Break();
     }
     _left  = left;
     _op    = op;
     _right = right;
 }
 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 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 override object Clone()
        {
            SQLiteExpression expr = null;

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

            SQLiteCheckColumnConstraint res = new SQLiteCheckColumnConstraint(this.ConstraintName);

            res._expr = expr;
            return(res);
        }
        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);
        }
示例#16
0
        public override object Clone()
        {
            SQLiteExpression expr = null;

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

            SQLiteCollateExpression res = new SQLiteCollateExpression();

            res._expr          = expr;
            res._collationName = _collationName;
            return(res);
        }
示例#17
0
        public override object Clone()
        {
            SQLiteExpression whereExpr = null;

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

            SQLiteDeleteStatement res = new SQLiteDeleteStatement();

            res._table     = _table;
            res._whereExpr = whereExpr;
            return(res);
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SQLiteExpression dst = obj as SQLiteExpression;

            if (dst == null)
            {
                return(false);
            }
            return(true);
        }
示例#19
0
        public virtual object Clone()
        {
            SQLiteExpression expr = null;

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

            SQLiteUpdateItem res = new SQLiteUpdateItem();

            res._colname = _colname;
            res._expr    = expr;
            return(res);
        }
        public override object Clone()
        {
            SQLiteExpression expr = null;

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

            SQLiteUnaryExpression res = new SQLiteUnaryExpression();

            res._expr = expr;
            res._op   = _op;
            return(res);
        }
示例#21
0
        public virtual object Clone()
        {
            SQLiteExpression expr = null;

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

            SQLiteSortItem res = new SQLiteSortItem();

            res._expr  = expr;
            res._order = _order;
            return(res);
        }
示例#22
0
        public virtual object Clone()
        {
            SQLiteObjectName t = null;

            if (_table != null)
            {
                t = (SQLiteObjectName)_table.Clone();
            }
            SQLiteFromInternalTable fit = null;

            if (_itable != null)
            {
                fit = (SQLiteFromInternalTable)_itable.Clone();
            }
            SQLiteFromIndexed fi = null;

            if (_indexed != null)
            {
                fi = (SQLiteFromIndexed)_indexed.Clone();
            }
            SQLiteExpression expr = null;

            if (_onExpr != null)
            {
                expr = (SQLiteExpression)_onExpr.Clone();
            }
            List <string> us = null;

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

            SQLiteFromTable res = new SQLiteFromTable();

            res._asName   = _asName;
            res._indexed  = fi;
            res._itable   = fit;
            res._onExpr   = expr;
            res._table    = t;
            res._usingOpt = us;
            return(res);
        }
        public override object Clone()
        {
            SQLiteExpression expr = null;

            if (_expr != null)
            {
                expr = (SQLiteExpression)_expr.Clone();
            }
            SQLiteColumnType type = null;

            if (_type != null)
            {
                type = (SQLiteColumnType)_type.Clone();
            }

            SQLiteCastExpression res = new SQLiteCastExpression();

            res._expr = expr;
            res._type = type;
            return(res);
        }
示例#24
0
        public virtual object Clone()
        {
            SQLiteExpression when = null;

            if (_when != null)
            {
                when = (SQLiteExpression)_when.Clone();
            }
            SQLiteExpression then = null;

            if (_then != null)
            {
                then = (SQLiteExpression)_then.Clone();
            }

            SQLiteCaseItem res = new SQLiteCaseItem();

            res._when = when;
            res._then = then;
            return(res);
        }
        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);
        }
示例#26
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);
        }
        public virtual object Clone()
        {
            SQLiteExpression expr = null;

            if (_expr != null)
            {
                expr = (SQLiteExpression)_expr.Clone();
            }
            SQLiteObjectName tableName = null;

            if (_tableName != null)
            {
                tableName = (SQLiteObjectName)_tableName.Clone();
            }

            SQLiteSelectColumn res = new SQLiteSelectColumn();

            res._expr      = expr;
            res._asName    = _asName;
            res._tableName = tableName;
            return(res);
        }
示例#28
0
        public override object Clone()
        {
            SQLiteTerm term = null;

            if (_term != null)
            {
                term = (SQLiteTerm)_term.Clone();
            }
            SQLiteExpression expr = null;

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

            SQLiteDefaultColumnConstraint res = new SQLiteDefaultColumnConstraint(this.ConstraintName);

            res._expr       = expr;
            res._id         = _id;
            res._minus      = _minus;
            res._term       = term;
            res._withParens = _withParens;
            return(res);
        }
 public SQLiteCastExpression(SQLiteExpression expr, SQLiteColumnType type)
 {
     _expr = expr;
     _type = type;
 }
示例#30
0
 public SQLiteSortItem(SQLiteExpression expr, SQLiteSortOrder order)
 {
     _expr  = expr;
     _order = order;
 }