Predicate constructor
let p1 = new Predicate("CompanyName", "StartsWith", "B");
let query = new EntityQuery("Customers").where(p1);
or
let p2 = new Predicate("Region", FilterQueryOp.Equals, null);
let query = new EntityQuery("Customers").where(p2);
'And's this Predicate with one or more other Predicates and returns a new 'composite' Predicate
let dt = new Date(88, 9, 12);
let p1 = Predicate.create("OrderDate", "ne", dt);
let p2 = Predicate.create("ShipCity", "startsWith", "C");
let p3 = Predicate.create("Freight", ">", 100);
let newPred = p1.and(p2, p3);
or
let preds = [p2, p3];
let newPred = p1.and(preds);
The 'and' method is also used to write "fluent" expressions
let p4 = Predicate.create("ShipCity", "startswith", "F")
.and("Size", "gt", 2000);
Returns the 'negated' version of this Predicate
let p1 = Predicate.create("Freight", "gt", 100);
let not_p1 = p1.not();
This can also be accomplished using the 'static' version of the 'not' method
let p1 = Predicate.create("Freight", "gt", 100);
let not_p1 = Predicate.not(p1);
which would be the same as
let not_p1 = Predicate.create("Freight", "le", 100);
'Or's this Predicate with one or more other Predicates and returns a new 'composite' Predicate
let dt = new Date(88, 9, 12);
let p1 = Predicate.create("OrderDate", "ne", dt);
let p2 = Predicate.create("ShipCity", "startsWith", "C");
let p3 = Predicate.create("Freight", ">", 100);
let newPred = p1.or(p2, p3);
or
let preds = [p2, p3];
let newPred = p1.or(preds);
The 'or' method is also used to write "fluent" expressions
let p4 = Predicate.create("ShipCity", "startswith", "F")
.or("Size", "gt", 2000);
Creates a 'composite' Predicate by 'and'ing a set of specified Predicates together.
let dt = new Date(88, 9, 12);
let p1 = Predicate.create("OrderDate", "ne", dt);
let p2 = Predicate.create("ShipCity", "startsWith", "C");
let p3 = Predicate.create("Freight", ">", 100);
let newPred = Predicate.and(p1, p2, p3);
or
let preds = [p1, p2, p3];
let newPred = Predicate.and(preds);
Same as using the ctor.
// so
let p = Predicate.create(a, b, c);
// is the same as
let p = new Predicate(a, b, c);
Creates a 'composite' Predicate by 'negating' a specified predicate.
let p1 = Predicate.create("Freight", "gt", 100);
let not_p1 = Predicate.not(p1);
This can also be accomplished using the 'instance' version of the 'not' method
let not_p1 = p1.not();
Both of which would be the same as
let not_p1 = Predicate.create("Freight", "le", 100);
Creates a 'composite' Predicate by 'or'ing a set of specified Predicates together.
let dt = new Date(88, 9, 12);
let p1 = Predicate.create("OrderDate", "ne", dt);
let p2 = Predicate.create("ShipCity", "startsWith", "C");
let p3 = Predicate.create("Freight", ">", 100);
let newPred = Predicate.or(p1, p2, p3);
or
let preds = [p1, p2, p3];
let newPred = Predicate.or(preds);
Generated using TypeDoc
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.