public class MonetDbDialect extends JdbcDialectImpl
Dialect for the MonetDB database.Dialect.DatabaseProduct, Dialect.Datatype| Modifier and Type | Field and Description |
|---|---|
static JdbcDialectFactory |
FACTORY |
databaseProduct, permitsSelectNotInGroupBy, productVersion| Constructor and Description |
|---|
MonetDbDialect() |
MonetDbDialect(Connection connection)
Creates a MonetDbDialect.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsCompoundCountDistinct()
Returns whether this Dialect allows multiple arguments to the
COUNT(DISTINCT ...) aggregate function, for example
|
boolean |
allowsCountDistinct()
Returns whether this Dialect supports distinct aggregations.
|
boolean |
allowsCountDistinctWithOtherAggs()
Returns whether this Dialect supports distinct
aggregations with other aggregations in the same query.
|
boolean |
allowsMultipleCountDistinct()
Returns whether this Dialect supports more than one distinct
aggregation in the same query.
|
boolean |
allowsMultipleDistinctSqlMeasures()
Returns whether this Dialect has performant support of distinct SQL
measures in the same query.
|
int |
compareVersions(String v1,
String v2)
Compares two MonetDB versions that contain only digits separated by dots.
|
SqlStatement.Type |
getType(ResultSetMetaData metaData,
int columnIndex)
Chooses the most appropriate type for accessing the values of a
column in a result set for a dialect.
|
void |
quoteStringLiteral(StringBuilder buf,
String s)
Appends to a buffer a single-quoted SQL 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, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateCountExpression, generateInline, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, generateRegularExpression, getDatabaseProduct, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupingSets, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpperpublic static final JdbcDialectFactory FACTORY
public MonetDbDialect(Connection connection) throws SQLException
connection - ConnectionSQLException - on errorpublic MonetDbDialect()
public boolean allowsMultipleDistinctSqlMeasures()
DialectallowsMultipleDistinctSqlMeasures in interface DialectallowsMultipleDistinctSqlMeasures in class JdbcDialectImplpublic boolean allowsCountDistinct()
DialectFor example, Access does not allow
select count(distinct x) from t
allowsCountDistinct in interface DialectallowsCountDistinct in class JdbcDialectImplpublic boolean allowsCountDistinctWithOtherAggs()
DialectallowsCountDistinctWithOtherAggs in interface DialectallowsCountDistinctWithOtherAggs in class JdbcDialectImplpublic 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 boolean requiresAliasForFromQuery()
DialectrequiresAliasForFromQuery in interface DialectrequiresAliasForFromQuery in class JdbcDialectImplDialect.allowsFromQuery()public boolean allowsCompoundCountDistinct()
DialectCOUNT(DISTINCT ...) aggregate function, for example
SELECT COUNT(DISTINCT x, y) FROM t
allowsCompoundCountDistinct in interface DialectallowsCompoundCountDistinct in class JdbcDialectImplDialect.allowsCountDistinct(),
Dialect.allowsMultipleCountDistinct()public boolean supportsGroupByExpressions()
DialectsupportsGroupByExpressions in interface DialectsupportsGroupByExpressions in class JdbcDialectImplpublic void quoteStringLiteral(StringBuilder buf, String s)
DialectFor example, in the default dialect,
quoteStringLiteral(buf, "Can't") appends
"'Can''t'" to buf.
quoteStringLiteral in interface DialectquoteStringLiteral in class JdbcDialectImplbuf - Buffer to append tos - Literalpublic SqlStatement.Type getType(ResultSetMetaData metaData, int columnIndex) throws SQLException
DialectChooses the most appropriate type for accessing the values of a column in a result set for a dialect.
Dialect-specific nuances involving type representation should be encapsulated in implementing methods. For example, if a dialect has implicit rules involving scale or precision, they should be handled within this method so the client can simply retrieve the "best fit" SqlStatement.Type for the column.
getType in interface DialectgetType in class JdbcDialectImplmetaData - Results set metadatacolumnIndex - Column ordinal (0-based)SQLExceptionpublic int compareVersions(String v1, String v2)
Examples of MonetDB versions:
11.17.17
11.5.3
v1 - the first version be comparedv2 - the second version to be comparedCopyright © 2021 Hitachi Vantara. All rights reserved.