public class VerticaDialect extends JdbcDialectImpl
Dialect
for the Vertica database.Dialect.DatabaseProduct, Dialect.Datatype
Modifier and Type | Field and Description |
---|---|
static JdbcDialectFactory |
FACTORY |
databaseProduct, permitsSelectNotInGroupBy, productVersion
Constructor and Description |
---|
VerticaDialect(Connection connection)
Creates a VerticaDialect.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsCountDistinctWithOtherAggs()
Returns whether this Dialect supports distinct
aggregations with other aggregations in the same query.
|
boolean |
allowsFromQuery()
Returns whether this Dialect allows a subquery in the from clause,
for example
SELECT * FROM (SELECT * FROM t) AS
x |
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.
|
Dialect.DatabaseProduct |
getDatabaseProduct()
Returns the database for this Dialect, or
Dialect.DatabaseProduct.UNKNOWN if the database is
not a common database. |
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.
|
boolean |
requiresAliasForFromQuery()
Returns whether this Dialect requires subqueries in the FROM clause
to have an alias.
|
boolean |
supportsMultiValueInExpr()
Returns true if this dialect supports multi-value IN expressions.
|
boolean |
supportsResultSetConcurrency(int type,
int concurrency)
Returns whether this Dialect supports the given concurrency type
in combination with the given result set type.
|
allowsAs, allowsCompoundCountDistinct, allowsCountDistinct, allowsDdl, allowsDialectSharing, allowsJoinOn, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, generateRegularExpression, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, supportsGroupingSets, supportsUnlimitedValueList, toString, toUpper
public static final JdbcDialectFactory FACTORY
public VerticaDialect(Connection connection) throws SQLException
connection
- ConnectionSQLException
public boolean requiresAliasForFromQuery()
Dialect
requiresAliasForFromQuery
in interface Dialect
requiresAliasForFromQuery
in class JdbcDialectImpl
Dialect.allowsFromQuery()
public boolean allowsFromQuery()
Dialect
SELECT * FROM (SELECT * FROM t) AS
x
allowsFromQuery
in interface Dialect
allowsFromQuery
in class JdbcDialectImpl
Dialect.requiresAliasForFromQuery()
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 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 allowsCountDistinctWithOtherAggs()
Dialect
allowsCountDistinctWithOtherAggs
in interface Dialect
allowsCountDistinctWithOtherAggs
in class JdbcDialectImpl
public boolean supportsResultSetConcurrency(int type, int concurrency)
Dialect
The result is similar to
DatabaseMetaData.supportsResultSetConcurrency(int, int)
,
except that the JdbcOdbc bridge in JDK 1.6 overstates its abilities.
See bug 1690406.
supportsResultSetConcurrency
in interface Dialect
supportsResultSetConcurrency
in class JdbcDialectImpl
type
- defined in ResultSet
concurrency
- type defined in ResultSet
true
if so; false
otherwisepublic String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
Dialect
For 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 Dialect
generateInline
in class JdbcDialectImpl
columnNames
- List of column namescolumnTypes
- List of column types ("String" or "Numeric")valueList
- List of rows valuespublic 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 boolean supportsMultiValueInExpr()
Dialect
WHERE (col1, col2) IN ((val1a, val2a), (val1b, val2b))
supportsMultiValueInExpr
in interface Dialect
supportsMultiValueInExpr
in class JdbcDialectImpl
Copyright © 2019 Hitachi Vantara. All rights reserved.