public class GoogleBigQueryDialect extends JdbcDialectImpl
Dialect.DatabaseProduct, Dialect.Datatype| Modifier and Type | Field and Description |
|---|---|
static JdbcDialectFactory |
FACTORY |
databaseProduct, permitsSelectNotInGroupBy, productVersion| Constructor and Description |
|---|
GoogleBigQueryDialect(Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsAs()
Returns whether the SQL dialect allows "AS" in the FROM clause.
|
boolean |
allowsDdl()
Returns whether this dialect supports common SQL Data Definition
Language (DDL) statements such as
CREATE TABLE and
DROP INDEX. |
boolean |
allowsOrderByAlias()
Returns true if aliases defined in the SELECT clause can be used as
expressions in the ORDER BY clause.
|
boolean |
allowsRegularExpressionInWhereClause()
Informs Mondrian if the dialect supports regular expressions
when creating the 'where' or the 'having' clause.
|
String |
generateInline(List<String> columnNames,
List<String> columnTypes,
List<String[]> valueList)
Generates a SQL statement to represent an inline dataset.
|
String |
generateRegularExpression(String source,
String javaRegex)
Must generate a String representing a regular expression match
operation between a string literal and a Java regular expression.
|
void |
quoteIdentifier(String val,
StringBuilder buf)
Appends to a buffer an identifier, quoted appropriately for this
Dialect.
|
void |
quoteStringLiteral(StringBuilder buf,
String s)
Appends to a buffer a single-quoted SQL string.
|
boolean |
supportsResultSetConcurrency(int type,
int concurrency)
Returns whether this Dialect supports the given concurrency type
in combination with the given result set type.
|
allowsCompoundCountDistinct, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, getDatabaseProduct, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, getType, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresAliasForFromQuery, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, supportsGroupingSets, supportsMultiValueInExpr, supportsUnlimitedValueList, toString, toUpperpublic static final JdbcDialectFactory FACTORY
public GoogleBigQueryDialect(Connection connection) throws SQLException
SQLExceptionpublic 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 allowsAs()
DialectallowsAs in interface DialectallowsAs in class JdbcDialectImplpublic boolean allowsDdl()
DialectCREATE TABLE and
DROP INDEX.
Access seems to allow DDL iff the .mdb file is writeable.
allowsDdl in interface DialectallowsDdl in class JdbcDialectImplDatabaseMetaData.isReadOnly()public boolean supportsResultSetConcurrency(int type,
int concurrency)
DialectThe 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 DialectsupportsResultSetConcurrency in class JdbcDialectImpltype - defined in ResultSetconcurrency - type defined in ResultSettrue if so; false otherwisepublic String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
DialectFor 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 DialectgenerateInline in class JdbcDialectImplcolumnNames - List of column namescolumnTypes - List of column types ("String" or "Numeric")valueList - List of rows valuespublic void quoteIdentifier(String val, StringBuilder buf)
DialectquoteIdentifier in interface DialectquoteIdentifier in class JdbcDialectImplval - identifier to quote (must not be null).buf - Bufferpublic 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 boolean allowsRegularExpressionInWhereClause()
DialectallowsRegularExpressionInWhereClause in interface DialectallowsRegularExpressionInWhereClause in class JdbcDialectImplpublic String generateRegularExpression(String source, String javaRegex)
DialectPostgres / Greenplum example:
generateRegularExpression(
"'foodmart'.'customer_name'", "(?i).*oo.*") ->
'foodmart'.'customer_name' ~ "(?i).*oo.*"
Oracle example:
generateRegularExpression(
"'foodmart'.'customer_name'", ".*oo.*") ->
REGEXP_LIKE('foodmart'.'customer_name', ".*oo.*")
Dialects are allowed to return null if the dialect cannot convert that particular regular expression into something that the database would support.
generateRegularExpression in interface DialectgenerateRegularExpression in class JdbcDialectImplsource - A String identifying the column to match against.javaRegex - A Java regular expression to match against.Copyright © 2021 Hitachi Vantara. All rights reserved.