public class DerbyDialect extends JdbcDialectImpl
Dialect for the Apache Derby database.Dialect.DatabaseProduct, Dialect.Datatype| Modifier and Type | Field and Description |
|---|---|
static JdbcDialectFactory |
FACTORY |
databaseProduct, permitsSelectNotInGroupBy, productVersion| Constructor and Description |
|---|
DerbyDialect(Connection connection)
Creates a DerbyDialect.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsMultipleCountDistinct()
Returns whether this Dialect supports more than one distinct
aggregation in the same query.
|
String |
generateInline(List<String> columnNames,
List<String> columnTypes,
List<String[]> valueList)
Generates a SQL statement to represent an inline dataset.
|
protected void |
quoteDateLiteral(StringBuilder buf,
String value,
Date date)
Helper method for
JdbcDialectImpl.quoteDateLiteral(StringBuilder, String). |
boolean |
requiresAliasForFromQuery()
Returns whether this Dialect requires subqueries in the FROM clause
to have an alias.
|
boolean |
supportsGroupByExpressions()
Returns whether this Dialect supports expressions in the GROUP BY
clause.
|
allowsAs, allowsCompoundCountDistinct, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, generateRegularExpression, getDatabaseProduct, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, getType, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupingSets, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpperpublic static final JdbcDialectFactory FACTORY
public DerbyDialect(Connection connection) throws SQLException
connection - ConnectionSQLExceptionprotected void quoteDateLiteral(StringBuilder buf, String value, Date date)
JdbcDialectImplJdbcDialectImpl.quoteDateLiteral(StringBuilder, String).quoteDateLiteral in class JdbcDialectImplbuf - Buffer to append tovalue - Value as stringdate - Value as datepublic boolean requiresAliasForFromQuery()
DialectrequiresAliasForFromQuery in interface DialectrequiresAliasForFromQuery in class JdbcDialectImplDialect.allowsFromQuery()public boolean allowsMultipleCountDistinct()
DialectIn Derby 10.1,
select couunt(distinct x) from t
is OK, but
select couunt(distinct x), count(distinct y) from t
gives "Multiple DISTINCT aggregates are not supported at this time."allowsMultipleCountDistinct in interface DialectallowsMultipleCountDistinct in class JdbcDialectImplpublic String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
DialectFor example, for Oracle, generates
SELECT 1 AS FOO, 'a' AS BAR FROM dual UNION ALL SELECT 2 AS FOO, 'b' AS BAR FROM dual
For ANSI SQL, generates:
VALUES (1, 'a'), (2, 'b')
generateInline in interface DialectgenerateInline in class JdbcDialectImplcolumnNames - List of column namescolumnTypes - List of column types ("String" or "Numeric")valueList - List of rows valuespublic boolean supportsGroupByExpressions()
DialectsupportsGroupByExpressions in interface DialectsupportsGroupByExpressions in class JdbcDialectImplCopyright © 2021 Hitachi Vantara. All rights reserved.