Mixin: Matching

Matching

Provides object matching algorithm methods.
Source:

Methods

(private, static) _match(source, test, queryOptions, opToApplyopt, optionsopt) → {Boolean}

Internal method that checks a document against a test object.
Parameters:
Name Type Attributes Description
source * The source object or value to test against.
test * The test object or value to test with.
queryOptions Object The options the query was passed with.
opToApply String <optional>
The special operation to apply to the test such as 'and' or an 'or' operator.
options Object <optional>
An object containing options to apply to the operation such as limiting the fields returned etc.
Source:
Returns:
True if the test was positive, false on negative.
Type
Boolean

(private, static) _matchOp(key, source, test, queryOptions, optionsopt) → {*}

Internal method, performs a matching process against a query operator such as $gt or $nin.
Parameters:
Name Type Attributes Description
key String The property name in the test that matches the operator to perform matching against.
source * The source data to match the query against.
test * The query to match the source against.
queryOptions Object The options the query was passed with.
options Object <optional>
An options object.
Source:
Returns:
Type
*