Translate
new set.Translate(clauseType, propertyName)
Localizes a clause's properties within another nested property.
var algebra = new set.Algebra(
new set.Translate("where","$where")
);
algebra.has(
{$where: {complete: true}},
{id: 5, complete: true}
) //-> true
This is useful when filters (which are where
clauses) are
within a nested object.
Parameters
- clause
{String}
:A clause type. One of
'where'
,'order'
,'paginate'
,'id'
. - propertyName
{String|Object}
:The property name which contains the clauses's properties.