Class DefaultDBTranslator
java.lang.Object
com.inductiveautomation.ignition.gateway.db.DefaultDBTranslator
- All Implemented Interfaces:
DBTranslator
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.gateway.db.DBTranslator
DBTranslator.Tokens
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected LimitPosition
protected int
protected String
protected String
protected boolean
protected String
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultDBTranslator
(String cTable, String cAISeq, String cAITrig, String cNdx, String autoInc, String lDef, LimitPosition lPos, String aTable, String aTableColumn, String pKey, String qCurTime, EnumMap<DataType, String> tMap, String colQuoteChar, boolean supportsRgk, String fetchRgkQuery, String tableListFilter) DefaultDBTranslator
(EnumMap<DataType, String> tMap) -
Method Summary
Modifier and TypeMethodDescriptionapplyLimit
(String query, Integer limit) Takes a SELECT query and applies the given limit to it, resulting in a select query with a limiting clause.getAlterCommand
(String tableName, ColumnList columns) Returns the character that this driver uses to quote names in queriesgetCreateCommand
(String tableName, ColumnList columns) getCreateIndexCommand
(String tableName, Column column) protected String
getCreationDef
(ColumnList columns) Returns a query that can be used to get the current database time.protected String
getDataTypeKeyword
(DataType type) getFetchKeyQuery
(String tableName, String columnName) A query to be executed instead of using JDBC's built-in facility for obtaining auto-generated keys.protected String
getShortendName
(String name) protected String
getSpecialtyDef
(String tokenVal, String definition, String token) Returns a filter that will be used to narrow the list of tables returned from the database.boolean
quoteColumn
(Column col) quoteColumn
(String col) protected String
replaceToken
(String source, String token, String value) protected String
-
Field Details
-
createTable
-
createAISequence
-
createAITrigger
-
createIndex
-
autoIncTypeDef
-
limitDef
-
limitPos
-
alterTable
-
alterColumnDef
-
-
currentTimeQuery
-
columnQuoteChar
-
supportsRgk
protected boolean supportsRgk -
readGKQuery
-
tableListFilter
-
maxIdentifierLength
protected int maxIdentifierLength -
typeMap
-
-
Constructor Details
-
DefaultDBTranslator
public DefaultDBTranslator() -
DefaultDBTranslator
-
DefaultDBTranslator
public DefaultDBTranslator(String cTable, String cAISeq, String cAITrig, String cNdx, String autoInc, String lDef, LimitPosition lPos, String aTable, String aTableColumn, String pKey, String qCurTime, EnumMap<DataType, String> tMap, String colQuoteChar, boolean supportsRgk, String fetchRgkQuery, String tableListFilter)
-
-
Method Details
-
createTypeMap
-
getCurrentTimeQuery
Description copied from interface:DBTranslator
Returns a query that can be used to get the current database time.- Specified by:
getCurrentTimeQuery
in interfaceDBTranslator
-
quoteColumn
-
quoteColumn
-
getCreateCommand
- Specified by:
getCreateCommand
in interfaceDBTranslator
-
applyLimit
Description copied from interface:DBTranslator
Takes a SELECT query and applies the given limit to it, resulting in a select query with a limiting clause. If the incoming query already has a limit clause, the existing text will be used (that is, nothing further will be done).- Specified by:
applyLimit
in interfaceDBTranslator
-
getAlterCommand
- Specified by:
getAlterCommand
in interfaceDBTranslator
-
getCreateIndexCommand
- Specified by:
getCreateIndexCommand
in interfaceDBTranslator
-
getShortendName
-
getCreationDef
-
getSpecialtyDef
-
replaceToken
-
replaceTokens
-
getDataTypeKeyword
-
getColumnQuoteChar
Description copied from interface:DBTranslator
Returns the character that this driver uses to quote names in queries- Specified by:
getColumnQuoteChar
in interfaceDBTranslator
-
getFetchKeyQuery
Description copied from interface:DBTranslator
A query to be executed instead of using JDBC's built-in facility for obtaining auto-generated keys. Only used if supportsRGK is false. Takes the table name and column name in case the query needs to use them- it will depend on the database as to whether or not they are.- Specified by:
getFetchKeyQuery
in interfaceDBTranslator
-
isSupportsRGK
public boolean isSupportsRGK()- Specified by:
isSupportsRGK
in interfaceDBTranslator
- Returns:
- whether or not this driver supports returning generated keys on insert queries
-
getTableListFilter
Description copied from interface:DBTranslator
Returns a filter that will be used to narrow the list of tables returned from the database. A semi-colon separated list of simple patterns, like "apex_*;sys_info*"- Specified by:
getTableListFilter
in interfaceDBTranslator
-