build/breeze.debug.js
function () {
      // empty ctor is used by all subclasses.
      if (arguments.length === 0) return;
      if (arguments.length === 1) {
        // 3 possibilities:
        //      Predicate(aPredicate)
        //      Predicate([ aPredicate ])
        //      Predicate(["freight", ">", 100"])
        //      Predicate( "freight gt 100" }  // passthru ( i.e. maybe an odata string)
        //      Predicate( { freight: { ">": 100 } })
        var arg = arguments[0];
        if (Array.isArray(arg)) {
          if (arg.length === 1) {
            // recurse
            return Predicate(arg[0]);
          } else {
            return createPredicateFromArray(arg);
          }
        } else if (arg instanceof Predicate) {
          return arg;
        } else if (typeof arg == 'string') {
          return new PassthruPredicate(arg);
        } else {
          return createPredicateFromObject(arg);
        }
      } else {
        // 2 possibilities
        //      Predicate("freight", ">", 100");
        //      Predicate("orders", "any", "freight",  ">", 950);
        return createPredicateFromArray(Array.prototype.slice.call(arguments, 0));
      }
    }
function () {
      // empty ctor is used by all subclasses.
      if (arguments.length === 0) return;
      if (arguments.length === 1) {
        // 3 possibilities:
        //      Predicate(aPredicate)
        //      Predicate([ aPredicate ])
        //      Predicate(["freight", ">", 100"])
        //      Predicate( "freight gt 100" }  // passthru ( i.e. maybe an odata string)
        //      Predicate( { freight: { ">": 100 } })
        var arg = arguments[0];
        if (Array.isArray(arg)) {
          if (arg.length === 1) {
            // recurse
            return Predicate(arg[0]);
          } else {
            return createPredicateFromArray(arg);
          }
        } else if (arg instanceof Predicate) {
          return arg;
        } else if (typeof arg == 'string') {
          return new PassthruPredicate(arg);
        } else {
          return createPredicateFromObject(arg);
        }
      } else {
        // 2 possibilities
        //      Predicate("freight", ">", 100");
        //      Predicate("orders", "any", "freight",  ">", 950);
        return createPredicateFromArray(Array.prototype.slice.call(arguments, 0));
      }
    }
function ( ) { // empty ctor is used by all subclasses. if ( arguments . length === 0 ) return ; if ( arguments . length === 1 ) { // 3 possibilities: //      Predicate(aPredicate) //      Predicate([ aPredicate ]) //      Predicate(["freight", ">", 100"]) //      Predicate( "freight gt 100" }  // passthru ( i.e. maybe an odata string) //      Predicate( { freight: { ">": 100 } }) var arg = arguments [ 0 ] ; if ( Array . isArray ( arg ) ) { if ( arg . length === 1 ) { // recurse return Predicate ( arg [ 0 ] ) ; } else { return createPredicateFromArray ( arg ) ; } } else if ( arg instanceof Predicate ) { return arg ; } else if ( typeof arg == 'string' ) { return new PassthruPredicate ( arg ) ; } else { return createPredicateFromObject ( arg ) ; } } else { // 2 possibilities //      Predicate("freight", ">", 100"); //      Predicate("orders", "any", "freight",  ">", 950); return createPredicateFromArray ( Array . prototype . slice . call ( arguments , 0 ) ) ; } }
Used to define a 'where' predicate for an EntityQuery.  Predicates are immutable, which means that any
method that would modify a Predicate actually returns a new Predicate.
@class Predicate
 
Predicate constructor
@example
var p1 = new Predicate("CompanyName", "StartsWith", "B");
var query = new EntityQuery("Customers").where(p1);
or
@example
var p2 = new Predicate("Region", FilterQueryOp.Equals, null);
var query = new EntityQuery("Customers").where(p2);
@method <ctor> Predicate
@param property {String} A property name, a nested property name or an expression involving a property name.
@param operator {FilterQueryOp|String}
@param value {Object} - This will be treated as either a property expression or a literal depending on context.  In general,
if the value can be interpreted as a property expression it will be, otherwise it will be treated as a literal.
In most cases this works well, but you can also force the interpretation by making the value argument itself an object with a 'value'
property and an 'isLiteral' property set to either true or false.  Breeze also tries to infer the dataType of any
literal based on context, if this fails you can force this inference by making the value argument an object with a
'value' property and a 'dataType' property set to one of the breeze.DataType enumeration instances.
Used to define a where predicate for an EntityQuery . Predicates are immutable which means that any method that would modify a Predicate actually returns a new Predicate .