Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

  1. 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

Code Block
languagejs
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".

...