EGL library sqlLib

The EGL sqlLib library contains functions and variables that you can use in connection with a relational database.

The following table lists the library functions:

Table 1. EGL library sqlLib functions
Function Description
beginDatabaseTransaction([database]) Begins a relational-database transaction, but only when the EGL runtime is not committing changes automatically.
connect (database, userID, password[, commitScope[, disconnectOption[, isolationLevel[, commitControl]]]]) Closes all result sets, releases locks, ends any existing connection, and connects to the database.
result = constructQuery (sqlRecord, valueDictionary, matchOption) Returns an SQL condition based on a dictionary that contains comparison operators and values.
defineDatabaseAlias (alias, database) Creates an alias that can be used to establish a new connection to a database to which your code is already connected.
disconnect ([database]) Disconnects from the specified database or (if no database is specified) from the current database.
disconnectAll () Disconnects from all the currently connected databases.
loadTable (filename, insertIntoClause[, delimiter]) Loads data from a file into a relational database. The function is available only for Java™ generation.
queryCurrentDatabase (product, release) Returns the product and release number of the currently connected database.
setCurrentDatabase (database) Activates the specified database.
unloadTable (filename, selectStatement[, delimiter]) Unloads data from a relational database into a file. The function is available only for Java generation.

The following table lists the library variables:

Table 2. EGL library sqlLib variables
Variable Description
currentSchema (EGL system variable) Holds the name of a schema to be prepended to all table names at runtime.
sqlLib.sqlData (EGL system variable) Contains a number of globally available error codes, messages, and other information about the interaction of EGL with your SQL database.

Feedback