コード例 #1
0
        public SelectStatement(SelectOption option, IDictionary <IExpression, string> selectExprList,
                               TableReferences tables, IExpression where, GroupByFragment group,
                               IExpression having, OrderByFragment order, LimitFragment limit)
        {
            if (option == null)
            {
                throw new ArgumentNullException("option");
            }
            if (selectExprList == null || selectExprList.Count == 0)
            {
                this.SelectExpressionList = new Dictionary <IExpression, string>();
            }
            else
            {
                this.SelectExpressionList = selectExprList;
            }

            this.Table  = tables;
            this.Option = option;
            this.Where  = where;
            this.Order  = order;
            this.Having = having;
            this.Group  = group;
            this.Limit  = limit;
        }
コード例 #2
0
 public DeleteStatement(bool lowPriority, bool quick, bool ignore,
                        Identifier tableName, IExpression where, OrderByFragment orderBy, LimitFragment limit)
 {
     this.LowPriority = lowPriority;
     this.Quick       = quick;
     this.Ignore      = ignore;
     this.TableNames  = new List <Identifier>(1)
     {
         tableName
     };
     this.TableRefs = null;
     this.Where     = where;
     this.OrderBy   = orderBy;
     this.Limit     = limit;
 }
コード例 #3
0
 public UpdateStatement(bool lowPriority, bool quick, bool ignore,
                        IDictionary <Identifier, IExpression> values,
                        TableReferences tableRefs, IExpression where, OrderByFragment orderBy, LimitFragment limit)
 {
     this.LowPriority = lowPriority;
     this.Quick       = quick;
     this.Ignore      = ignore;
     if (values == null || values.Count() == 0)
     {
         throw new ArgumentException("tableNames Can't be NULL");
     }
     this.Values = values;
     if (tableRefs == null)
     {
         throw new ArgumentException("tableRefs Can't be NULL");
     }
     this.TableRefs = tableRefs;
     this.Where     = where;
     this.OrderBy   = orderBy;
     this.Limit     = limit;
 }