public class RedshiftDialect extends PostgreSqlDialect
Dialect.DatabaseProduct, Dialect.Datatype| Modifier and Type | Field and Description | 
|---|---|
static JdbcDialectFactory | 
FACTORY  | 
databaseProduct, permitsSelectNotInGroupBy, productVersion| Constructor and Description | 
|---|
RedshiftDialect(Connection connection)
Creates a RedshiftDialect. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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 javaRegExp)
Must generate a String representing a regular expression match
 operation between a string literal and a Java regular expression. 
 | 
Dialect.DatabaseProduct | 
getDatabaseProduct()
Returns the database for this Dialect, or
  
Dialect.DatabaseProduct.UNKNOWN if the database is
 not a common database. | 
void | 
quoteStringLiteral(StringBuilder buf,
                  String value)
Appends to a buffer a single-quoted SQL string. 
 | 
generateOrderByNulls, getType, requiresAliasForFromQueryallowsAs, allowsCompoundCountDistinct, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNullsAnsi, generateOrderItem, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteTimeLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, supportsGroupingSets, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpperpublic static final JdbcDialectFactory FACTORY
public RedshiftDialect(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 PostgreSqlDialectpublic 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 quoteStringLiteral(StringBuilder buf, String value)
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 tovalue - Literalpublic boolean allowsRegularExpressionInWhereClause()
DialectallowsRegularExpressionInWhereClause in interface DialectallowsRegularExpressionInWhereClause in class PostgreSqlDialectpublic String generateRegularExpression(String source, String javaRegExp)
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 PostgreSqlDialectsource - A String identifying the column to match against.javaRegExp - A Java regular expression to match against.Copyright © 2017 Hitachi Vantara. All rights reserved.