Mixin: Binding

Binding

Binding mixin.
Source:

Methods

bind(parameter, valueopt) → {Binding}

Bind values to query parameters.
Parameters:
Name Type Attributes Description
parameter string | Object parameter name or mapping object
value string <optional>
Source:
Returns:
The query instance.
Type
Binding
Example
// parameter name and value as arguments
const query = collection.find('foo = :foo').bind('foo', 'bar')

// parameter name and value as key-value pair in an object
const query = collection.find('foo = :foo').bind({ foo: 'bar' })