@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
|
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()
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 (
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()
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
PreparedStatements |
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, 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
ExecutionFactorystart 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()
ExecutionFactoryisSourceRequired in class ExecutionFactory<DataSource,Connection>public boolean isSourceRequiredForCapabilities()
ExecutionFactoryExecutionFactory.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
ExecutionFactoryExecutionFactory.start() with a null connection if a source connection is not ExecutionFactory.isSourceRequiredForCapabilities()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
ExecutionFactoryConnectionFactory. Subclasses should override, if they use
another type of connection factory.getConnection in class ExecutionFactory<DataSource,Connection>TranslatorExceptionExecutionFactory.getConnection(Object, ExecutionContext)public void closeConnection(Connection connection, DataSource factory)
ExecutionFactoryConnection. 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
ExecutionFactorygetMetadata 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()
getMetadataProcessorpublic MetadataProcessor<Connection> getMetadataProcessor()
ExecutionFactorygetMetadataProcessor in class ExecutionFactory<DataSource,Connection>public List<String> getSupportedFunctions()
ExecutionFactorygetSupportedFunctions 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()
ExecutionFactorysupportsGroupBy in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesAvg()
ExecutionFactorysupportsAggregatesAvg in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesCount()
ExecutionFactorysupportsAggregatesCount in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesCountStar()
ExecutionFactorysupportsAggregatesCountStar in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesDistinct()
ExecutionFactorysupportsAggregatesDistinct in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesMax()
ExecutionFactorysupportsAggregatesMax in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesMin()
ExecutionFactorysupportsAggregatesMin in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesSum()
ExecutionFactorysupportsAggregatesSum in class ExecutionFactory<DataSource,Connection>public boolean supportsAliasedTable()
ExecutionFactorysupportsAliasedTable in class ExecutionFactory<DataSource,Connection>public boolean supportsCompareCriteriaEquals()
ExecutionFactorysupportsCompareCriteriaEquals in class ExecutionFactory<DataSource,Connection>public boolean supportsCorrelatedSubqueries()
ExecutionFactorysupportsCorrelatedSubqueries in class ExecutionFactory<DataSource,Connection>public boolean supportsExistsCriteria()
ExecutionFactorysupportsExistsCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsInCriteria()
ExecutionFactorysupportsInCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsInCriteriaSubquery()
ExecutionFactorysupportsInCriteriaSubquery in class ExecutionFactory<DataSource,Connection>public boolean supportsIsNullCriteria()
ExecutionFactorysupportsIsNullCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsLikeCriteria()
ExecutionFactorysupportsLikeCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsLikeCriteriaEscapeCharacter()
ExecutionFactorysupportsLikeCriteriaEscapeCharacter in class ExecutionFactory<DataSource,Connection>public boolean supportsNotCriteria()
ExecutionFactorysupportsNotCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsOrCriteria()
ExecutionFactorysupportsOrCriteria in class ExecutionFactory<DataSource,Connection>public boolean supportsOrderByUnrelated()
ExecutionFactorysupportsOrderByUnrelated in class ExecutionFactory<DataSource,Connection>public boolean supportsQuantifiedCompareCriteriaAll()
ExecutionFactorysupportsQuantifiedCompareCriteriaAll in class ExecutionFactory<DataSource,Connection>public boolean supportsScalarSubqueries()
ExecutionFactorysupportsScalarSubqueries in class ExecutionFactory<DataSource,Connection>public boolean supportsSearchedCaseExpressions()
ExecutionFactorysupportsSearchedCaseExpressions in class ExecutionFactory<DataSource,Connection>public boolean supportsSelfJoins()
ExecutionFactoryExecutionFactory.supportsAliasedTable().supportsSelfJoins in class ExecutionFactory<DataSource,Connection>public boolean supportsInlineViews()
ExecutionFactorysupportsInlineViews in class ExecutionFactory<DataSource,Connection>public boolean supportsQuantifiedCompareCriteriaSome()
ExecutionFactorysupportsQuantifiedCompareCriteriaSome in class ExecutionFactory<DataSource,Connection>public boolean supportsSetQueryOrderBy()
ExecutionFactorysupportsSetQueryOrderBy in class ExecutionFactory<DataSource,Connection>public boolean supportsUnions()
ExecutionFactorysupportsUnions in class ExecutionFactory<DataSource,Connection>public boolean supportsBulkUpdate()
ExecutionFactorysupportsBulkUpdate in class ExecutionFactory<DataSource,Connection>public boolean supportsBatchedUpdates()
ExecutionFactoryBatchedUpdatessupportsBatchedUpdates in class ExecutionFactory<DataSource,Connection>public boolean supportsCompareCriteriaOrdered()
ExecutionFactorysupportsCompareCriteriaOrdered in class ExecutionFactory<DataSource,Connection>public boolean supportsHaving()
ExecutionFactorysupportsHaving in class ExecutionFactory<DataSource,Connection>public boolean supportsSelectExpression()
ExecutionFactorysupportsSelectExpression in class ExecutionFactory<DataSource,Connection>public boolean supportsInsertWithQueryExpression()
ExecutionFactorySetQuery or SelectsupportsInsertWithQueryExpression 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)
LanguageObjects 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 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()
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.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
cstmt - parameter - SQLExceptionpublic void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
stmt - param - paramType - i - cal - 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()
ExecutionFactorygetDefaultNullOrder in class ExecutionFactory<DataSource,Connection>ExecutionFactory.NullOrderpublic 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()
ExecutionFactorysupportsDependentJoins 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()
ExecutionFactoryuseBindingsForDependentJoin 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.