예제 #1
0
 public insertselect(ddl db, Fields fields, FieldInfo pk_for_auto_newid_seq)
 {
     Top      = 0;
     Distinct = false;
     Tables   = null;
     Joins    = null;
     Where    = null;
     GroupBy  = null;
     Having   = null;
     OrderBy  = null;
     Fields   = new selectlist();
     foreach (Field f in fields)
     {
         if (pk_for_auto_newid_seq != null && f.Name == pk_for_auto_newid_seq.Name) /* [dlatikay 20110729] we can easily auto-increment for the next free integer PK value herein */
         {
             Fields.Add(new selectfield(new selectstatement(
                                            new selectlist()
             {
                 new selectfield(selectfunctiondef.max_inc, f.Name)
             },
                                            new tableexpressions(pk_for_auto_newid_seq.DeclaringType),
                                            null,
                                            null
                                            ), f.Name));
         }
         else
         {
             Fields.Add(new selectparam(db.MakeParamName(f.Name), f.Name, f.Type, f.Size));
         }
     }
 }
예제 #2
0
 public selectstatement(int top, bool distinct, selectlist fields, tableexpressions tables, joinstatements joins, whereclause where)
 {
     Top      = top;
     Distinct = distinct;
     Fields   = fields;
     Tables   = tables;
     Joins    = joins;
     Where    = where;
 }
예제 #3
0
 public selectstatement(int top, bool distinct, selectlist fields, tableexpressions tables, joinstatements joins, whereclause where, groupbystatement group, whereclause having, orderbystatement order)
 {
     Top      = top;
     Distinct = distinct;
     Fields   = fields;
     Tables   = tables;
     Joins    = joins;
     Where    = where;
     GroupBy  = group;
     Having   = having;
     OrderBy  = order;
 }
예제 #4
0
 public selectstatement(selectlist fields, tableexpressions tables, joinstatements joins, whereclause where, groupbystatement group, whereclause having, orderbystatement order)
     : this(0, false, fields, tables, joins, where, group, having, order)
 {
     //Top = 0;
     //Distinct = false;
     //Fields = fields;
     //Tables = tables;
     //Joins = joins;
     //Where = where;
     //GroupBy = group;
     //Having = having;
     //OrderBy = order;
 }
예제 #5
0
 public selectstatement(selectlist fields, tableexpressions tables, joinstatements joins, whereclause where)
     : this(0, false, fields, tables, joins, where, null, null, null)
 {
     //Top = 0;
     //Distinct = false;
     //Fields = fields;
     //Tables = tables;
     //Joins = joins;
     //Where = where;
     //GroupBy = null;
     //Having = null;
     //OrderBy = null;
 }
예제 #6
0
 public plainselect_update(selectlist fields, string table, whereclause where)
 {
     Top      = 0;
     Distinct = false;
     Tables   = new tableexpressions()
     {
         new tableexpression(table)
     };
     Joins   = null;
     Where   = where;
     GroupBy = null;
     Having  = null;
     OrderBy = null;
     Fields  = fields;
 }
예제 #7
0
 public updateselect(ddl db, Fields fields)
 {
     Top      = 0;
     Distinct = false;
     Tables   = null;
     Joins    = null;
     Where    = new whereclause(fields.PKQueryExpression(db));
     GroupBy  = null;
     Having   = null;
     OrderBy  = null;
     Fields   = new selectlist();
     foreach (Field f in fields)
     {
         if (!f.PrimaryKeyConstituent)
         {
             Fields.Add(new selectparam(db.MakeParamName(f.Name), f.Name, f.Type, f.Size));
         }
     }
 }
예제 #8
0
 public plainselect_where(string[] fields, string table, whereclause where)
 {
     Top      = 0;
     Distinct = false;
     Tables   = new tableexpressions()
     {
         new tableexpression(table)
     };
     Joins   = null;
     Where   = where;
     GroupBy = null;
     Having  = null;
     OrderBy = null;
     Fields  = new selectlist();
     foreach (string f in fields)
     {
         Fields.Add(new selectfield(f));
     }
 }
예제 #9
0
 public insertselect(selectlist fields, tableexpressions tables, joinstatements joins, whereclause where)
     : base(fields, tables, joins, where)
 {
 }
예제 #10
0
 public insertselect(selectlist fields, tableexpressions tables, joinstatements joins, whereclause where, groupbystatement group, whereclause having, orderbystatement order)
     : base(fields, tables, joins, where, group, having, order)
 {
 }
예제 #11
0
 public insertselect(int top, bool distinct, selectlist fields, tableexpressions tables, joinstatements joins, whereclause where)
     : base(top, distinct, fields, tables, joins, where)
 {
 }
예제 #12
0
 public insertstatement(string targettable, selectlist targetfields, insertselect source)
 {
     TargetTable  = targettable;
     TargetFields = targetfields;
     Source       = source;
 }
예제 #13
0
 public updatestatement(tableexpression targettable, selectlist targetfields, selectstatement source)
 {
     TargetTable  = targettable;
     TargetFields = targetfields;
     Source       = source;
 }
예제 #14
0
 public updatestatement(string targettablename, selectlist targetfields, selectstatement source)
 {
     TargetTable  = new tableexpression(targettablename);
     TargetFields = targetfields;
     Source       = source;
 }
예제 #15
0
 public insertstatement(Type targettable, selectlist targetfields, unionstatement source)
 {
     TargetTable  = targettable.Name;
     TargetFields = targetfields;
     Source       = source;
 }
예제 #16
0
 public insertselect(int top, bool distinct, selectlist fields, tableexpressions tables, joinstatements joins, whereclause where, groupbystatement group, whereclause having, orderbystatement order)
     : base(top, distinct, fields, tables, joins, where, group, having, order)
 {
 }
예제 #17
0
 public selectlist(selectlist to_be_appended_initially)
 {
     this.AddRange(to_be_appended_initially);
 }