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 Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected LimitPositionprotected intprotected Stringprotected Stringprotected booleanprotected 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 StringgetCreationDef(ColumnList columns) Returns a query that can be used to get the current database time.protected StringgetDataTypeKeyword(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 StringgetShortendName(String name) protected StringgetSpecialtyDef(String tokenVal, String definition, String token) Returns a filter that will be used to narrow the list of tables returned from the database.booleanquoteColumn(Column col) quoteColumn(String col) protected StringreplaceToken(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:DBTranslatorReturns a query that can be used to get the current database time.- Specified by:
getCurrentTimeQueryin interfaceDBTranslator
-
quoteColumn
-
quoteColumn
-
getCreateCommand
- Specified by:
getCreateCommandin interfaceDBTranslator
-
applyLimit
Description copied from interface:DBTranslatorTakes 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:
applyLimitin interfaceDBTranslator
-
getAlterCommand
- Specified by:
getAlterCommandin interfaceDBTranslator
-
getCreateIndexCommand
- Specified by:
getCreateIndexCommandin interfaceDBTranslator
-
getShortendName
-
getCreationDef
-
getSpecialtyDef
-
replaceToken
-
replaceTokens
-
getDataTypeKeyword
-
getColumnQuoteChar
Description copied from interface:DBTranslatorReturns the character that this driver uses to quote names in queries- Specified by:
getColumnQuoteCharin interfaceDBTranslator
-
getFetchKeyQuery
Description copied from interface:DBTranslatorA 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:
getFetchKeyQueryin interfaceDBTranslator
-
isSupportsRGK
public boolean isSupportsRGK()- Specified by:
isSupportsRGKin interfaceDBTranslator- Returns:
- whether or not this driver supports returning generated keys on insert queries
-
getTableListFilter
Description copied from interface:DBTranslatorReturns 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:
getTableListFilterin interfaceDBTranslator
-