new db(cfg)
Universal database abstraction (use Sails Waterline).
Interface: https://github.com/balderdashy/sails-docs/blob/master/contributing/adapter-specification.md
Usage: http://sailsjs.com/documentation/concepts/models-and-orm
Available/Custom adapters: http://sailsjs.com/documentation/concepts/extending-sails/adapters
Interface: https://github.com/balderdashy/sails-docs/blob/master/contributing/adapter-specification.md
Usage: http://sailsjs.com/documentation/concepts/models-and-orm
Available/Custom adapters: http://sailsjs.com/documentation/concepts/extending-sails/adapters
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
cfg |
Object | Configuration
Properties
|
Methods
-
dispose(cb)
-
Dispose/Close database connection.
Parameters:
Name Type Description cb
function Callback -
open(model, cb)
-
Open database connection.
Model definition: https://github.com/balderdashy/waterline-docs/blob/master/models/configuration.mdParameters:
Name Type Description model
Object Model definition. cb
function Callback