Class AbstractDBUtilities
java.lang.Object
com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities
- Direct Known Subclasses:
ClientDBUtilities
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected static ThreadLocal<SimpleDateFormat>static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String_beginTransaction(String datasource, int isolationLevel, long timeout) protected abstract voidprotected abstract void_clearAllQueryCaches(String projectName) protected abstract void_clearQueryCache(String projectName, Set<String> path) protected abstract void_closeTransaction(String txId) protected abstract void_commitTransaction(String txId) protected abstract Object_execNamedQuery(String projectName, String path, Map<String, Object> parameters, String tx, boolean getKey) protected abstract booleanprotected abstract String_getDatasourceName(String txId) protected abstract void_rollbackTransaction(String txId) protected abstract Dataset_runPrepQuery(String query, String datasource, String txId, Object[] args) protected abstract Integer_runPrepStmt(String query, String datasource, String txId, boolean getIds, boolean skipAudit, Object[] args) protected abstract Datasetprotected abstract Integer_runUpdateQuery(String s, String datasource, String txId, boolean getIds, boolean skipAudit) beginTransaction(org.python.core.PyObject[] pyArgs, String[] keywords) voidclearQueryCache(org.python.core.PyObject[] values, String[] keywords) voidcloseTransaction(String txId) voidcommitTransaction(String txId) createSProcCall(org.python.core.PyObject[] pyArgs, String[] keywords) static StringdataSetToCSV(boolean headerRow, Dataset ds) Deprecated.Use DatasetUtilities.toCSVJava()static StringdateFormat(Date date, String pattern) Deprecated.Usesystem.date.formatinstead.protected org.python.core.PyExceptionexecScalar(org.python.core.PyObject[] pyArgs, String[] keywords) voidexecSProcCall(SProcCall callContext) execUpdate(org.python.core.PyObject[] pyArgs, String[] keywords) booleanexecUpdateAsync(org.python.core.PyObject[] pyArgs, String[] keywords) extractParameters(PyArgParser args) protected static StringextractPath(PyArgParser args) protected StringextractProject(PyArgParser args) protected abstract List<RpcDatasourceMeta>getConnectionInfo(String name) protected static StringgetDatasource(PyArgumentMap args) Returns the datasource defined by the "database" parameter, or the default set on the ScriptContext, if available.getQueryParameters(String project, String queryPath) protected StringvoidrollbackTransaction(String txId) runPrepQuery(org.python.core.PyObject[] pyArgs, String[] keywords) runPrepStmt(String query, Object[] args) Deprecated.runPrepStmt(String query, String datasource, Object[] args) Deprecated.runPrepStmtGetKey(String query, Object[] args) Deprecated.runPrepStmtGetKey(String query, String datasource, Object[] args) Deprecated.runPrepUpdate(org.python.core.PyObject[] pyArgs, String[] keywords) Deprecated.UseexecQueryorrunPrepQuery(org.python.core.PyObject[], java.lang.String[])for improved performance and security.runScalarPrepQuery(org.python.core.PyObject[] pyArgs, String[] keywords) runScalarQuery(org.python.core.PyObject[] pyArgs, String[] keywords) Deprecated.UseexecQueryorrunScalarPrepQuery(org.python.core.PyObject[], java.lang.String[])for improved performance and security.runUpdateQuery(org.python.core.PyObject[] pyArgs, String[] keywords) Deprecated.UseexecUpdateorrunPrepUpdate(org.python.core.PyObject[], java.lang.String[])for improved performance and security.Deprecated.runUpdateQueryGetKey(String q, String datasource) Deprecated.protected DatasettoDataset(List<RpcDatasourceMeta> list) S1845: We have multiple methods named toDataSet that differs in case (note the uppercase S).static DatasetDeprecated.use DatasetUtilities.toDataSet()static DatasettoDataSet(org.python.core.PySequence headers, org.python.core.PySequence pyData) Deprecated.Use DatasetUtilities.toDataSet()static DatasetUtilities.PyDataSettoPyDataSet(Dataset dataset) Deprecated.Use DatasetUtilities.toPyDataSet()
-
Field Details
-
ORACLE_CURSOR
public static final int ORACLE_CURSOR- See Also:
-
BIT
public static final int BIT- See Also:
-
TINYINT
public static final int TINYINT- See Also:
-
SMALLINT
public static final int SMALLINT- See Also:
-
INTEGER
public static final int INTEGER- See Also:
-
BIGINT
public static final int BIGINT- See Also:
-
FLOAT
public static final int FLOAT- See Also:
-
REAL
public static final int REAL- See Also:
-
DOUBLE
public static final int DOUBLE- See Also:
-
NUMERIC
public static final int NUMERIC- See Also:
-
DECIMAL
public static final int DECIMAL- See Also:
-
CHAR
public static final int CHAR- See Also:
-
VARCHAR
public static final int VARCHAR- See Also:
-
LONGVARCHAR
public static final int LONGVARCHAR- See Also:
-
DATE
public static final int DATE- See Also:
-
TIME
public static final int TIME- See Also:
-
TIMESTAMP
public static final int TIMESTAMP- See Also:
-
BINARY
public static final int BINARY- See Also:
-
VARBINARY
public static final int VARBINARY- See Also:
-
LONGVARBINARY
public static final int LONGVARBINARY- See Also:
-
NULL
public static final int NULL- See Also:
-
OTHER
public static final int OTHER- See Also:
-
JAVA_OBJECT
public static final int JAVA_OBJECT- See Also:
-
DISTINCT
public static final int DISTINCT- See Also:
-
STRUCT
public static final int STRUCT- See Also:
-
ARRAY
public static final int ARRAY- See Also:
-
BLOB
public static final int BLOB- See Also:
-
CLOB
public static final int CLOB- See Also:
-
REF
public static final int REF- See Also:
-
DATALINK
public static final int DATALINK- See Also:
-
BOOLEAN
public static final int BOOLEAN- See Also:
-
ROWID
public static final int ROWID- See Also:
-
NCHAR
public static final int NCHAR- See Also:
-
NVARCHAR
public static final int NVARCHAR- See Also:
-
LONGNVARCHAR
public static final int LONGNVARCHAR- See Also:
-
NCLOB
public static final int NCLOB- See Also:
-
SQLXML
public static final int SQLXML- See Also:
-
READ_COMMITTED
public static final int READ_COMMITTED- See Also:
-
READ_UNCOMMITTED
public static final int READ_UNCOMMITTED- See Also:
-
REPEATABLE_READ
public static final int REPEATABLE_READ- See Also:
-
SERIALIZABLE
public static final int SERIALIZABLE- See Also:
-
SDF_THREAD_LOCAL
-
-
Constructor Details
-
AbstractDBUtilities
public AbstractDBUtilities()
-
-
Method Details
-
dateFormat
Deprecated.Usesystem.date.formatinstead. -
getDatasource
Returns the datasource defined by the "database" parameter, or the default set on the ScriptContext, if available. -
toPyDataSet
Deprecated.Use DatasetUtilities.toPyDataSet()For backwards compatibility. @see DatasetUtilities -
toDataSet
Deprecated.use DatasetUtilities.toDataSet()For backwards compatibility. @see DatasetUtilities -
toDataSet
@Deprecated public static Dataset toDataSet(org.python.core.PySequence headers, org.python.core.PySequence pyData) Deprecated.Use DatasetUtilities.toDataSet()For backwards compatibility. -
dataSetToCSV
Deprecated.Use DatasetUtilities.toCSVJava()For backwards compatibility. @see DatasetUtilities -
runUpdateQuery
@Deprecated(since="8.3.0") public Integer runUpdateQuery(org.python.core.PyObject[] pyArgs, String[] keywords) Deprecated.UseexecUpdateorrunPrepUpdate(org.python.core.PyObject[], java.lang.String[])for improved performance and security. -
runUpdateQueryGetKey
Deprecated. -
runUpdateQueryGetKey
Deprecated. -
_runUpdateQuery
protected abstract Integer _runUpdateQuery(String s, String datasource, String txId, boolean getIds, boolean skipAudit) throws Exception - Throws:
Exception
-
runPrepStmt
Deprecated. -
runPrepStmt
Deprecated. -
runPrepStmtGetKey
Deprecated. -
runPrepStmtGetKey
Deprecated. -
runPrepUpdate
-
_runPrepStmt
protected abstract Integer _runPrepStmt(String query, String datasource, String txId, boolean getIds, boolean skipAudit, Object[] args) throws Exception - Throws:
Exception
-
runPrepQuery
public DatasetUtilities.PyDataSet runPrepQuery(org.python.core.PyObject[] pyArgs, String[] keywords) -
_runPrepQuery
protected abstract Dataset _runPrepQuery(String query, String datasource, String txId, Object[] args) throws Exception - Throws:
Exception
-
runScalarPrepQuery
-
runQuery
@Deprecated(since="8.3.0") public DatasetUtilities.PyDataSet runQuery(org.python.core.PyObject[] pyArgs, String[] keywords) Deprecated.UseexecQueryorrunPrepQuery(org.python.core.PyObject[], java.lang.String[])for improved performance and security. -
runScalarQuery
@Deprecated(since="8.3.0") public Object runScalarQuery(org.python.core.PyObject[] pyArgs, String[] keywords) Deprecated.UseexecQueryorrunScalarPrepQuery(org.python.core.PyObject[], java.lang.String[])for improved performance and security. -
clearQueryCache
- Throws:
Exception
-
error
-
getConnections
-
getConnectionInfo
-
_runQuery
- Throws:
Exception
-
findDatasources
-
toDataset
S1845: We have multiple methods named toDataSet that differs in case (note the uppercase S). Those methods are marked as deprecated. Newer methods should use Dataset with a lower case s. This is the form (dataset vs data set) that is used for our online documentation. The suppression and this comment should be removed when those deprecated methods are removed. -
beginTransaction
public String beginTransaction(org.python.core.PyObject[] pyArgs, String[] keywords) throws SQLException - Throws:
SQLException
-
commitTransaction
- Throws:
SQLException
-
rollbackTransaction
- Throws:
SQLException
-
closeTransaction
- Throws:
SQLException
-
_beginTransaction
protected abstract String _beginTransaction(String datasource, int isolationLevel, long timeout) throws Exception - Throws:
Exception
-
_commitTransaction
- Throws:
Exception
-
_rollbackTransaction
- Throws:
Exception
-
_closeTransaction
- Throws:
Exception
-
_getDatasourceName
- Throws:
Exception
-
_clearQueryCache
- Throws:
Exception
-
_clearAllQueryCaches
- Throws:
Exception
-
_execNamedQuery
protected abstract Object _execNamedQuery(String projectName, String path, Map<String, Object> parameters, String tx, boolean getKey) throws Exception- Throws:
Exception
-
_execNamedQueryAsync
protected abstract boolean _execNamedQueryAsync(String projectName, String path, Map<String, Object> parameters) throws Exception- Throws:
Exception
-
createSProcCall
-
execSProcCall
-
_call
- Throws:
Exception
-
getTransactionDatasource
-
execQuery
- Throws:
Exception
-
getDefaultProject
-
getQueryParameters
-
execUpdate
- Throws:
Exception
-
execUpdateAsync
public boolean execUpdateAsync(org.python.core.PyObject[] pyArgs, String[] keywords) throws Exception - Throws:
Exception
-
execScalar
- Throws:
Exception
-
extractProject
-
extractPath
-
extractParameters
-