Database
Built-in WebHare database
- OBJECT FUNCTION GetEffectiveUser()
Return the WebHare user object under which we're accessing the system
- INTEGER FUNCTION GetEffectiveUserId()
Return the WebHare user id under which we're accessing the system
- OBJECT FUNCTION GetPrimary()
Returns current primary transaction
- INTEGER FUNCTION GetPrimaryWebhareTransaction()
Returns the ID of the primary WebHare transaction
- OBJECT FUNCTION GetPrimaryWebhareTransactionObject()
Returns the primary WebHare transaction object
- BOOLEAN FUNCTION HavePrimaryTransaction()
Do we have a primary transaction?
- OBJECT FUNCTION OpenPrimary(RECORD options)
Opens the primary database connection
- VARIANT FUNCTION RunInSeparatePrimary(FUNCTION PTR func, RECORD options)
Run a function in a separate transaction
- MACRO SetPrimaryWebhareTransaction(INTEGER transid)
Sets the primary WeHhare transaction
- MACRO SetupPrimaryTransactionBinder(MACRO PTR bindfunc)
Register a transaction binder function, that will be called with the id of the primary WebHare transaction when that changes
- SCHEMA system
System database schema
- OBJECTTYPE WebhareDBException
Dynamic queries
- OBJECTTYPE DynamicInserter
This object implements the interface to insert bulk records into a table. Create one by calling GetDynamicInserter
- OBJECTTYPE DynamicQuery
Dynamic queries object
- RECORD ARRAY FUNCTION EnrichWithTable(RECORD ARRAY inrows, STRING idcellname, TABLE tbl, RECORD addcolumns, RECORD options)
Enrich an array with fields from a database table
- OBJECT FUNCTION GetDynamicInserter(OBJECT trans, STRING tablename, RECORD options)
Creates an object that can insert records into a table that is specified at run-time.
Accessing a LDAP server as a database
- INTEGER FUNCTION OpenLDAPConnection(STRING server, INTEGER port, STRING binddn, STRING passwd, BOOLEAN secure, RECORD options)
Open an LDAP connection
- OBJECT FUNCTION OpenLDAPTransaction(STRING server, INTEGER port, STRING binddn, STRING passwd, BOOLEAN secure, RECORD options)
- RECORD ARRAY FUNCTION ParseDN(STRING dn)
Parse an LDAP distinguished name
- MACRO SetLDAPSearchScope(INTEGER transaction, STRING dn, INTEGER scope)
Set the LDAP search scope
Loopback database connections
- OBJECT FUNCTION CreateForwardingLoopbackTransactionFromFLTRecordInterface(RECORD itf, RECORD clientdata)
- OBJECT FUNCTION CreateForwardingLoopbackTransactionFromObject(OBJECT trans, RECORD clientdata)
- RECORD FUNCTION GetTransactionFLTRecordInterface(OBJECT transaction)
- OBJECTTYPE LoopbackCursor
API for object called by Loopback DB provider FIXME: document
- OBJECTTYPE LoopbackTransaction
Low-level definitions
- OBJECTTYPE DatabaseException
Database exception, thrown on commit when 'throwoncommiterror' is set to TRUE in transaction.
- OBJECTTYPE DatabaseReadonlyException
Database exception, thrown on BeginWork if the database is Readonly
- OBJECTTYPE ForwardingTransaction
Forwarding transaction, forwards all calls to another transaction
- OBJECTTYPE ForwardingTransactionCursor
Forwarding transaction, forwards all calls to another transaction
- OBJECT FUNCTION GetTransactionObjectById(INTEGER transid)
- OBJECT FUNCTION GetTransactionObjectForTable(TABLE outtable)
- OBJECTTYPE TransactionBase
A lowlevel transaction can be used for full low-level access to a database. Primarily used for transparent access to other databases.
- OBJECTTYPE TransactionCursorBase
The TransactionCursorBase objecttype defines an object which can used for cursoring through a query.
- OBJECTTYPE TransactionFinishHandlerBase
Base class for objects that will handle commit or rollback of a transaction. Used with SetFinishHandler