Members
layers :Array.<function()>
Functions that modify the cursor, in order. The functions take one parameter, the cursor, and return nothing.
Type:
- Array.<function()>
- Source:
Methods
apply(cursor) → {mongodb/Cursor}
Apply the builder's layers to a cursor.
Parameters:
Name | Type | Description |
---|---|---|
cursor |
mongodb/Cursor |
- Source:
Returns:
- Type
- mongodb/Cursor
filter(filter)
Add a layer that applies a filter to the cursor.
Parameters:
Name | Type | Description |
---|---|---|
filter |
module:flitter-orm/src/filter/Filter~Filter |
- Source:
limit(to)
Add a layer that limits the cursor.
Parameters:
Name | Type | Description |
---|---|---|
to |
number | max number of records |
- Source:
sort(sorts)
Add a layer that sorts the cursor.
Parameters:
Name | Type | Description |
---|---|---|
sorts |
Array.<string> | array of sorts - e.g. '+field'/'-field'/'field' |
- Source: