Class PostgresDialect
- java.lang.Object
-
- org.dashbuilder.dataprovider.sql.dialect.DefaultDialect
-
- org.dashbuilder.dataprovider.sql.dialect.PostgresDialect
-
- All Implemented Interfaces:
Dialect
public class PostgresDialect 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 PostgresDialect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowAliasInStatements()StringgetAliasForColumnSQL(String alias)StringgetAliasForStatementSQL(String alias)StringgetDynamicDateColumnSQL(DynamicDateColumn column)The text conversion of a date column is very DB specific.-
Methods inherited from class org.dashbuilder.dataprovider.sql.dialect.DefaultDialect
_getLogicalExprConditionSQL, areEquals, convertToDate, convertToDouble, convertToString, getAliasStatement, getAndExprConditionSQL, getBetweenConditionSQL, getColumnCastSQL, getColumnFunctionSQL, getColumnNameQuotedSQL, getColumnNameSQL, getColumnSQL, getColumnTypeSQL, getConcatFunctionSQL, 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, getOffsetLimitSQL, getOrderBySQL, getOrderByStatement, getOrExprConditionSQL, getParameterSQL, getSchemaNameSQL, getSelectSQL, getSelectStatement, getSimpleColumnSQL, getSortColumnSQL, getSortOrderSQL, getSQL, 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
-
allowAliasInStatements
public boolean allowAliasInStatements()
- Overrides:
allowAliasInStatementsin classDefaultDialect
-
getAliasForColumnSQL
public String getAliasForColumnSQL(String alias)
- Specified by:
getAliasForColumnSQLin interfaceDialect- Overrides:
getAliasForColumnSQLin classDefaultDialect
-
getAliasForStatementSQL
public String getAliasForStatementSQL(String alias)
- Specified by:
getAliasForStatementSQLin interfaceDialect- Overrides:
getAliasForStatementSQLin 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
-
-