Beispiel #1
0
        /// <summary>
        /// Begins a new SELECT statement with a set of fields as the result
        /// </summary>
        /// <param name="fields">The name of the fields to select</param>
        /// <returns>A new DBSelectQuery to support statement chaining</returns>
        public static DBSelectQuery SelectFields(params string[] fields)
        {
            DBSelectSet   sel   = DBSelectSet.SelectFields(fields);
            DBSelectQuery query = new DBSelectQuery();

            query.SelectSet = sel;
            query.Last      = sel;

            return(query);
        }
 /// <summary>
 /// Specify a range of columns (as an array or comma separated list) to be set when performing this insert
 /// </summary>
 /// <param name="fields">The fields to set</param>
 /// <returns>Itself so that statements can be chained</returns>
 public DBInsertQuery Fields(params string[] fields)
 {
     if (_fields == null)
     {
         _last = _fields = DBSelectSet.SelectFields(fields);
     }
     else
     {
         foreach (string fld in fields)
         {
             _last = _fields.And(fld);
         }
     }
     return(this);
 }