Class DB2Dialect
- java.lang.Object
-
- org.dashbuilder.dataprovider.sql.dialect.DefaultDialect
-
- org.dashbuilder.dataprovider.sql.dialect.DB2Dialect
-
- All Implemented Interfaces:
Dialect
public class DB2Dialect extends DefaultDialect
-
-
Field Summary
Fields Modifier and Type Field Description static StringPATTERN_DAYstatic StringPATTERN_HOURstatic StringPATTERN_MINUTEstatic StringPATTERN_MONTHstatic StringPATTERN_SECONDstatic StringPATTERN_YEAR
-
Constructor Summary
Constructors Constructor Description DB2Dialect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetConcatFunctionSQL(Column[] columns)StringgetDynamicDateColumnSQL(DynamicDateColumn column)The text conversion of a date column is very DB specific.StringgetOffsetLimitSQL(Select select)StringgetSQL(Select select)-
Methods inherited from class org.dashbuilder.dataprovider.sql.dialect.DefaultDialect
_getLogicalExprConditionSQL, allowAliasInStatements, areEquals, convertToDate, convertToDouble, convertToString, getAliasForColumnSQL, getAliasForStatementSQL, getAliasStatement, getAndExprConditionSQL, getBetweenConditionSQL, getColumnCastSQL, getColumnFunctionSQL, getColumnNameQuotedSQL, getColumnNameSQL, getColumnSQL, getColumnTypeSQL, getConcatFunctionSQL, getConditionSQL, getCoreConditionSQL, getCountQuerySQL, getDateParameterSQL, getDatePartFunctionSQL, getDeleteStatement, getExcludedColumns, getFixedDateColumnSQL, getFromSQL, getFromStatement, getFunctionColumnSQL, getGreaterOrEqualsConditionSQL, getGreaterThanConditionSQL, getGroupBySQL, getGroupByStatement, getInConditionSQL, getInsertStatement, getIsEqualsToConditionSQL, getIsNullConditionSQL, getLikeToConditionSQL, getLogicalConditionSQL, getLowerFunctionSQL, getLowerOrEqualsConditionSQL, getLowerThanConditionSQL, getNotEqualsToConditionSQL, getNotExprConditionSQL, getNotInConditionSQL, getNotNullConditionSQL, getNumberParameterSQL, getOrderBySQL, getOrderByStatement, getOrExprConditionSQL, getParameterSQL, getSchemaNameSQL, getSelectSQL, getSelectStatement, getSimpleColumnSQL, getSortColumnSQL, getSortOrderSQL, getSQL, getSQL, getSQL, getStringParameterSQL, getTableNameSQL, getTableSQL, getWhereSQL, getWhereSQL, getWhereStatement, getWhereStatement, invokeMethod, toChar
-
-
-
-
Field Detail
-
PATTERN_YEAR
public static final String PATTERN_YEAR
- See Also:
- Constant Field Values
-
PATTERN_MONTH
public static final String PATTERN_MONTH
- See Also:
- Constant Field Values
-
PATTERN_DAY
public static final String PATTERN_DAY
- See Also:
- Constant Field Values
-
PATTERN_HOUR
public static final String PATTERN_HOUR
- See Also:
- Constant Field Values
-
PATTERN_MINUTE
public static final String PATTERN_MINUTE
- See Also:
- Constant Field Values
-
PATTERN_SECOND
public static final String PATTERN_SECOND
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConcatFunctionSQL
public String getConcatFunctionSQL(Column[] columns)
- Specified by:
getConcatFunctionSQLin interfaceDialect- Overrides:
getConcatFunctionSQLin classDefaultDialect
-
getDynamicDateColumnSQL
public String getDynamicDateColumnSQL(DynamicDateColumn column)
Description copied from class:DefaultDialectThe text conversion of a date column is very DB specific. A mechanism combining concat and extract functions is used by default. Depending on the DB dialect a more polished approach can be used. For instance,- In Oracle and Postgres the 'to_char' function is used.
- In Mysql, 'date_format'
- In H2, the 'to_char' function is not used as it's only available since version 1.3.175 and we do need to support older versions.
- Specified by:
getDynamicDateColumnSQLin interfaceDialect- Overrides:
getDynamicDateColumnSQLin classDefaultDialect
-
getSQL
public String getSQL(Select select)
- Specified by:
getSQLin interfaceDialect- Overrides:
getSQLin classDefaultDialect
-
getOffsetLimitSQL
public String getOffsetLimitSQL(Select select)
- Specified by:
getOffsetLimitSQLin interfaceDialect- Overrides:
getOffsetLimitSQLin classDefaultDialect
-
-