Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

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

  1. Database connection name (String/optional). A name corresponding to an entry in the databaseConnections configuration options. 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".


  • No labels