service-datasource
Augmented.js Next Service - Datasource helper module
API
Table of Contents
DataSource
The datasource object for use as an interface for a datasource
getConnection
Properties
client
object The client for use in the DataSource
getConnection
Properties
url
string The url for the datasource (if applicable)
getConnection
Properties
db
object The database (or simular) for the datasource (if applicable)
getConnection
Properties
collection
object The collection for use in the DataSource
getConnection
Returns boolean Returns true if a connection is established
closeConnection
Returns boolean Returns true if a connection is established
insert
Parameters
data
object Data to insert
remove
Parameters
data
object Data to remove
update
Parameters
data
object Data to update
query
Parameters
Returns object Returns a value from the query or response code
collection
Returns object Returns the collection
collection
Parameters
name
string The name of the collection
client
Returns object Returns the client
SOLRDataSource
Extends Augmented.Service.DataSource
The SOLR datasource instance class - WIP
DataSourceFactory
The datasource factory to return an instance of a datasource configured by type
MongoDataSource
Extends DataSource
The MongoDB datasource instance class
Parameters
client