예제 #1
0
 public SqlCommandData(MainQueryParts query)
 {
     this.Query = query;
     Statement = query.BuildSqlString();
     var mainIndex = query.Selects.FindIndex(it => it.QuerySource == query.MainFrom);
     if (mainIndex > 0)
     {
         var main = query.Selects[mainIndex];
         query.Selects.RemoveAt(mainIndex);
         query.Selects.Insert(0, main);
     }
 }
        public SqlGeneratorQueryModelVisitor(MainQueryParts queryParts)
        {
            Contract.Requires(queryParts != null);

            this.QueryParts = queryParts;
        }