DatabaseResource

The DatabaseResource interface represents a Database Resource which provides the ability to execute SQL statements. Each resource can operate in one of two modes: table mode or non-table mode.

In table mode, methods on this interface are not used. Instead, the Database Resource is configured as the backing resource for a Table. SQL statements are issued as a result of fetchTable()and updateTable()methods issued against the table.

In non-table mode, SQL statements are executed as a result of method calls to this interface. In general, these methods are intended to retrieve, update, insert or delete a single database row.

Further documentation.

DatabaseResource Functions

delete DatabaseResource.delete( ) Builds and executes a delete SQL statement.
fetch DatabaseResource.fetch( ) Builds and executes a select SQL statement and sets the value of mapped form fields with column values retrieved from the database.
insert DatabaseResource.insert( ) Builds and executes an insert SQL statement and inserts a table row with values obtained from mapped form fields.
update DatabaseResource.update( ) Builds and executes an update SQL statement and updates the database with values obtained from mapped form fields.

Resource Functions

setDebug DatabaseResource.setDebug( debug ) Activates or deactivates debug for the resource.
isDebug DatabaseResource.isDebug( ) Returns true if debug is activated for the resource.

Element Functions

getElementName DatabaseResource.getElementName( ) Returns the element name
getElementType DatabaseResource.getElementType( ) Returns the element type