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, 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, toUpper
public static final JdbcDialectFactory FACTORY
public MonetDbDialect(Connection connection) throws SQLException
connection
- ConnectionSQLException
- on errorpublic MonetDbDialect()
public boolean allowsMultipleDistinctSqlMeasures()
Dialect
allowsMultipleDistinctSqlMeasures
in interface Dialect
allowsMultipleDistinctSqlMeasures
in class JdbcDialectImpl
public boolean allowsCountDistinct()
Dialect
For example, Access does not allow
select count(distinct x) from t
allowsCountDistinct
in interface Dialect
allowsCountDistinct
in class JdbcDialectImpl
public boolean allowsCountDistinctWithOtherAggs()
Dialect
allowsCountDistinctWithOtherAggs
in interface Dialect
allowsCountDistinctWithOtherAggs
in class JdbcDialectImpl
public boolean allowsMultipleCountDistinct()
Dialect
In 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 Dialect
allowsMultipleCountDistinct
in class JdbcDialectImpl
public boolean requiresAliasForFromQuery()
Dialect
requiresAliasForFromQuery
in interface Dialect
requiresAliasForFromQuery
in class JdbcDialectImpl
Dialect.allowsFromQuery()
public boolean allowsCompoundCountDistinct()
Dialect
COUNT(DISTINCT ...) aggregate function, for example
SELECT COUNT(DISTINCT x, y) FROM t
allowsCompoundCountDistinct
in interface Dialect
allowsCompoundCountDistinct
in class JdbcDialectImpl
Dialect.allowsCountDistinct()
,
Dialect.allowsMultipleCountDistinct()
public boolean supportsGroupByExpressions()
Dialect
supportsGroupByExpressions
in interface Dialect
supportsGroupByExpressions
in class JdbcDialectImpl
public void quoteStringLiteral(StringBuilder buf, String s)
Dialect
For example, in the default dialect,
quoteStringLiteral(buf, "Can't")
appends
"'Can''t'
" to buf
.
quoteStringLiteral
in interface Dialect
quoteStringLiteral
in class JdbcDialectImpl
buf
- Buffer to append tos
- Literalpublic SqlStatement.Type getType(ResultSetMetaData metaData, int columnIndex) throws SQLException
Dialect
Chooses 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 Dialect
getType
in class JdbcDialectImpl
metaData
- Results set metadatacolumnIndex
- Column ordinal (0-based)SQLException
public 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 © 2019 Hitachi Vantara. All rights reserved.