Back

Database Services


The services.database interface contains functions for retrieving and updating database rows. These operations are performed directly, without the need for a Database Resource.

The available functions include:

  • executeSelectStatement(), to execute an SQL statement to retrieve data from the specified database. Each row is passed, in turn, to a callback function.
  • executeGenericUpdateStatement(), to update the specified database using a SQL statement. This function can be used to change database structure or to insert, delete or update table rows.

In both of the above functions, a database connection name is passed as a parameter. This must match a database connection that has been configured using the Server Admin App.

The interface also includes additional functionality for working with Mongo (a non-relational database).