The Business Rules Engine

Reference: The Database Object


Within procedures and triggers, Coda provides a simple object that can be used to interact with the server called "database." This is a Java class with a handful of methods, and is documented below.

  • execute(String command): Takes any DML (Data Manipulation Language) statement. This includes INSERT, UPDATE, DELETE, any form status verb, EXEC PROCEDURE, and RAWSQL. Returns true or false.
  • getLastProcedureReturnValue(): Returns the last value returned from a procedure. It returns an object which must be cast to the correct type.
  • query(String command): Takes any query that returns a resultset. This includes SELECT, SELECT OBJECT, SYSSELECT, and RAWSELECT. Returns a resultset object.
  • commit(): Commits the current transaction.
  • rollback(): Rolls back the current transaction.