public DmlUpdateStatement(bool lowPriority, bool ignore, TableReferences tableRefs, IList<Pair<Identifier, IExpression>> values, IExpression where, OrderBy orderBy, Limit limit) { IsLowPriority = lowPriority; IsIgnore = ignore; if (tableRefs == null) { throw new ArgumentException("argument tableRefs is null for update stmt"); } TableRefs = tableRefs; if (values == null || values.Count <= 0) { Values = new List<Pair<Identifier, IExpression>>(0); } else { if (!(values is List<Pair<Identifier, IExpression>>)) { Values = new List<Pair<Identifier, IExpression>>(values); } else { Values = values; } } Where = where; OrderBy = orderBy; Limit = limit; }
/// <exception cref="System.SqlSyntaxErrorException" /> public DmlSelectStatement(SelectOption option, IList<Pair<IExpression, string>> selectExprList, TableReferences tables, IExpression where, GroupBy group, IExpression having, OrderBy order, Limit limit) { if (option == null) { throw new ArgumentException("argument 'option' is null"); } Option = option; if (selectExprList == null || selectExprList.IsEmpty()) { this.selectExprList = new List<Pair<IExpression, string>>(0); } else { this.selectExprList = EnsureListType(selectExprList); } Tables = tables; Where = where; Group = group; Having = having; Order = order; Limit = limit; }
public ShowBinLogEvent(string logName, IExpression pos, Limit limit) { LogName = logName; Pos = pos; Limit = limit; }
public ShowProfile(IList<ProfileType> types, IExpression forQuery, Limit limit) { if (types == null || types.IsEmpty()) { ProfileTypes = new List<ProfileType>(0); } else if (types is List<ProfileType>) { ProfileTypes = types; } else { ProfileTypes = new List<ProfileType>(types); } ForQuery = forQuery; Limit = limit; }
/// <exception cref="System.SqlSyntaxErrorException" /> public DmlDeleteStatement(bool lowPriority, bool quick, bool ignore, Identifier tableName, IExpression where, OrderBy orderBy, Limit limit) { // ------- single-row delete------------ IsLowPriority = lowPriority; IsQuick = quick; IsIgnore = ignore; tableNames = new List<Identifier>(1); tableNames.Add(tableName); TableRefs = null; WhereCondition = where; OrderBy = orderBy; Limit = limit; }
public virtual DmlSelectUnionStatement SetLimit(Limit limit) { this.limit = limit; return this; }
public ShowErrors(bool count, Limit limit) { IsCount = count; Limit = limit; }
public ShowWarnings(bool count, Limit limit) { IsCount = count; Limit = limit; }
public virtual void Visit(Limit node) { VisitInternal(node.Offset); VisitInternal(node.Size); }