Package org.eclnt.ccee.db.dofw
Class DOFWDialect
java.lang.Object
org.eclnt.ccee.db.dofw.DOFWDialect
- All Implemented Interfaces:
ICCEEConstants
Central management of DB syntax differences during automated creation
of SQL statements. Heavily used by class
DOFWSql
- but also may
be used by others.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface org.eclnt.ccee.ICCEEConstants
AND, ASC, AVG, BETWEEN, BRC, BRO, COUNT, DEFAULT_CONTEXT, DESC, FUNCTIONRESULT, GREATER, GREATEREQUAL, IN, IS, ISNOT, LIKE, LL_DBG, LL_ERR, LL_INF, LL_WAR, LOWER, LOWEREQUAL, MAX, MIN, NULL, OR, ORDERBY, QPFUNCTION_LOWER, QPFUNCTION_UPPER, SUM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
adaptTableCreationStatement
(String contextName, String sql) Processed when runningDBCreateTables
.static void
approveDialectIsOK
(String dialect) static boolean
checkIfRangeSelectionIsSupported
(String contextName) The query for ranges (i.e. with top and offset definition) is not supported by all databases.static boolean
checkIfUUIDIsRepresentedAsString
(String contextName) Some databases do not support UUID objects.static String
findSqlDialect
(String contextName) Central method for finding the dialect for a context.static boolean
getAutoIncrementGetValueSupported
(String contextName) static String
getColumnNameSurrounder
(String contextName) Some DB systems require column names to be written into special surrounding characters.static String
getFixColumnNameForAutoIncrementedColumns
(String contextName) When executing an INSERT into the database then the value of auto-generated columns is transferred back into the data object.static int
getSelectTopVariant
(String contextName) static String
getTableNameSurrounder
(String contextName) Some DB systems require table names to be written into special surrounding characters.static String
updateColumnNameForTextConversion
(String contextName, String columnName)
-
Field Details
-
DIALECT_POSTGRES
- See Also:
-
DIALECT_MSSQL
- See Also:
-
DIALECT_ORACLE
- See Also:
-
DIALECT_ORACLE_CASESENSITIVE
- See Also:
-
DIALECT_MYSQL
- See Also:
-
DIALECT_SYBASE
- See Also:
-
DIALECT_HSQLDB
- See Also:
-
ALL_DIALECTS
-
-
Constructor Details
-
DOFWDialect
public DOFWDialect()
-
-
Method Details
-
getSelectTopVariant
-
updateColumnNameForTextConversion
-
approveDialectIsOK
-
getColumnNameSurrounder
Some DB systems require column names to be written into special surrounding characters. E.g. if using case sensitive column names with Oracle, then they have to be put into "\""... -
getTableNameSurrounder
Some DB systems require table names to be written into special surrounding characters. E.g. if using case sensitive table names with Oracle, then they have to be put into "\""... -
checkIfUUIDIsRepresentedAsString
Some databases do not support UUID objects. In this case UUID values have to be explicitly converted to their String representation before passing them into the DB processing. -
getFixColumnNameForAutoIncrementedColumns
When executing an INSERT into the database then the value of auto-generated columns is transferred back into the data object. For this reason a result set is analyzed that is passed back. The column name of the key column in this result set typically is the real column name of the corresponding column - but in some cases is a different other one... -
getAutoIncrementGetValueSupported
-
adaptTableCreationStatement
Processed when runningDBCreateTables
. -
findSqlDialect
Central method for finding the dialect for a context. -
checkIfRangeSelectionIsSupported
The query for ranges (i.e. with top and offset definition) is not supported by all databases. Here you can check if the current database supports querying for ranges.
-