This API was added in Profound.js 5.0.0
This API returns a database connection definition object that can be passed to some SQL and Data APIs to specify the desired database connection.
Parameters
- Database connection name (String/optional). A name corresponding to an entry in the databaseConnections configuration option. If the name is omitted, then the default database connection definition is returned.
Exception Handling
An exception is is thrown if the database connection name is not valid.
Example
pjs.query("select * from mytable"); // Query runs against default database connection. pjs.query(pjs.getDB("crm"), "select * from mytable"); // Query runs against database connection "crm".