Class SQLServerDialect
- java.lang.Object
-
- org.dashbuilder.dataprovider.sql.dialect.DefaultDialect
-
- org.dashbuilder.dataprovider.sql.dialect.SQLServerDialect
-
- All Implemented Interfaces:
Dialect
public class SQLServerDialect extends DefaultDialect
Microsoft SQL Server dialect
-
-
Constructor Summary
Constructors Constructor Description SQLServerDialect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Column>fetchColumns(Select select)StringgetColumnTypeSQL(Column column)StringgetConcatFunctionSQL(Column[] columns)StringgetCountQuerySQL(Select select)StringgetDateParameterSQL(Date param)StringgetDatePartFunctionSQL(String part, Column column)StringgetOffsetLimitSQL(Select select)StringgetSelectStatement(Select select)StringgetSQL(Select select)Since SQL Server 2012 pagination queries are resolved as follows: 1. offset <= 0 limit > 0-
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, getConcatFunctionSQL, getConditionSQL, getCoreConditionSQL, getDeleteStatement, getDynamicDateColumnSQL, 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, getSimpleColumnSQL, getSortColumnSQL, getSortOrderSQL, getSQL, getSQL, getSQL, getStringParameterSQL, getTableNameSQL, getTableSQL, getWhereSQL, getWhereSQL, getWhereStatement, getWhereStatement, invokeMethod, toChar
-
-
-
-
Method Detail
-
getColumnTypeSQL
public String getColumnTypeSQL(Column column)
- Specified by:
getColumnTypeSQLin interfaceDialect- Overrides:
getColumnTypeSQLin classDefaultDialect
-
getConcatFunctionSQL
public String getConcatFunctionSQL(Column[] columns)
- Specified by:
getConcatFunctionSQLin interfaceDialect- Overrides:
getConcatFunctionSQLin classDefaultDialect
-
getDatePartFunctionSQL
public String getDatePartFunctionSQL(String part, Column column)
- Specified by:
getDatePartFunctionSQLin interfaceDialect- Overrides:
getDatePartFunctionSQLin classDefaultDialect
-
getDateParameterSQL
public String getDateParameterSQL(Date param)
- Specified by:
getDateParameterSQLin interfaceDialect- Overrides:
getDateParameterSQLin classDefaultDialect
-
getCountQuerySQL
public String getCountQuerySQL(Select select)
- Specified by:
getCountQuerySQLin interfaceDialect- Overrides:
getCountQuerySQLin classDefaultDialect
-
getSQL
public String getSQL(Select select)
Since SQL Server 2012 pagination queries are resolved as follows:- 1. offset <= 0 limit > 0
- 2. offset > 0 limit > 0
SELECT TOP limit * FROM "EXPENSE_REPORTS"
SELECT * FROM "EXPENSE_REPORTS" ORDER BY DEPARTMENT OFFSET offset ROWS FETCH NEXT limit ROWS ONLY
This second case requires a mandatory order by clause.
- Specified by:
getSQLin interfaceDialect- Overrides:
getSQLin classDefaultDialect
-
getSelectStatement
public String getSelectStatement(Select select)
- Specified by:
getSelectStatementin interfaceDialect- Overrides:
getSelectStatementin classDefaultDialect
-
getOffsetLimitSQL
public String getOffsetLimitSQL(Select select)
- Specified by:
getOffsetLimitSQLin interfaceDialect- Overrides:
getOffsetLimitSQLin classDefaultDialect
-
-