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, requiresHavingAlias
allowsAs, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsSelectNotInGroupBy, caseWhenElse, computeStatisticsProviders, deduceMaxColumnNameLength, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, 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, toUpper
public static final JdbcDialectFactory FACTORY
public InfobrightDialect(Connection connection) throws SQLException
connection
- ConnectionSQLException
public Dialect.DatabaseProduct getDatabaseProduct()
Dialect
Dialect.DatabaseProduct.UNKNOWN
if the database is
not a common database.getDatabaseProduct
in interface Dialect
getDatabaseProduct
in class JdbcDialectImpl
public boolean allowsCompoundCountDistinct()
Dialect
COUNT(DISTINCT ...) aggregate function, for example
SELECT COUNT(DISTINCT x, y) FROM t
allowsCompoundCountDistinct
in interface Dialect
allowsCompoundCountDistinct
in class MySqlDialect
Dialect.allowsCountDistinct()
,
Dialect.allowsMultipleCountDistinct()
public String generateOrderItem(String expr, boolean nullable, boolean ascending, boolean collateNullsLast)
Dialect
collateNullsLast
parameter.generateOrderItem
in interface Dialect
generateOrderItem
in class JdbcDialectImpl
expr
- 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()
Dialect
supportsGroupByExpressions
in interface Dialect
supportsGroupByExpressions
in class JdbcDialectImpl
public boolean requiresGroupByAlias()
Dialect
For 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 Dialect
requiresGroupByAlias
in class JdbcDialectImpl
public boolean allowsOrderByAlias()
Dialect
For 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 Dialect
allowsOrderByAlias
in class JdbcDialectImpl
public boolean requiresOrderByAlias()
MySqlDialect
requiresOrderByAlias
in interface Dialect
requiresOrderByAlias
in class MySqlDialect
public boolean supportsMultiValueInExpr()
Dialect
WHERE (col1, col2) IN ((val1a, val2a), (val1b, val2b))
supportsMultiValueInExpr
in interface Dialect
supportsMultiValueInExpr
in class MySqlDialect
Copyright © 2020 Hitachi Vantara. All rights reserved.