The datasource object for use as an interface for a datasource
- Source:
Members
-
<static> this.client
-
- Source:
Properties:
Name Type Description client
object The client for use in the DataSource
-
<static> this.collection
-
- Source:
Properties:
Name Type Description collection
object The collection for use in the DataSource
-
<static> this.db
-
- Source:
Properties:
Name Type Description db
object The database (or simular) for the datasource (if applicable)
-
<static> this.url
-
- Source:
Properties:
Name Type Description url
string The url for the datasource (if applicable)
Methods
-
<static> closeConnection Close a connection to the DataSource ()
-
- Source:
Returns:
Returns true if a connection is established
- Type
- boolean
-
<static> getCollection Get the collection()
-
- Source:
Returns:
Returns the collection
- Type
- object
-
<static> getConnection Get a connection to the DataSource()
-
- Source:
Returns:
Returns true if a connection is established
- Type
- boolean
-
<static> insert Insert data(data)
-
Parameters:
Name Type Description data
object Data to insert
- Source:
-
<static> query Query data(query, callback)
-
Parameters:
Name Type Description query
object The query object
callback
function A callback to execute during the query
- Source:
Returns:
Returns a value from the query or response code
- Type
- object
-
<static> remove Remove data(data)
-
Parameters:
Name Type Description data
object Data to remove
- Source:
-
<static> setCollection Set the collection by name(name)
-
Parameters:
Name Type Description name
string The name of the collection
- Source:
-
<static> update Update data(data)
-
Parameters:
Name Type Description data
object Data to update
- Source: