RDBMS Catalog Functions
The RDBMS functions are used in TIBCO BusinessEvents rules and rule functions to connect to a database to perform database operations.
The database concepts feature has an object-to-relational mapping feature that enables you to act on the concepts, and delegate the persistence of these objects to the RDBMS catalog functions.
These functions allow you to perform basic Create, Retrieve, Update and Delete (CRUD) operations on database tables using database concepts, and perform related tasks. In this way, you can keep the database concepts synchronized with their database equivalents.
The RDBMS catalog has one category called Database, which contains the following functions:
- getConnectionStatus()
- setCurrentConnection()
- unsetConnection()
- beginTransaction()
- commit()
- rollback()
- insert()
- update()
- delete()
- queryUsingConceptProps()
- queryUsingPreparedStmt()
- queryUsingPrimaryKeys()
- queryUsingSQL()
- assertDBInstance()
- executePreparedStmt()
- executeSQL()
- createQuery()
- closeQuery()
- getNextPage()
- getNextPageFromOffset()
- getPreviousPage()
- getPreviousPageFromOffset()
These operations include inserting, updating or deleting database operations, or keeping the TIBCO BusinessEvents concepts and their database source synchronized.
- The setCurrentConnection and unsetConnection Functions
Use setCurrentConnection() once before performing any database operation. Use unsetConnection() once after all database operations are performed. - Transactions
To commit multiple statements, group them using transactions. - Insert Operations
The insert function Database.insert() inserts an object and its concept properties (if any) recursively into the database. - Update and Delete Operations
Perform the update or delete operations on row using their primary key. - Query Operations
You can perform query operations on a database, to return cocepts matching those queries. - Database Concept Assertion After Database Query
Several RDBMS catalog functions enable you to query the database. Concepts returned by a database query are not automatically asserted. They must be explicitly asserted. - Prepared Statements
A prepared statement is an SQL statement whose values are determined at runtime. You can use prepared statements in the queryUsingPreparedStmt() and executePreparedStmt() functions. - Database Cursor Functions
Database cursor functions are useful when you want to process few records at a time in a large result set of queries. They help you to get database records, insert database records, and delete database records.