Class: FireFerret

FireFerret

Creates a new FireFerret instance

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
query Query {} optional

An optional cursor query object.

options Object {} optional

Optional settings.

collection String null optional

The collection to fetch from when not using the default.

options.hydrate Boolean false optional

JSON.parse documents and attempt to reformat types (performance hit).

options.stream Boolean false optional

Return the documents as a stream.

options.wideMatch Boolean 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
documentID String

The _id of 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
query Object {} optional

An optional cursor query object.

Returns:
Type Description
Object | null The document.