public override bool Equals(object obj) { if (obj == null) { return(false); } SQLiteCreateTableStatement dst = obj as SQLiteCreateTableStatement; if (dst == null) { return(false); } if (dst.IfNotExists != this.IfNotExists) { return(false); } if (!RefCompare.CompareList <SQLiteColumnStatement>(_columns, dst._columns)) { return(false); } if (!RefCompare.CompareList <SQLiteTableConstraint>(_constraints, dst._constraints)) { return(false); } return(base.Equals(obj)); }
public override object Clone() { List <SQLiteColumnStatement> columns = null; if (_columns != null) { columns = new List <SQLiteColumnStatement>(); foreach (SQLiteColumnStatement cs in _columns) { columns.Add((SQLiteColumnStatement)cs.Clone()); } } List <SQLiteTableConstraint> constraints = null; if (_constraints != null) { constraints = new List <SQLiteTableConstraint>(); foreach (SQLiteTableConstraint tc in _constraints) { constraints.Add((SQLiteTableConstraint)tc.Clone()); } } SQLiteObjectName tableName = null; if (this.ObjectName != null) { tableName = (SQLiteObjectName)this.ObjectName.Clone(); } SQLiteCreateTableStatement res = new SQLiteCreateTableStatement(tableName); res._columns = columns; res._constraints = constraints; res._ifNotExists = _ifNotExists; return(res); }