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_clearAllQueryCaches(String projectName) protected void_clearQueryCache(String project, Set<String> path) protected void_closeTransaction(String txId) protected void_commitTransaction(String txId) protected Object_execNamedQuery(String projectName, String path, Map<String, Object> parameters, String tx, boolean getKey) protected booleanprotected 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 query, String datasource, String txId, boolean getIds, boolean skipAudit) beginNamedQueryTransaction(org.python.core.PyObject[] pyArgs, String[] keywords) voidDeprecated.voidclearNamedQueryCache(org.python.core.PyObject[] values, String[] keywords) Deprecated.As of 8.3.0, useAbstractDBUtilities.clearQueryCache(org.python.core.PyObject[], java.lang.String[])instead.protected List<RpcDatasourceMeta>getQueryParameters(String project, String queryPath) runNamedQuery(org.python.core.PyObject[] values, String[] keywords) Deprecated.booleanrunSFNamedQuery(org.python.core.PyObject[] pyArgs, String[] keywords) Deprecated.As of 8.3.0, useAbstractDBUtilities.execUpdateAsync(org.python.core.PyObject[], java.lang.String[])instead.Methods inherited from class com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities
beginTransaction, clearQueryCache, closeTransaction, commitTransaction, createSProcCall, dataSetToCSV, dateFormat, error, execQuery, execScalar, execSProcCall, execUpdate, execUpdateAsync, extractParameters, extractPath, extractProject, 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
@Deprecated(since="8.3.0") public Object runNamedQuery(org.python.core.PyObject[] values, String[] keywords) throws Exception Deprecated.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
-
getDefaultProject
- Specified by:
getDefaultProjectin classAbstractDBUtilities
-
_execNamedQuery
protected Object _execNamedQuery(String projectName, String path, Map<String, Object> parameters, String tx, boolean getKey) throws Exception- Specified by:
_execNamedQueryin classAbstractDBUtilities- Throws:
Exception
-
getQueryParameters
- Specified by:
getQueryParametersin classAbstractDBUtilities
-
runSFNamedQuery
@Deprecated(since="8.3.0") public boolean runSFNamedQuery(org.python.core.PyObject[] pyArgs, String[] keywords) throws Exception Deprecated.As of 8.3.0, useAbstractDBUtilities.execUpdateAsync(org.python.core.PyObject[], java.lang.String[])instead.- Throws:
Exception
-
_execNamedQueryAsync
protected boolean _execNamedQueryAsync(String projectName, String path, Map<String, Object> parameters) throws Exception- Specified by:
_execNamedQueryAsyncin classAbstractDBUtilities- Throws:
Exception
-
clearNamedQueryCache
@Deprecated(since="8.3.0") public void clearNamedQueryCache(org.python.core.PyObject[] values, String[] keywords) throws GatewayException Deprecated.As of 8.3.0, useAbstractDBUtilities.clearQueryCache(org.python.core.PyObject[], java.lang.String[])instead.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.
-
_clearQueryCache
- Specified by:
_clearQueryCachein classAbstractDBUtilities- Throws:
GatewayException
-
clearAllNamedQueryCaches
Deprecated.As of 8.3.0, useAbstractDBUtilities.clearQueryCache(org.python.core.PyObject[], java.lang.String[])instead.Clears all named query caches for the current project.- Throws:
GatewayException- if there is an error clearing all the named query caches.
-
_clearAllQueryCaches
- Specified by:
_clearAllQueryCachesin classAbstractDBUtilities- Throws:
GatewayException
-
_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 query, 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
-
AbstractDBUtilities.clearQueryCache(org.python.core.PyObject[], java.lang.String[])instead.