new FireFerret(options){FireFerret}
client.js, line 26
| Name | Type | Description |
|---|---|---|
options |
options.FireFerretOptions |
FireFerret configuration options |
Returns:
| Type | Description |
|---|---|
| FireFerret |
Methods
-
asyncclose(){string}
client.js, line 54 -
Gracefully close all active connections.
Returns:
Type Description string The close status. -
asyncconnect(){string}
client.js, line 43 -
Establish a connection to both data stores.
Returns:
Type Description string The connection status. -
asyncfetch(query, options, collection){Array|null}
client.js, line 80 -
Fetch MongoDB documents from a query.
Name Type Default Description queryQuery {} optional An optional cursor query object.
optionsObject {} optional Optional settings.
collectionString null optional The collection to fetch from when not using the default.
options.hydrateBoolean false optional JSON.parse documents and attempt to reformat types (performance hit).
options.streamBoolean false optional Return the documents as a stream.
options.wideMatchBoolean false optional Use Wide-Match strategy.
Returns:
Type Description Array | null documents -
asyncfetchById(documentID){Object|null}
client.js, line 168 -
Fetch one MongoDB document from an ID string.
Name Type Description documentIDString The
_idof the requested document.Returns:
Type Description Object | null The document. -
asyncfetchOne(query){Object|null}
client.js, line 235 -
Fetch the first MongoDB document from a query.
Name Type Default Description queryObject {} optional An optional cursor query object.
Returns:
Type Description Object | null The document.