예제 #1
0
        public override object Clone()
        {
            SQLiteTerm term = null;

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

            SQLiteTermExpression res = new SQLiteTermExpression();

            res._term = term;
            return(res);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SQLiteTerm dst = obj as SQLiteTerm;

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

            if (_str != dst._str)
            {
                return(false);
            }
            if (_number != dst._number)
            {
                return(false);
            }
            if (_time != dst._time)
            {
                return(false);
            }
            if (_blob == null && dst._blob != null ||
                _blob != null && dst._blob == null)
            {
                return(false);
            }
            if (_blob == null && dst._blob == null)
            {
                return(true);
            }
            if (_blob.Length != dst._blob.Length)
            {
                return(false);
            }
            for (int i = 0; i < _blob.Length; i++)
            {
                if (_blob[i] != dst._blob[i])
                {
                    return(false);
                }
            }

            return(true);
        }
예제 #3
0
        public virtual object Clone()
        {
            SQLiteTerm res = new SQLiteTerm();

            res._str    = this._str;
            res._number = this._number;
            res._time   = this._time;
            if (_blob != null)
            {
                res._blob = new byte[_blob.Length];
                for (int i = 0; i < _blob.Length; i++)
                {
                    res._blob[i] = _blob[i];
                }
            }
            return(res);
        }
예제 #4
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);
        }
예제 #5
0
 public SQLiteDefaultColumnConstraint(string name, bool minus, SQLiteTerm term)
     : base(name)
 {
     this._minus = minus;
     this.Term   = term;
 }
예제 #6
0
 public SQLiteTermExpression(SQLiteTerm term)
 {
     _term = term;
 }