public class MicrosoftSqlServerDialect extends JdbcDialectImpl
Dialect for the Microsoft SQL Server
database.Dialect.DatabaseProduct, Dialect.Datatype| Modifier and Type | Field and Description |
|---|---|
static JdbcDialectFactory |
FACTORY |
databaseProduct, permitsSelectNotInGroupBy, productVersion| Constructor and Description |
|---|
MicrosoftSqlServerDialect(Connection connection)
Creates a MicrosoftSqlServerDialect.
|
| Modifier and Type | Method and Description |
|---|---|
String |
generateInline(List<String> columnNames,
List<String> columnTypes,
List<String[]> valueList)
Generates a SQL statement to represent an inline dataset.
|
void |
quoteBooleanLiteral(StringBuilder buf,
String value)
Appends to a buffer a boolean literal.
|
protected void |
quoteDateLiteral(StringBuilder buf,
String value,
Date date)
Helper method for
JdbcDialectImpl.quoteDateLiteral(StringBuilder, String). |
protected void |
quoteTimestampLiteral(StringBuilder buf,
String value,
Timestamp timestamp) |
boolean |
requiresAliasForFromQuery()
Returns whether this Dialect requires subqueries in the FROM clause
to have an alias.
|
boolean |
requiresUnionOrderByOrdinal()
Returns true if this dialect allows only integers in the ORDER BY
clause of a UNION (or other set operation) query.
|
allowsAs, allowsCompoundCountDistinct, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, generateRegularExpression, getDatabaseProduct, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, getType, isDatabase, needsExponent, quote, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, supportsGroupByExpressions, supportsGroupingSets, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpperpublic static final JdbcDialectFactory FACTORY
public MicrosoftSqlServerDialect(Connection connection) throws SQLException
connection - ConnectionSQLExceptionpublic 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 boolean requiresAliasForFromQuery()
DialectrequiresAliasForFromQuery in interface DialectrequiresAliasForFromQuery in class JdbcDialectImplDialect.allowsFromQuery()public boolean requiresUnionOrderByOrdinal()
DialectFor example,
SELECT x, y + z FROM t
is allowed but
UNION ALL
SELECT x, y + z FROM t
ORDER BY 1, 2SELECT x, y, z FROM t
is not.
UNION ALL
SELECT x, y, z FROM t
ORDER BY x
Teradata is an example of a dialect with this restriction.
requiresUnionOrderByOrdinal in interface DialectrequiresUnionOrderByOrdinal in class JdbcDialectImplpublic void quoteBooleanLiteral(StringBuilder buf, String value)
DialectIn the default dialect, boolean literals are printed as is.
quoteBooleanLiteral in interface DialectquoteBooleanLiteral in class JdbcDialectImplbuf - Buffer to append tovalue - Literalprotected void quoteDateLiteral(StringBuilder buf, String value, Date date)
JdbcDialectImplJdbcDialectImpl.quoteDateLiteral(StringBuilder, String).quoteDateLiteral in class JdbcDialectImplbuf - Buffer to append tovalue - Value as stringdate - Value as dateprotected void quoteTimestampLiteral(StringBuilder buf, String value, Timestamp timestamp)
quoteTimestampLiteral in class JdbcDialectImplCopyright © 2021 Hitachi Vantara. All rights reserved.