Binding mixin.
Methods
-
bind(parameter [, value])
-
Bind values to query parameters.
Parameters:
Name Type Argument Description parameter
string | Object parameter name or mapping object value
string <optional>
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' })