Skip to content

Releases: nova706/PreparedQueryOptions

Version 1.2.2

24 Mar 19:17

Choose a tag to compare

Updated GroupOperator handling

  • Allow case-insensitive matching on 'and' and 'or'
  • Add Predicate.GROUP_OPERATOR.AND and .OR for convenience

Version 1.1.2

16 Nov 23:32

Choose a tag to compare

  • 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

14 Nov 22:10

Choose a tag to compare

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 value

Fixed bugs when creating a predicate from a string.

Version 1.1.0

11 Nov 05:15

Choose a tag to compare

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

11 Nov 02:26

Choose a tag to compare

Version 1.0.3 Pre-release
Pre-release
Updated PreparedQueryOptions Library

Allows Predicates grouped with the 'or' operator