@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
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)
Closes a connection object from the given connection 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)
Return a connection object from the given connection factory.
|
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()
Returns the default null ordering
|
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)
Implement to provide metadata to the metadata for use by the engine.
|
MetadataProcessor<Connection> |
getMetadataProcessor()
Get a MetadataProcessor for the translator to read the metadata.
|
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()
Get list of all supported function names.
|
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)
Will be called by
ExecutionFactory.start() with a null connection if a source connection is not ExecutionFactory.isSourceRequiredForCapabilities() |
void |
intializeConnectionAfterCancel(Connection c)
Implemented if the
Connection needs initialized after a statement cancel |
boolean |
isEnableDependentJoins() |
protected boolean |
isNonAscii(Expression obj) |
protected boolean |
isNonAsciiFunction(Function f) |
boolean |
isSourceRequired()
Flag that indicates if a underlying source connection required for this execution factory to work
|
boolean |
isSourceRequiredForCapabilities()
If true, the
ExecutionFactory.initCapabilities(Object) method will be consulted prior
to determining the capabilities |
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.
|
static List<String> |
parseName(String tableName,
char escape,
char delim) |
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
|
GeometryType |
retrieveGeometryValue(CallableStatement results,
int parameterIndex) |
Object |
retrieveGeometryValue(ResultSet results,
int paramIndex) |
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()
Initialize the connector with supplied configuration
|
boolean |
supportsAggregatesAvg()
Support indicates connector can accept the AVG aggregate function
|
boolean |
supportsAggregatesCount()
Support indicates connector can accept the COUNT aggregate function
|
boolean |
supportsAggregatesCountStar()
Support indicates connector can accept the COUNT(*) aggregate function
|
boolean |
supportsAggregatesDistinct()
Support indicates connector can accept DISTINCT within aggregate functions
|
boolean |
supportsAggregatesMax()
Support indicates connector can accept the MAX aggregate function
|
boolean |
supportsAggregatesMin()
Support indicates connector can accept the MIN aggregate function
|
boolean |
supportsAggregatesSum()
Support indicates connector can accept the SUM aggregate function
|
boolean |
supportsAliasedTable()
Support indicates connector can accept groups with aliases
|
boolean |
supportsBatchedUpdates()
Whether the source supports
BatchedUpdates |
protected boolean |
supportsBooleanExpressions()
if boolean expressions are directly supported.
|
boolean |
supportsBulkUpdate()
Whether the source supports updates with multiple value sets
|
boolean |
supportsCompareCriteriaEquals()
Support indicates connector accepts criteria of form (element = constant)
|
boolean |
supportsCompareCriteriaOrdered()
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported. |
boolean |
supportsCorrelatedSubqueries()
Support indicates connector can accept correlated subqueries wherever subqueries
are accepted
|
boolean |
supportsDependentJoins()
NOTE: The pushed independent tuples will not have been
converted to a unique set and may contain duplicates.
|
boolean |
supportsExistsCriteria()
Support indicates connector accepts the EXISTS criteria
|
boolean |
supportsFullDependentJoins() |
boolean |
supportsGeneratedKeys() |
protected boolean |
supportsGeneratedKeys(ExecutionContext context,
Command command) |
boolean |
supportsGroupBy()
Whether the source supports an explicit GROUP BY clause
|
boolean |
supportsHaving()
Whether the source supports the HAVING clause
|
boolean |
supportsInCriteria()
Support indicates connector accepts criteria of form (element IN set)
|
boolean |
supportsInCriteriaSubquery()
Support indicates connector accepts IN criteria with a subquery on the right side
|
boolean |
supportsInlineViews()
Support indicates connector can accept inline views (subqueries
in the FROM clause).
|
boolean |
supportsInsertWithQueryExpression()
|
boolean |
supportsIsNullCriteria()
Support indicates connector accepts criteria of form (element IS NULL)
|
boolean |
supportsLikeCriteria()
Support indicates connector accepts criteria of form (element LIKE constant)
|
boolean |
supportsLikeCriteriaEscapeCharacter()
Support indicates connector accepts criteria of form (element LIKE constant ESCAPE char)
|
boolean |
supportsNotCriteria()
Support indicates connector accepts logical criteria NOT
|
boolean |
supportsOrCriteria()
Support indicates connector accepts logical criteria connected by OR
|
boolean |
supportsOrderByUnrelated()
Support indicates connector accepts ORDER BY clause with columns not from the select
|
boolean |
supportsQuantifiedCompareCriteriaAll()
Support indicates connector accepts the quantified comparison criteria that
use ALL
|
boolean |
supportsQuantifiedCompareCriteriaSome()
Support indicates connector accepts the quantified comparison criteria that
use SOME
|
boolean |
supportsScalarSubqueries()
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and
HAVING clauses
|
boolean |
supportsSearchedCaseExpressions()
Support indicates connector can accept queries with searched CASE WHEN
|
boolean |
supportsSelectExpression()
Support indicates connector can accept expressions other than element
symbols in the SELECT clause.
|
boolean |
supportsSelfJoins()
Support indicates connector can accept self-joins where a
group is joined to itself with aliases.
|
boolean |
supportsSetQueryOrderBy()
Support indicates that the connector supports an ORDER BY on a SetQuery.
|
boolean |
supportsUnions()
Support indicates that the connector supports the UNION of two queries.
|
boolean |
tempTableRequiresTransaction() |
List<?> |
translate(LanguageObject obj,
ExecutionContext context)
Return a List of translated parts (
LanguageObject s and Objects), or null
if to rely on the default translation. |
List<?> |
translateCommand(Command command,
ExecutionContext context)
Return a List of translated parts (
LanguageObject s and Objects), or null
if to rely on the default translation. |
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 SRID & WKB.
|
List<?> |
translateLimit(Limit limit,
ExecutionContext context)
Return a List of translated parts (
LanguageObject s 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()
If dependent join predicates should use literals that are marked as bind eligible.
|
boolean |
useBindVariables() |
boolean |
useColumnNamesForGeneratedKeys() |
boolean |
useCommentsInSourceQuery() |
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
PreparedStatement s |
boolean |
useUnicodePrefix() |
boolean |
useWithRollup() |
addPushDownFunction, areLobsUsableAfterClose, createExecution, getCacheDirective, getCollationLocale, getConnection, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, 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, supportsAggregatesEnhancedNumeric, supportsArrayAgg, supportsArrayType, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsFormatLiteral, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsInnerJoins, supportsIntersect, supportsIsDistinctCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeRegex, 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, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoin
public 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
ExecutionFactory
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()
ExecutionFactory
isSourceRequired
in class ExecutionFactory<DataSource,Connection>
public boolean isSourceRequiredForCapabilities()
ExecutionFactory
ExecutionFactory.initCapabilities(Object)
method will be consulted prior
to determining the capabilitiesisSourceRequiredForCapabilities
in class ExecutionFactory<DataSource,Connection>
protected boolean usesDatabaseVersion()
public void initCapabilities(Connection connection) throws TranslatorException
ExecutionFactory
ExecutionFactory.start()
with a null connection if a source connection is not ExecutionFactory.isSourceRequiredForCapabilities()
initCapabilities
in class ExecutionFactory<DataSource,Connection>
TranslatorException
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createResultSetExecution
in class ExecutionFactory<DataSource,Connection>
TranslatorException
public ProcedureExecution createDirectExecution(List<Argument> arguments, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createDirectExecution
in class ExecutionFactory<DataSource,Connection>
TranslatorException
public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createProcedureExecution
in class ExecutionFactory<DataSource,Connection>
TranslatorException
public JDBCUpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createUpdateExecution
in class ExecutionFactory<DataSource,Connection>
TranslatorException
public Connection getConnection(DataSource ds) throws TranslatorException
ExecutionFactory
ConnectionFactory
. Subclasses should override, if they use
another type of connection factory.getConnection
in class ExecutionFactory<DataSource,Connection>
TranslatorException
ExecutionFactory.getConnection(Object, ExecutionContext)
public void closeConnection(Connection connection, DataSource factory)
ExecutionFactory
Connection
. Subclasses should override, if they use
another type of connection.closeConnection
in class ExecutionFactory<DataSource,Connection>
public void getMetadata(MetadataFactory metadataFactory, Connection conn) throws TranslatorException
ExecutionFactory
getMetadata
in class ExecutionFactory<DataSource,Connection>
conn
- may be null if the source is not requiredTranslatorException
- to indicate a recoverable error, otherwise a RuntimeExceptionExecutionFactory.isSourceRequiredForMetadata()
@Deprecated protected JDBCMetadataProcessor createMetadataProcessor()
getMetadataProcessor
public MetadataProcessor<Connection> getMetadataProcessor()
ExecutionFactory
getMetadataProcessor
in class ExecutionFactory<DataSource,Connection>
public List<String> getSupportedFunctions()
ExecutionFactory
getSupportedFunctions
in class ExecutionFactory<DataSource,Connection>
for a listing of system pushdown functions. Note that
not all system functions are listed as some functions will use a common name
such as CONCAT vs. the || operator, and other functions will be rewritten and
not pushed down, such as SPACE.
Note: User defined functions should be specified fully qualified.
public boolean supportsGroupBy()
ExecutionFactory
supportsGroupBy
in class ExecutionFactory<DataSource,Connection>
public boolean supportsAggregatesAvg()
ExecutionFactory
supportsAggregatesAvg
in class ExecutionFactory<DataSource,Connection>
public boolean supportsAggregatesCount()
ExecutionFactory
supportsAggregatesCount
in class ExecutionFactory<DataSource,Connection>
public boolean supportsAggregatesCountStar()
ExecutionFactory
supportsAggregatesCountStar
in class ExecutionFactory<DataSource,Connection>
public boolean supportsAggregatesDistinct()
ExecutionFactory
supportsAggregatesDistinct
in class ExecutionFactory<DataSource,Connection>
public boolean supportsAggregatesMax()
ExecutionFactory
supportsAggregatesMax
in class ExecutionFactory<DataSource,Connection>
public boolean supportsAggregatesMin()
ExecutionFactory
supportsAggregatesMin
in class ExecutionFactory<DataSource,Connection>
public boolean supportsAggregatesSum()
ExecutionFactory
supportsAggregatesSum
in class ExecutionFactory<DataSource,Connection>
public boolean supportsAliasedTable()
ExecutionFactory
supportsAliasedTable
in class ExecutionFactory<DataSource,Connection>
public boolean supportsCompareCriteriaEquals()
ExecutionFactory
supportsCompareCriteriaEquals
in class ExecutionFactory<DataSource,Connection>
public boolean supportsCorrelatedSubqueries()
ExecutionFactory
supportsCorrelatedSubqueries
in class ExecutionFactory<DataSource,Connection>
public boolean supportsExistsCriteria()
ExecutionFactory
supportsExistsCriteria
in class ExecutionFactory<DataSource,Connection>
public boolean supportsInCriteria()
ExecutionFactory
supportsInCriteria
in class ExecutionFactory<DataSource,Connection>
public boolean supportsInCriteriaSubquery()
ExecutionFactory
supportsInCriteriaSubquery
in class ExecutionFactory<DataSource,Connection>
public boolean supportsIsNullCriteria()
ExecutionFactory
supportsIsNullCriteria
in class ExecutionFactory<DataSource,Connection>
public boolean supportsLikeCriteria()
ExecutionFactory
supportsLikeCriteria
in class ExecutionFactory<DataSource,Connection>
public boolean supportsLikeCriteriaEscapeCharacter()
ExecutionFactory
supportsLikeCriteriaEscapeCharacter
in class ExecutionFactory<DataSource,Connection>
public boolean supportsNotCriteria()
ExecutionFactory
supportsNotCriteria
in class ExecutionFactory<DataSource,Connection>
public boolean supportsOrCriteria()
ExecutionFactory
supportsOrCriteria
in class ExecutionFactory<DataSource,Connection>
public boolean supportsOrderByUnrelated()
ExecutionFactory
supportsOrderByUnrelated
in class ExecutionFactory<DataSource,Connection>
public boolean supportsQuantifiedCompareCriteriaAll()
ExecutionFactory
supportsQuantifiedCompareCriteriaAll
in class ExecutionFactory<DataSource,Connection>
public boolean supportsScalarSubqueries()
ExecutionFactory
supportsScalarSubqueries
in class ExecutionFactory<DataSource,Connection>
public boolean supportsSearchedCaseExpressions()
ExecutionFactory
supportsSearchedCaseExpressions
in class ExecutionFactory<DataSource,Connection>
public boolean supportsSelfJoins()
ExecutionFactory
ExecutionFactory.supportsAliasedTable()
.supportsSelfJoins
in class ExecutionFactory<DataSource,Connection>
public boolean supportsInlineViews()
ExecutionFactory
supportsInlineViews
in class ExecutionFactory<DataSource,Connection>
public boolean supportsQuantifiedCompareCriteriaSome()
ExecutionFactory
supportsQuantifiedCompareCriteriaSome
in class ExecutionFactory<DataSource,Connection>
public boolean supportsSetQueryOrderBy()
ExecutionFactory
supportsSetQueryOrderBy
in class ExecutionFactory<DataSource,Connection>
public boolean supportsUnions()
ExecutionFactory
supportsUnions
in class ExecutionFactory<DataSource,Connection>
public boolean supportsBulkUpdate()
ExecutionFactory
supportsBulkUpdate
in class ExecutionFactory<DataSource,Connection>
public boolean supportsBatchedUpdates()
ExecutionFactory
BatchedUpdates
supportsBatchedUpdates
in class ExecutionFactory<DataSource,Connection>
public boolean supportsCompareCriteriaOrdered()
ExecutionFactory
supportsCompareCriteriaOrdered
in class ExecutionFactory<DataSource,Connection>
public boolean supportsHaving()
ExecutionFactory
supportsHaving
in class ExecutionFactory<DataSource,Connection>
public boolean supportsSelectExpression()
ExecutionFactory
supportsSelectExpression
in class ExecutionFactory<DataSource,Connection>
public boolean supportsInsertWithQueryExpression()
ExecutionFactory
SetQuery
or Select
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()
JDBCPropertyNames#DATABASE_TIME_ZONE
, or
the local time zone if none is specified.public List<?> translate(LanguageObject obj, ExecutionContext context)
LanguageObject
s and Objects), or null
if to rely on the default translation. Override with care.command
- context
- protected boolean supportsBooleanExpressions()
public Expression translateGeometrySelect(Expression expr)
expr
- public List<?> translateGeometryLiteral(Literal l)
l
- public List<?> translateGeometryParameter(Parameter p)
p
- public Object retrieveGeometryValue(ResultSet results, int paramIndex) throws SQLException
SQLException
public GeometryType retrieveGeometryValue(CallableStatement results, int parameterIndex) throws SQLException
SQLException
public List<?> translateCommand(Command command, ExecutionContext context)
LanguageObject
s and Objects), or null
if to rely on the default translation.command
- context
- public List<?> translateLimit(Limit limit, ExecutionContext context)
LanguageObject
s 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()
BindValueVisitor
. Literal#setBindValue(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.Operation
operation
- 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
SQLException
protected void registerSpecificTypeOfOutParameter(CallableStatement statement, Class<?> runtimeType, int index) throws SQLException
cstmt
- parameter
- SQLException
public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
stmt
- param
- paramType
- i
- cal
- SQLException
public boolean useStreamsForLobs()
PreparedStatement
spublic Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException
results
- columnIndex
- expectedType
- SQLException
public Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType) throws SQLException
results
- parameterIndex
- expectedType
- SQLException
protected Object convertObject(Object object) throws SQLException
SQLException
protected 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.SQLConversionVisitor
public boolean useParensForJoins()
public ExecutionFactory.NullOrder getDefaultNullOrder()
ExecutionFactory
getDefaultNullOrder
in class ExecutionFactory<DataSource,Connection>
ExecutionFactory.NullOrder
public boolean useSelectLimit()
public String getLikeRegexString()
public void setFetchSize(Command command, ExecutionContext context, Statement statement, int fetchSize) throws SQLException
context
- command
- statement
- fetchSize
- SQLException
public 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
- SQLException
public 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()
ExecutionFactory
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()
protected boolean isNonAscii(Expression obj)
obj
- 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()
ExecutionFactory
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)
Copyright © 2018 JBoss by Red Hat. All rights reserved.