public class InfobrightDialect extends MySqlDialect
Dialect for the Infobright database.Dialect.DatabaseProduct, Dialect.Datatype| Modifier and Type | Field and Description |
|---|---|
static JdbcDialectFactory |
FACTORY |
databaseProduct, permitsSelectNotInGroupBy, productVersion| Constructor and Description |
|---|
InfobrightDialect(Connection connection)
Creates an InfobrightDialect.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsCompoundCountDistinct()
Returns whether this Dialect allows multiple arguments to the
COUNT(DISTINCT ...) aggregate function, for example
|
boolean |
allowsOrderByAlias()
Returns true if aliases defined in the SELECT clause can be used as
expressions in the ORDER BY clause.
|
String |
generateOrderItem(String expr,
boolean nullable,
boolean ascending,
boolean collateNullsLast)
Generates an item for an ORDER BY clause, sorting in the required
direction, and ensuring that NULL values collate either before or after
all non-NULL values, depending on the
collateNullsLast
parameter. |
Dialect.DatabaseProduct |
getDatabaseProduct()
Returns the database for this Dialect, or
Dialect.DatabaseProduct.UNKNOWN if the database is
not a common database. |
boolean |
requiresGroupByAlias()
Returns true if this Dialect can include expressions in the GROUP BY
clause only by adding an expression to the SELECT clause and using
its alias.
|
boolean |
requiresOrderByAlias()
Required for MySQL 5.7+, where SQL_MODE include ONLY_FULL_GROUP_BY
by default.
|
boolean |
supportsGroupByExpressions()
Returns whether this Dialect supports expressions in the GROUP BY
clause.
|
boolean |
supportsMultiValueInExpr()
Returns true if this dialect supports multi-value IN expressions.
|
allowsFromQuery, allowsRegularExpressionInWhereClause, appendHintsAfterFromClause, deduceIdentifierQuoteString, deduceProductName, deduceSupportsSelectNotInGroupBy, generateInline, generateOrderByNulls, generateRegularExpression, isInfobright, quoteBooleanLiteral, quoteStringLiteral, requiresAliasForFromQuery, requiresHavingAliasallowsAs, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsSelectNotInGroupBy, caseWhenElse, computeStatisticsProviders, deduceMaxColumnNameLength, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, extractEmbeddedFlags, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNullsAnsi, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, getType, isDatabase, needsExponent, quote, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupingSets, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpperpublic static final JdbcDialectFactory FACTORY
public InfobrightDialect(Connection connection) throws SQLException
connection - ConnectionSQLExceptionpublic Dialect.DatabaseProduct getDatabaseProduct()
DialectDialect.DatabaseProduct.UNKNOWN if the database is
not a common database.getDatabaseProduct in interface DialectgetDatabaseProduct in class JdbcDialectImplpublic boolean allowsCompoundCountDistinct()
DialectCOUNT(DISTINCT ...) aggregate function, for example
SELECT COUNT(DISTINCT x, y) FROM t
allowsCompoundCountDistinct in interface DialectallowsCompoundCountDistinct in class MySqlDialectDialect.allowsCountDistinct(),
Dialect.allowsMultipleCountDistinct()public String generateOrderItem(String expr, boolean nullable, boolean ascending, boolean collateNullsLast)
DialectcollateNullsLast
parameter.generateOrderItem in interface DialectgenerateOrderItem in class JdbcDialectImplexpr - Expressionnullable - Whether expression may have NULL valuesascending - Whether to sort expression ascendingcollateNullsLast - Whether the null values should be sorted first
or last.public boolean supportsGroupByExpressions()
DialectsupportsGroupByExpressions in interface DialectsupportsGroupByExpressions in class JdbcDialectImplpublic boolean requiresGroupByAlias()
DialectFor example, in such a dialect,
SELECT x, x FROM t GROUP BY x
would be illegal, but
SELECT x AS a, x AS b FROM t ORDER BY a, b
would be legal.
Infobright is the only such dialect.
requiresGroupByAlias in interface DialectrequiresGroupByAlias in class JdbcDialectImplpublic boolean allowsOrderByAlias()
DialectFor example, in such a dialect,
SELECT x, x + y AS z FROM t ORDER BY z
would be legal.
MySQL, DB2 and Ingres are examples of dialects where this is true; Access is a dialect where this is false.
allowsOrderByAlias in interface DialectallowsOrderByAlias in class JdbcDialectImplpublic boolean requiresOrderByAlias()
MySqlDialectrequiresOrderByAlias in interface DialectrequiresOrderByAlias in class MySqlDialectpublic boolean supportsMultiValueInExpr()
DialectWHERE (col1, col2) IN ((val1a, val2a), (val1b, val2b))supportsMultiValueInExpr in interface DialectsupportsMultiValueInExpr in class MySqlDialectCopyright © 2021 Hitachi Vantara. All rights reserved.