Class ClientDBUtilities
java.lang.Object
com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities
com.inductiveautomation.ignition.client.script.ClientDBUtilities
These are DB utilities that are common to the client system as a whole (designer, client)
- 
Field Summary
FieldsFields inherited from class com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities
ARRAY, BIGINT, BINARY, BIT, BLOB, BOOLEAN, CHAR, CLOB, DATALINK, DATE, DECIMAL, DISTINCT, DOUBLE, FLOAT, INTEGER, JAVA_OBJECT, LONGNVARCHAR, LONGVARBINARY, LONGVARCHAR, NCHAR, NCLOB, NULL, NUMERIC, NVARCHAR, ORACLE_CURSOR, OTHER, READ_COMMITTED, READ_UNCOMMITTED, REAL, REF, REPEATABLE_READ, ROWID, SDF_THREAD_LOCAL, SERIALIZABLE, SMALLINT, SQLXML, STRUCT, TIME, TIMESTAMP, TINYINT, VARBINARY, VARCHAR - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected String_beginTransaction(String datasource, int isolationLevel, long timeout) protected voidCalls a stored procedure, so safe for client use without permission check.protected void_closeTransaction(String txId) protected void_commitTransaction(String txId) protected List<? extends DatasourceMeta>protected String_getDatasourceName(String txId) protected void_rollbackTransaction(String txId) protected Dataset_runPrepQuery(String query, String datasource, String txId, Object[] args) protected Integer_runPrepStmt(String query, String datasource, String txId, boolean getIds, boolean skipAudit, Object[] args) protected Datasetprotected Integer_runUpdateQuery(String q, String datasource, String txId, boolean getIds, boolean skipAudit) beginNamedQueryTransaction(org.python.core.PyObject[] pyArgs, String[] keywords) voidClears all named query caches for the current project.voidclearNamedQueryCache(org.python.core.PyObject[] values, String[] keywords) Clears the cache of the named query specified by the path parameter.runNamedQuery(org.python.core.PyObject[] values, String[] keywords) This invokes the gateway rpc, which only uses the saved query version.booleanrunSFNamedQuery(org.python.core.PyObject[] pyArgs, String[] keywords) Methods inherited from class com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities
beginTransaction, closeTransaction, commitTransaction, createSProcCall, dataSetToCSV, dateFormat, error, execSProcCall, getConnectionInfo, getConnections, getDatasource, getTransactionDatasource, rollbackTransaction, runPrepQuery, runPrepStmt, runPrepStmt, runPrepStmtGetKey, runPrepStmtGetKey, runPrepUpdate, runQuery, runScalarPrepQuery, runScalarQuery, runUpdateQuery, runUpdateQueryGetKey, runUpdateQueryGetKey, toDataset, toDataSet, toDataSet, toPyDataSet 
- 
Field Details
- 
context
 
 - 
 - 
Constructor Details
- 
ClientDBUtilities
 
 - 
 - 
Method Details
- 
beginNamedQueryTransaction
public String beginNamedQueryTransaction(org.python.core.PyObject[] pyArgs, String[] keywords) throws Exception - Throws:
 Exception
 - 
getConnectionInfo
 - 
runNamedQuery
This invokes the gateway rpc, which only uses the saved query version. Named queries are "safe", so does not need the ClientProtection annotation.- Returns:
 - Results of the query. May be null or empty if the query failed or returned no results.
 - Throws:
 GatewayException- If path is invalid or query can't be run.Exception
 - 
runSFNamedQuery
public boolean runSFNamedQuery(org.python.core.PyObject[] pyArgs, String[] keywords) throws Exception - Throws:
 Exception
 - 
clearNamedQueryCache
public void clearNamedQueryCache(org.python.core.PyObject[] values, String[] keywords) throws GatewayException Clears the cache of the named query specified by the path parameter. Will use published version. May not be null.- Throws:
 GatewayException- if the path is malformed.
 - 
clearAllNamedQueryCaches
Clears all named query caches for the current project.- Throws:
 GatewayException- if there is an error clearing all the named query caches.
 - 
_beginTransaction
protected String _beginTransaction(String datasource, int isolationLevel, long timeout) throws Exception - Specified by:
 _beginTransactionin classAbstractDBUtilities- Throws:
 Exception
 - 
_commitTransaction
- Specified by:
 _commitTransactionin classAbstractDBUtilities- Throws:
 Exception
 - 
_rollbackTransaction
- Specified by:
 _rollbackTransactionin classAbstractDBUtilities- Throws:
 Exception
 - 
_closeTransaction
- Specified by:
 _closeTransactionin classAbstractDBUtilities- Throws:
 Exception
 - 
_getDatasourceName
- Specified by:
 _getDatasourceNamein classAbstractDBUtilities- Throws:
 Exception
 - 
_runUpdateQuery
protected Integer _runUpdateQuery(String q, String datasource, String txId, boolean getIds, boolean skipAudit) throws Exception - Specified by:
 _runUpdateQueryin classAbstractDBUtilities- Throws:
 Exception
 - 
_runPrepStmt
protected Integer _runPrepStmt(String query, String datasource, String txId, boolean getIds, boolean skipAudit, Object[] args) throws Exception - Specified by:
 _runPrepStmtin classAbstractDBUtilities- Throws:
 Exception
 - 
_runPrepQuery
protected Dataset _runPrepQuery(String query, String datasource, String txId, Object[] args) throws Exception - Specified by:
 _runPrepQueryin classAbstractDBUtilities- Throws:
 Exception
 - 
_runQuery
- Specified by:
 _runQueryin classAbstractDBUtilities- Throws:
 Exception
 - 
_findDatasources
- Specified by:
 _findDatasourcesin classAbstractDBUtilities
 - 
_call
Calls a stored procedure, so safe for client use without permission check.- Specified by:
 _callin classAbstractDBUtilities- Throws:
 Exception
 
 -