public override bool Equals(object obj) { if (obj == null) { return(false); } SQLiteFromTable dst = obj as SQLiteFromTable; if (dst == null) { return(false); } if (_asName != dst._asName) { return(false); } if (!RefCompare.CompareMany(_table, dst._table, _itable, dst._itable, _indexed, dst._indexed, _onExpr, dst._onExpr)) { return(false); } if (!RefCompare.CompareList <string>(_usingOpt, dst._usingOpt)) { return(false); } return(true); }
public virtual object Clone() { List <object> tlist = null; if (_tables != null) { tlist = new List <object>(); foreach (object obj in _tables) { if (obj is SQLiteFromTable) { SQLiteFromTable ft = (SQLiteFromTable)obj; tlist.Add(ft.Clone()); } else if (obj is SQLiteJoinOperator) { tlist.Add(obj); } } // foreach } SQLiteFromClause res = new SQLiteFromClause(); res._tables = tlist; return(res); }
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); }