Releases: nova706/PreparedQueryOptions
Releases · nova706/PreparedQueryOptions
Version 1.2.2
Version 1.1.2
- Evaluate an object to see if it matches a predicates filter conditions
var testObject = { age: 25 };
var predicate = new Predicate('age').greaterThan(21);
predicate.test(testObject); // Returns true.Version 1.1.1
Get and Clear values stored in PreparedQueryOptions. Passing no value returns the current value. Passing null clears the current value.
options.$top(); // Return the current $top value
options.$top(null); // Clears the current $top valueFixed bugs when creating a predicate from a string.
Version 1.1.0
Added support for creating a predicate from an OData filter string and support for the OData methods: startswith, endswith and substringof.
- Predicate.fromString(filterString): create a predicate from a filter query string.
- predicate.startsWith(value): parses as "startswith(property, 'value'")
- predicate.endsWith(value): parses as "endswith(property, 'value'")
- predicate.contains(value): parses as "substringof('value', property")
Breaking Changes:
The method signature for the Predicate constructor has changed to only use the property. The supplied methods should be called to set the operator and value (equals, notEqualTo, greaterThan...).
new Predicate('age', 'gt', 21);Should now be
new Predicate('age').greaterThan(21);Version 1.0.3
Updated PreparedQueryOptions Library Allows Predicates grouped with the 'or' operator