public TableDefInfo GetTableDef() { TableDefInfo queryTableInfo = new TableDefInfo(m_strOwnerName, m_strUsersName, m_strName, m_VersFrom, m_VersDrop); IList <TableFieldDefInfo> queryColumnList = m_QueryTableInfo.SelectMany((t) => (t.m_QueryFields.Select((f) => f.QueryColumnInfo()))).ToList(); foreach (var columnInfo in queryColumnList) { queryTableInfo.FieldAppend(columnInfo); } return(queryTableInfo); }
// Default comparer for Part type. public int CompareTo(TableDefInfo compareDef) { // A null value means that this object is greater. if (compareDef == null) { return(1); } else { return(this.m_strName.CompareTo(compareDef.m_strName)); } }
public TableDefInfo GetSourceInfo() { TableDefInfo defInfo = new TableDefInfo(this.m_strOwnerName, this.m_strUsersName, this.m_strName, this.m_VersFrom, this.m_VersDrop); defInfo.SetTableFields(this.m_TableFields.Select((tbf) => (tbf.GetSourceInfo())).ToList()); defInfo.SetIndexPK(CloneSourceIndex(this.m_PKConstraint)); defInfo.SetIndexAK(CloneSourceIndex(this.m_AKConstraint)); defInfo.SetIndexesNonPK(this.m_TableIndexs.Select((idx) => (idx.GetSourceInfo())).ToList()); defInfo.SetRelations(this.m_TableRelations.Select((rel) => (rel.GetSourceInfo())).ToList()); defInfo.SetFields(this.m_nFields); return(defInfo); }
public CloneTableDefInfo(TableDefInfo defInfo, UInt32 versCreate) { this.m_TableFields = defInfo.TableColumns().Select((tf) => new CloneTableFieldDefInfo(tf)).ToList(); this.m_PKConstraint = CloneIndex(defInfo.IndexPK()); this.m_AKConstraint = CloneIndex(defInfo.IndexAK()); this.m_TableIndexs = defInfo.IndexesNonPK().Select((idx) => new CloneIndexDefInfo(idx)).ToList(); this.m_TableRelations = defInfo.Relations().Select((rel) => new CloneRelationDefInfo(rel)).ToList(); this.m_nFields = defInfo.FieldsCount(); this.m_strOwnerName = defInfo.OwnerName(); this.m_strUsersName = defInfo.UsersName(); this.m_strName = defInfo.TableName(); this.m_VersFrom = defInfo.VersFrom(); this.m_VersDrop = defInfo.VersDrop(); this.m_VersCreate = versCreate; }
public override bool Equals(object obj) { if (obj == null) { return(false); } TableDefInfo objAsDef = obj as TableDefInfo; if (objAsDef == null) { return(false); } else { return(Equals(objAsDef)); } }
public static QueryWhereDefInfo GetQueryWhereDefInfo(string alias, TableDefInfo tableDef) { return(new QueryWhereDefInfo(alias, tableDef)); }