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

            SQLiteDefaultColumnConstraint dst = obj as SQLiteDefaultColumnConstraint;

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

            if (_id != dst._id)
            {
                return(false);
            }
            if (_minus != dst._minus)
            {
                return(false);
            }
            if (_withParens != dst._withParens)
            {
                return(false);
            }
            if (!RefCompare.CompareMany(_term, dst._term, _expr, dst._expr))
            {
                return(false);
            }

            return(base.Equals(obj));
        }
 public SQLiteDefaultColumnConstraint GetDefaultConstraint()
 {
     if (_conslist == null)
     {
         return(null);
     }
     for (int i = 0; i < _conslist.Count; i++)
     {
         SQLiteDefaultColumnConstraint dc = _conslist[i] as SQLiteDefaultColumnConstraint;
         if (dc != null)
         {
             return(dc);
         }
     } // for
     return(null);
 }
Example #3
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);
        }