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
Accessing an Oracle database
- RECORD FUNCTION CallOCICommand(INTEGER transid, STRING command, RECORD indata)
Execute a OCI/Oracle command
- MACRO ClearOCIErrors(INTEGER transaction)
Clear list with OCI Errors
- RECORD ARRAY FUNCTION CommitOCITransaction(INTEGER transaction)
Commits an OCI transaction
- STRING FUNCTION EncodeOCI(STRING indata)
Encode a string for OCI commands (replace all ' with '' characters)
- RECORD ARRAY FUNCTION GetOCIBindInfo(INTEGER transid, STRING command)
Get the binding parameters required to execute a command
- RECORD ARRAY FUNCTION GetOCIColumns(INTEGER transaction, STRING tablename)
Lists colums in an OCI table
- RECORD ARRAY FUNCTION GetOCIErrors(INTEGER transaction)
Get and clear list with OCI Errors
- RECORD ARRAY FUNCTION GetOCITables(INTEGER transaction)
Lists tables in an OCI table
- INTEGER FUNCTION OpenOCITransaction(STRING database, STRING username, STRING password)
Open an Oracle transaction
- MACRO RollbackOCITransaction(INTEGER transaction)
Rolls back an OCI transaction
- RECORD ARRAY FUNCTION SendOCICommand(INTEGER transaction, STRING query)
Sends a query to an Oracle database
- RECORD ARRAY FUNCTION SendOCITypedCommand(INTEGER transaction, STRING query, INTEGER ARRAY types)
Sends a query to an Oracle database, and requested specific return types
- RECORD FUNCTION StartOCITransaction(RECORD connectinfo)
Start an Oracle transaction
Accessing ODBC data sources
- MACRO CommitODBCTransaction(INTEGER transaction)
Commits an ODBC transaction
- RECORD ARRAY FUNCTION GetODBCColumns(INTEGER transaction, STRING tablename)
Lists colums in a ODBC table
- RECORD ARRAY FUNCTION GetODBCDataSources(INTEGER sourcetype, STRING codepage)
List available ODBC data sources
- RECORD FUNCTION GetODBCInfo(INTEGER transaction)
Get the ODBC driver information and capabilities
- RECORD ARRAY FUNCTION GetODBCTables(INTEGER transaction)
Lists tables in a ODBC transaction
- OBJECTTYPE ODBCException
- OBJECTTYPE ODBCTransaction
- INTEGER FUNCTION OpenODBCTransaction(STRING dsn, STRING username, STRING password)
Open an ODBC transaction
- MACRO RollbackODBCTransaction(INTEGER transaction)
Rolls an ODBC transaction back
- RECORD ARRAY FUNCTION SendODBCCommand(INTEGER transaction, STRING query)
Sends a query to an ODBC driver
- RECORD ARRAY FUNCTION SendODBCTypedCommand(INTEGER transaction, STRING query, INTEGER ARRAY types)
Sends a query to an ODBC driver and specify the required return types
- MACRO SetODBCCapabilities(INTEGER transaction, RECORD newcaps)
Update a driver's ODBC capabilities
- OBJECT FUNCTION StartODBCTransaction(RECORD transinfo)
Start a new ODBC transaction
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