/// <summary> /// Creates the first where clause in this DBDeleteQuery using the fields and a series of DBClauses that are evaluated at execution time /// </summary> /// <param name="fld">The field which will be compared to the specified values</param> /// <param name="values">The set of DBClauses to be evaluated and compared</param> /// <returns>Itself so further statements can be chained</returns> public DBDeleteQuery WhereIn(DBField fld, params DBClause[] values) { DBComparison compare = DBComparison.In(fld, values); DBFilterSet fs = DBFilterSet.Where(compare); this._where = fs; this._last = fs; return(this); }
/// <summary> /// Creates the first where clause in this DBDeleteQuery using the fields and a sub select that is evaluated at execution time /// </summary> /// <param name="field">The field which will be compared to the specified values</param> /// <param name="select">The sub select to be evaluated and compared</param> /// <returns>Itself so further statements can be chained</returns> public DBDeleteQuery WhereIn(string field, DBSelectQuery select) { DBField fld = DBField.Field(field); DBSubQuery subsel = DBSubQuery.SubSelect(select); DBComparison compare = DBComparison.In(fld, subsel); DBFilterSet fs = DBFilterSet.Where(compare); this._where = fs; this._last = fs; return(this); }
/// <summary> /// Creates the first where clause in this DBDeleteQuery using the fields and a series of constant values /// </summary> /// <param name="field">The field which will be compared to the psecified values</param> /// <param name="values">The set of values to limit the deletion to</param> /// <returns>Itself so further statements can be chained</returns> public DBDeleteQuery WhereIn(string field, params object[] values) { DBField fld = DBField.Field(field); List <DBClause> items = new List <DBClause>(); if (values != null && values.Length > 0) { foreach (object val in values) { items.Add(DBConst.Const(val)); } } DBComparison compare = DBComparison.In(fld, items.ToArray()); DBFilterSet fs = DBFilterSet.Where(compare); this._where = fs; this._last = fs; return(this); }