@Translator(name="jdbc-ansi", description="JDBC ANSI translator, can used with any ANSI compatible JDBC Driver") public class JDBCExecutionFactory extends ExecutionFactory<DataSource,Connection>
| Modifier and Type | Class and Description |
|---|---|
static class |
JDBCExecutionFactory.StructRetrieval |
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_DEPENDENT_PREDICATES |
static int |
DEFAULT_MAX_IN_CRITERIA |
static TimeZone |
DEFAULT_TIME_ZONE |
protected SQLDialect |
dialect |
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS| Constructor and Description |
|---|
JDBCExecutionFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addSourceComment()
Returns true to indicate that SQL should include a comment
indicating the session and request ids.
|
protected void |
afterInitialConnectionObtained(Connection connection)
Called exactly once for this source.
|
void |
bindValue(PreparedStatement stmt,
Object param,
Class<?> paramType,
int i)
Sets prepared statement parameter i with param.
|
void |
closeConnection(Connection connection,
DataSource factory) |
protected Object |
convertObject(Object object) |
ProcedureExecution |
createDirectExecution(List<Argument> arguments,
Command command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
Connection conn) |
protected JDBCMetadataProcessor |
createMetadataProcessor()
Deprecated.
|
ProcedureExecution |
createProcedureExecution(Call command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
Connection conn) |
ResultSetExecution |
createResultSetExecution(QueryExpression command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
Connection conn) |
String |
createTempTable(String prefix,
List<ColumnReference> cols,
ExecutionContext context,
Connection connection)
Create a temp table with the given name prefix and columns
|
JDBCUpdateExecution |
createUpdateExecution(Command command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
Connection conn) |
ResultSet |
executeStoredProcedure(CallableStatement statement,
List<Argument> preparedValues,
Class<?> returnType)
This is a generic implementation.
|
String |
formatDateValue(Date dateObject)
Format the dateObject (of type date, time, or timestamp) into a string
using the DatabaseTimeZone.
|
String |
formatDateValue(Date dateObject,
boolean useTimezone)
Format the dateObject (of type date, time, or timestamp) into a string
optionally using the DatabaseTimeZone.
|
String |
getCommentFormat() |
Connection |
getConnection(DataSource ds) |
String |
getCreateTemporaryTablePostfix(boolean inTransaction) |
String |
getCreateTemporaryTableString(boolean inTransaction) |
String |
getCreateTempTableSQL(String name,
List<ColumnReference> cols,
boolean transactional) |
Calendar |
getDatabaseCalendar()
Gets the database calendar.
|
String |
getDatabaseTimeZone() |
String |
getDatabaseVersion() |
ExecutionFactory.NullOrder |
getDefaultNullOrder() |
List<String> |
getDefaultSupportedFunctions() |
SQLDialect |
getDialect() |
Map<String,FunctionModifier> |
getFunctionModifiers()
Return a map of function name to FunctionModifier.
|
String |
getHibernateDialectClassName() |
String |
getLateralKeyword() |
String |
getLikeRegexString()
Get the predicate name for LIKE_REGEX
|
int |
getMaxPreparedInsertBatchSize()
Get the max number of inserts to perform in one batch.
|
void |
getMetadata(MetadataFactory metadataFactory,
Connection conn) |
MetadataProcessor<Connection> |
getMetadataProcessor() |
String |
getRemovePushdownCharacters() |
String |
getSetOperationString(SetQuery.Operation operation)
Returns the name for a given
SetQuery.Operation |
String |
getSourceComment(ExecutionContext context,
Command command)
Returns the source comment for the given command
|
SQLConversionVisitor |
getSQLConversionVisitor()
Create the
SQLConversionVisitor that will perform translation. |
JDBCExecutionFactory.StructRetrieval |
getStructRetrieval() |
List<String> |
getSupportedFunctions() |
String |
getTemporaryTableName(String prefix) |
int |
getTimestampNanoPrecision()
Return the precision of timestamp literals.
|
protected Version |
getVersion()
Get the database version as a comparable object
|
boolean |
hasTimeType()
Return false to indicate that time support should be emulated
with timestamps.
|
void |
initCapabilities(Connection connection) |
void |
intializeConnectionAfterCancel(Connection c)
Implemented if the
Connection needs initialized after a statement cancel |
protected boolean |
isCharacterType(Class<?> type) |
boolean |
isDefaultTimeZone() |
boolean |
isEnableDependentJoins() |
boolean |
isExtendedAscii() |
protected boolean |
isNonAscii(Expression obj) |
protected boolean |
isNonAscii(String val) |
protected boolean |
isNonAsciiFunction(Function f) |
boolean |
isSourceRequired() |
boolean |
isSourceRequiredForCapabilities() |
boolean |
isTrimStrings() |
void |
loadedTemporaryTable(String tableName,
ExecutionContext context,
Connection connection)
Called after the temporary table has been loaded
|
void |
obtainedConnection(Connection connection)
Provides a hook to call source specific logic when
a connection is obtained.
|
void |
registerFunctionModifier(String name,
FunctionModifier modifier)
Add the
FunctionModifier to the set of known modifiers. |
protected void |
registerSpecificTypeOfOutParameter(CallableStatement statement,
Class<?> runtimeType,
int index)
For registering specific output parameter types we need to translate these into the appropriate
java.sql.Types output parameters
We will need to match these up with the appropriate standard sql types
|
String |
replaceElementName(String group,
String element)
Override to return a name other than the default [group.]element
|
GeographyType |
retrieveGeographyValue(CallableStatement results,
int parameterIndex) |
Object |
retrieveGeographyValue(ResultSet results,
int paramIndex)
The default strategy assumes a blob value containing wkb
|
GeometryType |
retrieveGeometryValue(CallableStatement results,
int parameterIndex) |
Object |
retrieveGeometryValue(ResultSet results,
int paramIndex)
The default strategy assumes a blob value containing wkb
|
Object |
retrieveValue(CallableStatement results,
int parameterIndex,
Class<?> expectedType)
Retrieve the value for the given parameter index
|
Object |
retrieveValue(ResultSet results,
int columnIndex,
Class<?> expectedType)
Retrieve the value on the current resultset row for the given column index.
|
void |
setCommentFormat(String commentFormat) |
void |
setDatabaseTimeZone(String databaseTimeZone) |
void |
setDatabaseVersion(String version)
Sets the database version.
|
void |
setDatabaseVersion(Version version) |
void |
setEnableDependentJoins(boolean enableDependentJoins) |
void |
setFetchSize(Command command,
ExecutionContext context,
Statement statement,
int fetchSize)
Set the fetch size on the given statement.
|
void |
setMaxPreparedInsertBatchSize(int maxInsertBatchSize) |
void |
setRemovePushdownCharacters(String removePushdownCharacters) |
void |
setStructRetrieval(JDBCExecutionFactory.StructRetrieval structRetrieval) |
void |
setTrimStrings(boolean trimStrings) |
void |
setUseBindingsForDependentJoin(boolean useBindingsForDependentJoin) |
void |
setUseBindVariables(boolean useBindVariables) |
void |
setUseCommentsInSourceQuery(boolean useCommentsInSourceQuery) |
void |
start() |
boolean |
supportsAggregatesAvg() |
boolean |
supportsAggregatesCount() |
boolean |
supportsAggregatesCountStar() |
boolean |
supportsAggregatesDistinct() |
boolean |
supportsAggregatesMax() |
boolean |
supportsAggregatesMin() |
boolean |
supportsAggregatesSum() |
boolean |
supportsAliasedTable() |
boolean |
supportsBatchedUpdates() |
protected boolean |
supportsBooleanExpressions()
if boolean expressions are directly supported.
|
boolean |
supportsBulkUpdate() |
boolean |
supportsCompareCriteriaEquals() |
boolean |
supportsCompareCriteriaOrdered() |
boolean |
supportsCorrelatedSubqueries() |
boolean |
supportsDependentJoins() |
boolean |
supportsExistsCriteria() |
boolean |
supportsFullDependentJoins() |
boolean |
supportsGeneratedKeys() |
protected boolean |
supportsGeneratedKeys(ExecutionContext context,
Command command) |
boolean |
supportsGroupBy() |
boolean |
supportsHaving() |
boolean |
supportsInCriteria() |
boolean |
supportsInCriteriaSubquery() |
boolean |
supportsInlineViews() |
boolean |
supportsInsertWithQueryExpression() |
boolean |
supportsIsNullCriteria() |
boolean |
supportsLikeCriteria() |
boolean |
supportsLikeCriteriaEscapeCharacter() |
boolean |
supportsNotCriteria() |
boolean |
supportsOrCriteria() |
boolean |
supportsOrderByUnrelated() |
boolean |
supportsQuantifiedCompareCriteriaAll() |
boolean |
supportsQuantifiedCompareCriteriaSome() |
boolean |
supportsScalarSubqueries() |
boolean |
supportsSearchedCaseExpressions() |
boolean |
supportsSelectExpression() |
boolean |
supportsSelfJoins() |
boolean |
supportsSetQueryOrderBy() |
boolean |
supportsUnions() |
boolean |
tempTableRequiresTransaction() |
List<?> |
translate(LanguageObject obj,
ExecutionContext context)
Return a List of translated parts (
LanguageObjects and Objects), or null
if to rely on the default translation. |
List<?> |
translateCommand(Command command,
ExecutionContext context)
Return a List of translated parts (
LanguageObjects and Objects), or null
if to rely on the default translation. |
List<?> |
translateGeographyLiteral(Literal l)
Translate GEOGRAPHY literal into an expression that will convert to database
geography type.
|
List<?> |
translateGeographyParameter(Parameter p)
Translate GEOGRAPHY parameter into an expression that will convert to database
geography type.
|
Expression |
translateGeographySelect(Expression expr)
Translate GEOGRAPHY column reference into an expression that
will return WKB and possibly the SRID.
|
List<?> |
translateGeometryLiteral(Literal l)
Translate GEOMETRY literal into an expression that will convert to database
geometry type.
|
List<?> |
translateGeometryParameter(Parameter p)
Translate GEOMETRY parameter into an expression that will convert to database
geometry type.
|
Expression |
translateGeometrySelect(Expression expr)
Translate GEOMETRY column reference into an expression that
will return WKB and possibly the SRID.
|
List<?> |
translateLimit(Limit limit,
ExecutionContext context)
Return a List of translated parts (
LanguageObjects and Objects), or null
if to rely on the default translation. |
String |
translateLiteralBinaryType(BinaryType obj)
Subclasses should override this method to provide a different sql translation
of the literal varbinary value.
|
String |
translateLiteralBoolean(Boolean booleanValue)
Subclasses should override this method to provide a different sql translation
of the literal boolean value.
|
String |
translateLiteralDate(Date dateValue)
Subclasses should override this method to provide a different sql translation
of the literal date value.
|
String |
translateLiteralTime(Time timeValue)
Subclasses should override this method to provide a different sql translation
of the literal time value.
|
String |
translateLiteralTimestamp(Timestamp timestampValue)
Subclasses should override this method to provide a different sql translation
of the literal timestamp value.
|
boolean |
useAsInGroupAlias()
Indicates whether group alias should be of the form
"...FROM groupA AS X" or "...FROM groupA X".
|
boolean |
useBindingsForDependentJoin() |
boolean |
useBindVariables() |
boolean |
useColumnNamesForGeneratedKeys() |
boolean |
useCommentsInSourceQuery() |
boolean |
useNBindingType() |
boolean |
useParensForJoins()
Set to true to indicate that every branch of a join
should have parenthesis.
|
boolean |
useParensForSetQueries()
Set to true to indicate that every branch of a set query
should have parenthesis, i.e.
|
boolean |
usePreparedStatements()
Use PreparedStatements (or CallableStatements) as
appropriate for all commands.
|
boolean |
useScientificNotation() |
protected boolean |
usesDatabaseVersion() |
boolean |
useSelectLimit()
Returns whether the limit clause is applied to the select clause.
|
boolean |
useStreamsForLobs()
If streams should be used for Blob/Clob sets on
PreparedStatements |
boolean |
useUnicodePrefix() |
boolean |
useWithRollup() |
addPushDownFunction, areLobsUsableAfterClose, createExecution, getCacheDirective, getCollationLocale, getConnection, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedJoinCriteria, getTransactionSupport, getTypeFacility, isCopyLobs, isForkable, isImmutable, isSourceRequiredForMetadata, isThreadBound, requiresCriteria, returnsSingleUpdateCount, setCollationLocale, setCopyLobs, setDirectQueryProcedureName, setExcludedCommonTableExpressionName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, setTransactionSupport, supportsAdvancedOlapOperations, supportsAggregatesCountBig, supportsAggregatesEnhancedNumeric, supportsArrayAgg, supportsArrayType, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsFormatLiteral, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsInnerJoins, supportsIntersect, supportsIsDistinctCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderBy, supportsOrderByNullOrdering, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsRecursiveCommonTableExpressions, supportsRowLimit, supportsRowOffset, supportsScalarSubqueryProjection, supportsSelectDistinct, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSetQueryLimitOffset, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoinpublic static final int DEFAULT_MAX_IN_CRITERIA
public static final int DEFAULT_MAX_DEPENDENT_PREDICATES
public static final TimeZone DEFAULT_TIME_ZONE
protected SQLDialect dialect
public void start()
throws TranslatorException
start in class ExecutionFactory<DataSource,Connection>TranslatorException@TranslatorProperty(display="Database Version", description="Database Version") public String getDatabaseVersion()
public void setDatabaseVersion(String version)
getVersion()version - public void setDatabaseVersion(Version version)
protected Version getVersion()
@TranslatorProperty(display="Use Bind Variables", description="Use prepared statements and bind variables", advanced=true) public boolean useBindVariables()
public void setUseBindVariables(boolean useBindVariables)
@TranslatorProperty(display="Database time zone", description="Time zone of the database, if different than Integration Server", advanced=true) public String getDatabaseTimeZone()
public void setDatabaseTimeZone(String databaseTimeZone)
@TranslatorProperty(display="Trim string flag", description="Right Trim fixed character types returned as Strings - note that the native type must be char or nchar and the source must support the rtrim function.", advanced=true) public boolean isTrimStrings()
public void setTrimStrings(boolean trimStrings)
@TranslatorProperty(display="Use informational comments in Source Queries", description="This will embed a /*comment*/ leading comment with session/request id in source SQL query for informational purposes", advanced=true) public boolean useCommentsInSourceQuery()
public void setUseCommentsInSourceQuery(boolean useCommentsInSourceQuery)
public boolean isSourceRequired()
isSourceRequired in class ExecutionFactory<DataSource,Connection>public boolean isSourceRequiredForCapabilities()
isSourceRequiredForCapabilities in class ExecutionFactory<DataSource,Connection>protected boolean usesDatabaseVersion()
public void initCapabilities(Connection connection) throws TranslatorException
initCapabilities in class ExecutionFactory<DataSource,Connection>TranslatorExceptionpublic ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createResultSetExecution in class ExecutionFactory<DataSource,Connection>TranslatorExceptionpublic ProcedureExecution createDirectExecution(List<Argument> arguments, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createDirectExecution in class ExecutionFactory<DataSource,Connection>TranslatorExceptionpublic ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createProcedureExecution in class ExecutionFactory<DataSource,Connection>TranslatorExceptionpublic JDBCUpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createUpdateExecution in class ExecutionFactory<DataSource,Connection>TranslatorExceptionpublic Connection getConnection(DataSource ds) throws TranslatorException
getConnection in class ExecutionFactory<DataSource,Connection>TranslatorExceptionpublic void closeConnection(Connection connection, DataSource factory)
closeConnection in class ExecutionFactory<DataSource,Connection>public void getMetadata(MetadataFactory metadataFactory, Connection conn) throws TranslatorException
getMetadata in class ExecutionFactory<DataSource,Connection>TranslatorException@Deprecated protected JDBCMetadataProcessor createMetadataProcessor()
getMetadataProcessor()public MetadataProcessor<Connection> getMetadataProcessor()
getMetadataProcessor in class ExecutionFactory<DataSource,Connection>public List<String> getSupportedFunctions()
getSupportedFunctions in class ExecutionFactory<DataSource,Connection>public boolean supportsGroupBy()
supportsGroupBy in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesAvg()
supportsAggregatesAvg in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesCount()
supportsAggregatesCount in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesCountStar()
supportsAggregatesCountStar in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesDistinct()
supportsAggregatesDistinct in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesMax()
supportsAggregatesMax in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesMin()
supportsAggregatesMin in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesSum()
supportsAggregatesSum in class ExecutionFactory<DataSource,Connection>public boolean supportsAliasedTable()
supportsAliasedTable in class ExecutionFactory<DataSource,Connection>public boolean supportsCompareCriteriaEquals()
supportsCompareCriteriaEquals in class ExecutionFactory<DataSource,Connection>public boolean supportsCorrelatedSubqueries()
supportsCorrelatedSubqueries in class ExecutionFactory<DataSource,Connection>public boolean supportsExistsCriteria()
supportsExistsCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsInCriteria()
supportsInCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsInCriteriaSubquery()
supportsInCriteriaSubquery in class ExecutionFactory<DataSource,Connection>public boolean supportsIsNullCriteria()
supportsIsNullCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsLikeCriteria()
supportsLikeCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsLikeCriteriaEscapeCharacter()
supportsLikeCriteriaEscapeCharacter in class ExecutionFactory<DataSource,Connection>public boolean supportsNotCriteria()
supportsNotCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsOrCriteria()
supportsOrCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsOrderByUnrelated()
supportsOrderByUnrelated in class ExecutionFactory<DataSource,Connection>public boolean supportsQuantifiedCompareCriteriaAll()
supportsQuantifiedCompareCriteriaAll in class ExecutionFactory<DataSource,Connection>public boolean supportsScalarSubqueries()
supportsScalarSubqueries in class ExecutionFactory<DataSource,Connection>public boolean supportsSearchedCaseExpressions()
supportsSearchedCaseExpressions in class ExecutionFactory<DataSource,Connection>public boolean supportsSelfJoins()
supportsSelfJoins in class ExecutionFactory<DataSource,Connection>public boolean supportsInlineViews()
supportsInlineViews in class ExecutionFactory<DataSource,Connection>public boolean supportsQuantifiedCompareCriteriaSome()
supportsQuantifiedCompareCriteriaSome in class ExecutionFactory<DataSource,Connection>public boolean supportsSetQueryOrderBy()
supportsSetQueryOrderBy in class ExecutionFactory<DataSource,Connection>public boolean supportsUnions()
supportsUnions in class ExecutionFactory<DataSource,Connection>public boolean supportsBulkUpdate()
supportsBulkUpdate in class ExecutionFactory<DataSource,Connection>public boolean supportsBatchedUpdates()
supportsBatchedUpdates in class ExecutionFactory<DataSource,Connection>public boolean supportsCompareCriteriaOrdered()
supportsCompareCriteriaOrdered in class ExecutionFactory<DataSource,Connection>public boolean supportsHaving()
supportsHaving in class ExecutionFactory<DataSource,Connection>public boolean supportsSelectExpression()
supportsSelectExpression in class ExecutionFactory<DataSource,Connection>public boolean supportsInsertWithQueryExpression()
supportsInsertWithQueryExpression in class ExecutionFactory<DataSource,Connection>@TranslatorProperty(display="Max Prepared Insert Batch Size", description="The max size of a prepared insert batch. Default 2048.", advanced=true) public int getMaxPreparedInsertBatchSize()
public void setMaxPreparedInsertBatchSize(int maxInsertBatchSize)
public Calendar getDatabaseCalendar()
setDatabaseTimeZone(String), or
the local time zone if none is specified.public List<?> translate(LanguageObject obj, ExecutionContext context)
LanguageObjects and Objects), or null
if to rely on the default translation. Override with care.protected boolean supportsBooleanExpressions()
public Expression translateGeometrySelect(Expression expr)
expr - public Expression translateGeographySelect(Expression expr)
expr - public List<?> translateGeometryLiteral(Literal l)
l - public List<?> translateGeographyLiteral(Literal l)
l - public List<?> translateGeometryParameter(Parameter p)
p - public List<?> translateGeographyParameter(Parameter p)
p - public Object retrieveGeometryValue(ResultSet results, int paramIndex) throws SQLException
results - paramIndex - SQLExceptionpublic Object retrieveGeographyValue(ResultSet results, int paramIndex) throws SQLException
results - paramIndex - SQLExceptionpublic GeometryType retrieveGeometryValue(CallableStatement results, int parameterIndex) throws SQLException
SQLExceptionpublic GeographyType retrieveGeographyValue(CallableStatement results, int parameterIndex) throws SQLException
SQLExceptionpublic List<?> translateCommand(Command command, ExecutionContext context)
LanguageObjects and Objects), or null
if to rely on the default translation.command - context - public List<?> translateLimit(Limit limit, ExecutionContext context)
LanguageObjects and Objects), or null
if to rely on the default translation.limit - context - public Map<String,FunctionModifier> getFunctionModifiers()
public void registerFunctionModifier(String name, FunctionModifier modifier)
FunctionModifier to the set of known modifiers.name - modifier - public String translateLiteralBoolean(Boolean booleanValue)
'0' or '1'.booleanValue - Boolean value, never nullpublic String translateLiteralDate(Date dateValue)
{d '2002-12-31'}dateValue - Date value, never nullpublic String translateLiteralTime(Time timeValue)
{t '23:59:59'}
See hasTimeType() to represent literal times as timestamps.timeValue - Time value, never nullpublic String translateLiteralTimestamp(Timestamp timestampValue)
{ts '2002-12-31 23:59:59'}.
See getTimestampNanoPrecision() to control the literal
precision.timestampValue - Timestamp value, never nullpublic String formatDateValue(Date dateObject, boolean useTimezone)
dateObject - public String formatDateValue(Date dateObject)
dateObject - public String translateLiteralBinaryType(BinaryType obj)
X'hex value'obj - value, never nullpublic boolean addSourceComment()
public boolean useAsInGroupAlias()
public boolean usePreparedStatements()
Literal.setBindEligible(boolean)
can be used to force a literal to be a bind value.public boolean useParensForSetQueries()
public boolean hasTimeType()
public String getSetOperationString(SetQuery.Operation operation)
SetQuery.Operationoperation - public String getSourceComment(ExecutionContext context, Command command)
context - command - public String replaceElementName(String group, String element)
group - element - public int getTimestampNanoPrecision()
public ResultSet executeStoredProcedure(CallableStatement statement, List<Argument> preparedValues, Class<?> returnType) throws SQLException
SQLExceptionprotected void registerSpecificTypeOfOutParameter(CallableStatement statement, Class<?> runtimeType, int index) throws SQLException
SQLExceptionpublic void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
stmt - param - paramType - i - SQLExceptionpublic boolean useStreamsForLobs()
PreparedStatementspublic Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException
results - columnIndex - expectedType - SQLExceptionpublic Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType) throws SQLException
results - parameterIndex - expectedType - SQLExceptionprotected Object convertObject(Object object) throws SQLException
SQLExceptionprotected void afterInitialConnectionObtained(Connection connection)
connection - public void obtainedConnection(Connection connection)
public SQLConversionVisitor getSQLConversionVisitor()
SQLConversionVisitor that will perform translation. Typical custom
JDBC connectors will not need to create custom conversion visitors, rather implementors
should override existing JDBCExecutionFactory methods.SQLConversionVisitorpublic boolean useParensForJoins()
public ExecutionFactory.NullOrder getDefaultNullOrder()
getDefaultNullOrder in class ExecutionFactory<DataSource,Connection>public boolean useSelectLimit()
public String getLikeRegexString()
public void setFetchSize(Command command, ExecutionContext context, Statement statement, int fetchSize) throws SQLException
context - command - statement - fetchSize - SQLExceptionpublic boolean supportsGeneratedKeys()
@TranslatorProperty(display="Struct retrieval", description="Struct retrieval mode (OBJECT, COPY, ARRAY)", advanced=true) public JDBCExecutionFactory.StructRetrieval getStructRetrieval()
public void setStructRetrieval(JDBCExecutionFactory.StructRetrieval structRetrieval)
protected boolean supportsGeneratedKeys(ExecutionContext context, Command command)
context - command - public String createTempTable(String prefix, List<ColumnReference> cols, ExecutionContext context, Connection connection) throws SQLException
prefix - cols - context - connection - SQLExceptionpublic String getCreateTempTableSQL(String name, List<ColumnReference> cols, boolean transactional)
public String getTemporaryTableName(String prefix)
prefix - public String getCreateTemporaryTablePostfix(boolean inTransaction)
inTransaction - public String getCreateTemporaryTableString(boolean inTransaction)
inTransaction - public SQLDialect getDialect()
public String getHibernateDialectClassName()
public boolean supportsDependentJoins()
supportsDependentJoins in class ExecutionFactory<DataSource,Connection>public boolean supportsFullDependentJoins()
supportsFullDependentJoins in class ExecutionFactory<DataSource,Connection>public boolean tempTableRequiresTransaction()
public void loadedTemporaryTable(String tableName, ExecutionContext context, Connection connection) throws SQLException
tableName - context - connection - SQLException@TranslatorProperty(display="Enable Dependent Joins", description="Enable Dependent Join Pushdown", advanced=true) public boolean isEnableDependentJoins()
public void setEnableDependentJoins(boolean enableDependentJoins)
public boolean useWithRollup()
@TranslatorProperty(display="Comment Format", description="Comment format string used with useCommentsInSourceQuery") public String getCommentFormat()
public void setCommentFormat(String commentFormat)
public boolean useScientificNotation()
public boolean useUnicodePrefix()
public boolean useNBindingType()
public boolean isExtendedAscii()
protected boolean isNonAscii(String val)
val - protected boolean isNonAscii(Expression obj)
obj - protected boolean isCharacterType(Class<?> type)
type - protected boolean isNonAsciiFunction(Function f)
f - public void intializeConnectionAfterCancel(Connection c) throws SQLException
Connection needs initialized after a statement cancelc - SQLException@TranslatorProperty(display="Use Bindings For Dependent Join", description="If PreparedStatement bindings should be used for dependent join values.") public boolean useBindingsForDependentJoin()
useBindingsForDependentJoin in class ExecutionFactory<DataSource,Connection>public void setUseBindingsForDependentJoin(boolean useBindingsForDependentJoin)
public boolean useColumnNamesForGeneratedKeys()
public String getLateralKeyword()
@TranslatorProperty(display="Remove Pushdown Characters", description="A case-sensitive regular expression of character strings to remove from string values that are pushed down.") public String getRemovePushdownCharacters()
public void setRemovePushdownCharacters(String removePushdownCharacters)
public boolean isDefaultTimeZone()
Copyright © 2019. All rights reserved.