public CloneQueryDefInfo(QueryDefInfo defInfo, UInt32 versCreate) { this.m_VersFrom = defInfo.VersFrom(); this.m_VersDrop = defInfo.VersDrop(); this.m_strName = defInfo.QueryName(); this.m_QueryTableInfo = defInfo.QueryTableInfo().Select((qt) => (new CloneQueryTableDefInfo(qt, versCreate))).ToList(); this.m_QueryJoinInfo = defInfo.QueryJoinInfo().Select((qj) => (new CloneQueryJoinDefInfo(qj))).ToList(); this.m_TableViewFilters = defInfo.TableViewFilters().Select((tv) => (new CloneQueryWhereDefInfo(tv, versCreate))).ToList(); this.m_QueryEndClauses = defInfo.QueryEndClauses().Select((qe) => (new CloneQueryEndClauses(qe))).ToList(); }
public QueryDefInfo GetTargetInfo() { QueryDefInfo defInfo = new QueryDefInfo(this.m_strOwnerName, this.m_strUsersName, this.m_strName, this.m_VersFrom, this.m_VersDrop); defInfo.SetQueryTableInfo(this.m_QueryTableInfo.Select((qt) => (qt.GetTargetInfo())).ToList()); defInfo.SetQueryJoinInfo(this.m_QueryJoinInfo.Select((qj) => (qj.GetTargetInfo())).ToList()); defInfo.SetTableViewFilters(this.m_TableViewFilters.Select((tv) => (tv.GetTargetInfo())).ToList()); defInfo.SetQueryEndClauses(this.m_QueryEndClauses.Select((ec) => (ec.GetTargetInfo())).ToList()); return(defInfo); }
public object Clone() { QueryDefInfo other = (QueryDefInfo)this.MemberwiseClone(); other.m_VersFrom = this.m_VersFrom; other.m_VersDrop = this.m_VersDrop; other.m_strName = this.m_strName; other.m_QueryTableInfo = this.m_QueryTableInfo.ToList(); other.m_QueryJoinInfo = this.m_QueryJoinInfo.ToList(); other.m_TableViewFilters = this.m_TableViewFilters.ToList(); other.m_QueryEndClauses = this.m_QueryEndClauses.ToList(); return(other); }
public string QueryTableJoinConditions(QueryDefInfo queryInfo, bool bTbJoinConds, bool bFilterConds) { string strFieldNames = ""; QueryTableDefInfo rightTableInfo = queryInfo.QueryTableByAlias(m_strRightAliasName); if (m_bLeftCondition) { QueryTableDefInfo leftTableInfo = queryInfo.QueryTableByAlias(m_strLeftAliasName); strFieldNames += leftTableInfo.TableSourceName(); strFieldNames += " "; } strFieldNames += "INNER JOIN "; strFieldNames += rightTableInfo.TableSourceName(); strFieldNames += " ON "; strFieldNames += QueryFieldJoinConditions(bTbJoinConds, bFilterConds); return(strFieldNames); }