Comment on page
Filters applied on a query result AFTER grouping, sorting and slicing.
Once a query returns some results, a post-filter can be applied on them to further restrict the number of matching results that are returned.
The filter expression is applied individually to each item in the result array (these items may be entire groups). Only those items for which the expression evaluates to a truthy value are passed through.
Important: jsep does not support object literals, only array literals. This may be fixed in a fork, maintained by RecallGraph, in the future.
- Property accessors (including method calls)
- Implicit (using implicit
thiscontext per item in a result array; method calls on the
thisobject not accessible with this style)
Some of the core JS operators listed above are actually implemented using extensions in jsep. Additionally, some useful operators that are not part of JS syntax are also supported for convenience.
Apart from the regular operators and member functions that the built-in data types support, it is often handy to be able to invoke
Mathfunctions or methods from the
lodashutility. jsep has been extended to provide access to these functions and some more, using named object literals that represent these modules. The available namespaces are listed below, along with special shortcuts, if any, to access them.
$Math.sin(this['x']) < $Math.cos($Math.PI) * this.y + z
//this['x']: Bracket notation for accessing property 'x' of 'this'.
//this.y: Dot notation for accessing property 'y' of 'this'.
//z: Implicit notation for accessing property 'z' of 'this'.
All methods and properties of the
lodashutility module are available under this namespace. In addition to being referred to by the
$_namespace handle, this is also the default namespace under which methods are searched when they are invoked as standalone functions, without a property dereference. For example:
$_.difference(this.x, y).length < 2
some(x, partialRight($_.lte, 2))
//partialRight is used in place of an anonymous function
// defintion, since such function defs are not supported by
Note that the default namespace is searched only when a function call is made, and not when just referencing the function as a member. In that case, the member will be searched for under the
thiscontext of the current object under iteration of the result array.
This namespace is reserved for some special functions defined by RecallGraph. The supported methods are:
//this[z] (without quotes) is shorthand for this[this.z],
// i.e. an indirect property reference.