system.db
Database Functions
The following functions give you access to view and modify data in the database.
📄️ addDatasource
Adds a new database connection in Ignition.
📄️ beginNamedQueryTransaction
Begins a new database named query transaction.
📄️ beginTransaction
Begins a new database transaction.
📄️ clearAllNamedQueryCaches
This clears the caches of all Named Queries in a project.
📄️ clearNamedQueryCache
This clears the cache of a Named Query.
📄️ closeTransaction
Closes the transaction with the given ID.
📄️ commitTransaction
Performs a commit for the given transaction.
📄️ createSProcCall
Creates an SProcCall object, which is a stored procedure call context.
📄️ dateFormat
This function is used to format Dates nicely as strings.
📄️ execSProcCall
Executes a stored procedure call.
📄️ getConnectionInfo
Returns a dataset of information about a single database connection, as specified by the name argument.
📄️ getConnections
Returns a dataset of information about each configured database connection. Each row represents a single connection.
📄️ refresh
This function will programmatically cause a SQL Query or DB Browse property binding to execute immediately.
📄️ removeDatasource
Removes a database connection from Ignition.
📄️ rollbackTransaction
Performs a rollback on the given connection.
📄️ runNamedQuery
Runs a named query and returns the results.
📄️ runPrepQuery
Runs a prepared statement against the database, returning the results in a PyDataSet.
📄️ runPrepUpdate
Runs a prepared statement against the database, returning the number of rows that were affected.
📄️ runQuery
Runs a SQL query, usually a SELECT query, against a database, returning the results as a dataset.
📄️ runScalarPrepQuery
Runs a prepared statement against a database connection just like the runPrepQuery function, but only returns the value from the first row and column.
📄️ runScalarQuery
Runs a query against a database connection just like the runQuery function, but only returns the value from the first row and column.
📄️ runSFNamedQuery
Runs a named query through the store and forward system and to multiple datasources at the same time.
📄️ runSFPrepUpdate
Runs a prepared statement query through the store and forward system and to multiple datasources at the same time.
📄️ runSFUpdateQuery
Runs a query through the store and forward system and to multiple datasources at the same time.
📄️ runUpdateQuery
Runs a query against a database connection, returning the number of rows affected.
📄️ setDatasourceConnectURL
Changes the connect URL for a given database connection.
📄️ setDatasourceEnabled
Enables/disables a given database connection.
📄️ setDatasourceMaxConnections
Sets the Max Active and Max Idle parameters of a given database connection.
Functions by Scope
- addDatasource
- beginNamedQueryTransaction
- beginTransaction
- clearAllNamedQueryCaches
- clearNamedQueryCache
- closeTransaction
- commitTransaction
- createSProcCall
- dateFormat
- execSProcCall
- getConnectionInfo
- getConnections
- removeDatasource
- rollbackTransaction
- runNamedQuery
- runPrepQuery
- runPrepUpdate
- runQuery
- runSFPrepUpdate
- runSFUpdateQuery
- runScalarPrepQuery
- runScalarQuery
- runUpdateQuery
- setDatasourceConnectURL
- setDatasourceEnabled
- setDatasourceMaxConnections
- runSFNamedQuery
- addDatasource
- beginNamedQueryTransaction
- beginTransaction
- clearAllNamedQueryCaches
- clearNamedQueryCache
- closeTransaction
- commitTransaction
- createSProcCall
- dateFormat
- execSProcCall
- getConnectionInfo
- getConnections
- refresh
- removeDatasource
- rollbackTransaction
- runNamedQuery
- runPrepQuery
- runPrepUpdate
- runQuery
- runSFPrepUpdate
- runSFUpdateQuery
- runScalarPrepQuery
- runScalarQuery
- runUpdateQuery
- setDatasourceConnectURL
- setDatasourceEnabled
- setDatasourceMaxConnections
- runSFNamedQuery
- addDatasource
- beginNamedQueryTransaction
- beginTransaction
- clearAllNamedQueryCaches
- clearNamedQueryCache
- closeTransaction
- commitTransaction
- createSProcCall
- dateFormat
- execSProcCall
- getConnectionInfo
- getConnections
- removeDatasource
- rollbackTransaction
- runNamedQuery
- runPrepQuery
- runPrepUpdate
- runQuery
- runSFPrepUpdate
- runSFUpdateQuery
- runScalarPrepQuery
- runScalarQuery
- runUpdateQuery
- setDatasourceConnectURL
- setDatasourceEnabled
- setDatasourceMaxConnections
- runSFNamedQuery
Constants
The following constants are available for system.db functions. See the system.db.beginTransaction and system.db.createSProcCall pages for more details.
- system.db.READ_UNCOMMITTED
- system.db.READ_COMMITTED
- system.db.REPEATABLE_READ
- system.db.SERIALIZABLE
- system.db.ORACLE_CURSOR
- system.db.DISTINCT
- system.db.STRUCT
- system.db.REF
- system.db.JAVA_OBJECT
- system.db.SQLXML
- system.db.ARRAY
- system.db.DATALINK
- system.db.OTHER
- system.db.BIT
- system.db.REAL
- system.db.LONGVARCHAR
- system.db.LONGVARBINARY
- system.db.TINYINT
- system.db.DOUBLE
- system.db.DATE
- system.db.NULL
- system.db.SMALLINT
- system.db.NUMERIC
- system.db.TIME
- system.db.ROWID
- system.db.INTEGER
- system.db.DECIMAL
- system.db.TIMESTAMP
- system.db.CLOB
- system.db.BIGINT
- system.db.CHAR
- system.db.BINARY
- system.db.NCLOB
- system.db.FLOAT
- system.db.VARCHAR
- system.db.VARBINARY
- system.db.BLOB
- system.db.NCHAR
- system.db.NVARCHAR
- system.db.LONGNVARCHAR
- system.db.BOOLEAN