lib/query-builder.js
function field() {
  var args = mlutil.asArray.apply(null, arguments);
  switch(args.length) {
  case 0:
    throw new Error('missing field name');
  case 1:
    return new FieldDef(new FieldNameDef(args[0]));
  case 2:
    return new FieldDef(new FieldNameDef(args[0], args[1]));
  default:
    throw new Error('too many arguments for field identifier: '+args.length);
 }
}
function field() {
  var args = mlutil.asArray.apply(null, arguments);
  switch(args.length) {
  case 0:
    throw new Error('missing field name');
  case 1:
    return new FieldDef(new FieldNameDef(args[0]));
  case 2:
    return new FieldDef(new FieldNameDef(args[0], args[1]));
  default:
    throw new Error('too many arguments for field identifier: '+args.length);
 }
}
function field ( ) { var args = mlutil . asArray . apply ( null , arguments ) ; switch ( args . length ) { case 0 : throw new Error ( 'missing field name' ) ; case 1 : return new FieldDef ( new FieldNameDef ( args [ 0 ] ) ) ; case 2 : return new FieldDef ( new FieldNameDef ( args [ 0 ] , args [ 1 ] ) ) ; default : throw new Error ( 'too many arguments for field identifier: ' + args . length ) ; } }
Specifies a field for a query.
@method
@since 1.0
@memberof queryBuilder#
@param {string} name - the name of the field
@param {string} [collation] - the collation of a field over strings
@returns {queryBuilder.IndexedName} an indexed name for specifying a query
Specifies a field for a query .