Package org.teiid.translator.jdbc
Class JDBCExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<DataSource,Connection>
-
- org.teiid.translator.jdbc.JDBCExecutionFactory
-
- Direct Known Subclasses:
ActianVectorInHadoopExecutionFactory
,BaseDB2ExecutionFactory
,BaseHiveExecutionFactory
,BaseSybaseExecutionFactory
,ExasolExecutionFactory
,H2ExecutionFactory
,HanaExecutionFactory
,HsqlExecutionFactory
,InformixExecutionFactory
,IngresExecutionFactory
,InterSystemsCacheExecutionFactory
,MetaMatrixExecutionFactory
,ModeShapeExecutionFactory
,MySQLExecutionFactory
,NetezzaExecutionFactory
,OracleExecutionFactory
,PhoenixExecutionFactory
,PIExecutionFactory
,PostgreSQLExecutionFactory
,PrestoDBExecutionFactory
,SimpleJDBCExecutionFactory
,TeiidExecutionFactory
,TeradataExecutionFactory
,VerticaExecutionFactory
@Translator(name="jdbc-ansi", description="JDBC ANSI translator, can used with any ANSI compatible JDBC Driver") public class JDBCExecutionFactory extends ExecutionFactory<DataSource,Connection>
JDBC implementation of Connector interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JDBCExecutionFactory.StructRetrieval
-
Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_DEPENDENT_PREDICATES
static int
DEFAULT_MAX_IN_CRITERIA
static TimeZone
DEFAULT_TIME_ZONE
protected SQLDialect
dialect
-
Fields inherited from class org.teiid.translator.ExecutionFactory
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description JDBCExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 columnsJDBCUpdateExecution
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 orderingList<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_REGEXint
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 givenSetQuery.Operation
String
getSourceComment(ExecutionContext context, Command command)
Returns the source comment for the given commandSQLConversionVisitor
getSQLConversionVisitor()
Create theSQLConversionVisitor
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 objectboolean
hasTimeType()
Return false to indicate that time support should be emulated with timestamps.void
initCapabilities(Connection connection)
Will be called byExecutionFactory.start()
with a null connection if a source connection is notExecutionFactory.isSourceRequiredForCapabilities()
void
intializeConnectionAfterCancel(Connection c)
Implemented if theConnection
needs initialized after a statement cancelprotected boolean
isCharacterType(Class<?> type)
boolean
isDefaultTimeZone()
boolean
isEnableDependentJoins()
boolean
isExtendedAscii()
protected boolean
isNonAscii(String val)
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 workboolean
isSourceRequiredForCapabilities()
If true, theExecutionFactory.initCapabilities(Object)
method will be consulted prior to determining the capabilitiesboolean
isTrimStrings()
void
loadedTemporaryTable(String tableName, ExecutionContext context, Connection connection)
Called after the temporary table has been loadedvoid
obtainedConnection(Connection connection)
Provides a hook to call source specific logic when a connection is obtained.void
registerFunctionModifier(String name, FunctionModifier modifier)
Add theFunctionModifier
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 typesString
replaceElementName(String group, String element)
Override to return a name other than the default [group.]elementGeographyType
retrieveGeographyValue(CallableStatement results, int parameterIndex)
Object
retrieveGeographyValue(ResultSet results, int paramIndex)
The default strategy assumes a blob value containing wkbGeometryType
retrieveGeometryValue(CallableStatement results, int parameterIndex)
Object
retrieveGeometryValue(ResultSet results, int paramIndex)
The default strategy assumes a blob value containing wkbObject
retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType)
Retrieve the value for the given parameter indexObject
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 configurationboolean
supportsAggregatesAvg()
Support indicates connector can accept the AVG aggregate functionboolean
supportsAggregatesCount()
Support indicates connector can accept the COUNT aggregate functionboolean
supportsAggregatesCountStar()
Support indicates connector can accept the COUNT(*) aggregate functionboolean
supportsAggregatesDistinct()
Support indicates connector can accept DISTINCT within aggregate functionsboolean
supportsAggregatesMax()
Support indicates connector can accept the MAX aggregate functionboolean
supportsAggregatesMin()
Support indicates connector can accept the MIN aggregate functionboolean
supportsAggregatesSum()
Support indicates connector can accept the SUM aggregate functionboolean
supportsAliasedTable()
Support indicates connector can accept groups with aliasesboolean
supportsBatchedUpdates()
Whether the source supportsBatchedUpdates
protected boolean
supportsBooleanExpressions()
if boolean expressions are directly supported.boolean
supportsBulkUpdate()
Whether the source supports updates with multiple value setsboolean
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 acceptedboolean
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 criteriaboolean
supportsFullDependentJoins()
boolean
supportsGeneratedKeys()
protected boolean
supportsGeneratedKeys(ExecutionContext context, Command command)
boolean
supportsGroupBy()
Whether the source supports an explicit GROUP BY clauseboolean
supportsHaving()
Whether the source supports the HAVING clauseboolean
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 sideboolean
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 NOTboolean
supportsOrCriteria()
Support indicates connector accepts logical criteria connected by ORboolean
supportsOrderByUnrelated()
Support indicates connector accepts ORDER BY clause with columns not from the selectboolean
supportsProcedureParameterExpression()
Return true if the translator supports expressions as procedure paramters.boolean
supportsQuantifiedCompareCriteriaAll()
Support indicates connector accepts the quantified comparison criteria that use ALLboolean
supportsQuantifiedCompareCriteriaSome()
Support indicates connector accepts the quantified comparison criteria that use SOMEboolean
supportsScalarSubqueries()
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and HAVING clausesboolean
supportsSearchedCaseExpressions()
Support indicates connector can accept queries with searched CASE WHEN criteria ...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<?>
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 (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
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 onPreparedStatement
sboolean
useUnicodePrefix()
boolean
useWithRollup()
-
Methods inherited from class org.teiid.translator.ExecutionFactory
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, useAnsiJoin
-
-
-
-
Field Detail
-
DEFAULT_MAX_IN_CRITERIA
public static final int DEFAULT_MAX_IN_CRITERIA
- See Also:
- Constant Field Values
-
DEFAULT_MAX_DEPENDENT_PREDICATES
public static final int DEFAULT_MAX_DEPENDENT_PREDICATES
- See Also:
- Constant Field Values
-
DEFAULT_TIME_ZONE
public static final TimeZone DEFAULT_TIME_ZONE
-
dialect
protected SQLDialect dialect
-
-
Method Detail
-
start
public void start() throws TranslatorException
Description copied from class:ExecutionFactory
Initialize the connector with supplied configuration- Overrides:
start
in classExecutionFactory<DataSource,Connection>
- Throws:
TranslatorException
-
getDatabaseVersion
@TranslatorProperty(display="Database Version", description="Database Version") public String getDatabaseVersion()
-
setDatabaseVersion
public void setDatabaseVersion(String version)
Sets the database version. See alsogetVersion()
- Parameters:
version
-
-
setDatabaseVersion
public void setDatabaseVersion(Version version)
-
getVersion
protected Version getVersion()
Get the database version as a comparable object- Returns:
-
useBindVariables
@TranslatorProperty(display="Use Bind Variables", description="Use prepared statements and bind variables", advanced=true) public boolean useBindVariables()
-
setUseBindVariables
public void setUseBindVariables(boolean useBindVariables)
-
getDatabaseTimeZone
@TranslatorProperty(display="Database time zone", description="Time zone of the database, if different than Integration Server", advanced=true) public String getDatabaseTimeZone()
-
setDatabaseTimeZone
public void setDatabaseTimeZone(String databaseTimeZone)
-
isTrimStrings
@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()
-
setTrimStrings
public void setTrimStrings(boolean trimStrings)
-
useCommentsInSourceQuery
@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()
-
setUseCommentsInSourceQuery
public void setUseCommentsInSourceQuery(boolean useCommentsInSourceQuery)
-
isSourceRequired
public boolean isSourceRequired()
Description copied from class:ExecutionFactory
Flag that indicates if a underlying source connection required for this execution factory to work- Overrides:
isSourceRequired
in classExecutionFactory<DataSource,Connection>
- Returns:
-
isSourceRequiredForCapabilities
public boolean isSourceRequiredForCapabilities()
Description copied from class:ExecutionFactory
If true, theExecutionFactory.initCapabilities(Object)
method will be consulted prior to determining the capabilities- Overrides:
isSourceRequiredForCapabilities
in classExecutionFactory<DataSource,Connection>
- Returns:
-
usesDatabaseVersion
protected boolean usesDatabaseVersion()
-
initCapabilities
public void initCapabilities(Connection connection) throws TranslatorException
Description copied from class:ExecutionFactory
Will be called byExecutionFactory.start()
with a null connection if a source connection is notExecutionFactory.isSourceRequiredForCapabilities()
- Overrides:
initCapabilities
in classExecutionFactory<DataSource,Connection>
- Throws:
TranslatorException
-
createResultSetExecution
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
- Overrides:
createResultSetExecution
in classExecutionFactory<DataSource,Connection>
- Throws:
TranslatorException
-
createDirectExecution
public ProcedureExecution createDirectExecution(List<Argument> arguments, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
- Overrides:
createDirectExecution
in classExecutionFactory<DataSource,Connection>
- Throws:
TranslatorException
-
createProcedureExecution
public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
- Overrides:
createProcedureExecution
in classExecutionFactory<DataSource,Connection>
- Throws:
TranslatorException
-
createUpdateExecution
public JDBCUpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
- Overrides:
createUpdateExecution
in classExecutionFactory<DataSource,Connection>
- Throws:
TranslatorException
-
getConnection
public Connection getConnection(DataSource ds) throws TranslatorException
Description copied from class:ExecutionFactory
Return a connection object from the given connection factory. The default implementation assumes a JCAConnectionFactory
. Subclasses should override, if they use another type of connection factory.- Overrides:
getConnection
in classExecutionFactory<DataSource,Connection>
- Returns:
- a connection
- Throws:
TranslatorException
- See Also:
ExecutionFactory.getConnection(Object, ExecutionContext)
-
closeConnection
public void closeConnection(Connection connection, DataSource factory)
Description copied from class:ExecutionFactory
Closes a connection object from the given connection factory. The default implementation assumes a JCAConnection
. Subclasses should override, if they use another type of connection.- Overrides:
closeConnection
in classExecutionFactory<DataSource,Connection>
-
getMetadata
public void getMetadata(MetadataFactory metadataFactory, Connection conn) throws TranslatorException
Description copied from class:ExecutionFactory
Implement to provide metadata to the metadata for use by the engine. This is the primary method of creating metadata for dynamic VDBs.- Overrides:
getMetadata
in classExecutionFactory<DataSource,Connection>
conn
- may be null if the source is not required- Throws:
TranslatorException
- to indicate a recoverable error, otherwise a RuntimeException- See Also:
ExecutionFactory.isSourceRequiredForMetadata()
-
createMetadataProcessor
@Deprecated protected JDBCMetadataProcessor createMetadataProcessor()
Deprecated.- See Also:
getMetadataProcessor()
-
getMetadataProcessor
public MetadataProcessor<Connection> getMetadataProcessor()
Description copied from class:ExecutionFactory
Get a MetadataProcessor for the translator to read the metadata. Typically this will return a new instance.- Overrides:
getMetadataProcessor
in classExecutionFactory<DataSource,Connection>
- Returns:
-
getSupportedFunctions
public List<String> getSupportedFunctions()
Description copied from class:ExecutionFactory
Get list of all supported function names. Arithmetic functions have names like "+".- Overrides:
getSupportedFunctions
in classExecutionFactory<DataSource,Connection>
- See Also:
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.
-
supportsGroupBy
public boolean supportsGroupBy()
Description copied from class:ExecutionFactory
Whether the source supports an explicit GROUP BY clause- Overrides:
supportsGroupBy
in classExecutionFactory<DataSource,Connection>
-
supportsAggregatesAvg
public boolean supportsAggregatesAvg()
Description copied from class:ExecutionFactory
Support indicates connector can accept the AVG aggregate function- Overrides:
supportsAggregatesAvg
in classExecutionFactory<DataSource,Connection>
-
supportsAggregatesCount
public boolean supportsAggregatesCount()
Description copied from class:ExecutionFactory
Support indicates connector can accept the COUNT aggregate function- Overrides:
supportsAggregatesCount
in classExecutionFactory<DataSource,Connection>
-
supportsAggregatesCountStar
public boolean supportsAggregatesCountStar()
Description copied from class:ExecutionFactory
Support indicates connector can accept the COUNT(*) aggregate function- Overrides:
supportsAggregatesCountStar
in classExecutionFactory<DataSource,Connection>
-
supportsAggregatesDistinct
public boolean supportsAggregatesDistinct()
Description copied from class:ExecutionFactory
Support indicates connector can accept DISTINCT within aggregate functions- Overrides:
supportsAggregatesDistinct
in classExecutionFactory<DataSource,Connection>
-
supportsAggregatesMax
public boolean supportsAggregatesMax()
Description copied from class:ExecutionFactory
Support indicates connector can accept the MAX aggregate function- Overrides:
supportsAggregatesMax
in classExecutionFactory<DataSource,Connection>
-
supportsAggregatesMin
public boolean supportsAggregatesMin()
Description copied from class:ExecutionFactory
Support indicates connector can accept the MIN aggregate function- Overrides:
supportsAggregatesMin
in classExecutionFactory<DataSource,Connection>
-
supportsAggregatesSum
public boolean supportsAggregatesSum()
Description copied from class:ExecutionFactory
Support indicates connector can accept the SUM aggregate function- Overrides:
supportsAggregatesSum
in classExecutionFactory<DataSource,Connection>
-
supportsAliasedTable
public boolean supportsAliasedTable()
Description copied from class:ExecutionFactory
Support indicates connector can accept groups with aliases- Overrides:
supportsAliasedTable
in classExecutionFactory<DataSource,Connection>
-
supportsCompareCriteriaEquals
public boolean supportsCompareCriteriaEquals()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element = constant)- Overrides:
supportsCompareCriteriaEquals
in classExecutionFactory<DataSource,Connection>
-
supportsCorrelatedSubqueries
public boolean supportsCorrelatedSubqueries()
Description copied from class:ExecutionFactory
Support indicates connector can accept correlated subqueries wherever subqueries are accepted- Overrides:
supportsCorrelatedSubqueries
in classExecutionFactory<DataSource,Connection>
-
supportsExistsCriteria
public boolean supportsExistsCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts the EXISTS criteria- Overrides:
supportsExistsCriteria
in classExecutionFactory<DataSource,Connection>
-
supportsInCriteria
public boolean supportsInCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element IN set)- Overrides:
supportsInCriteria
in classExecutionFactory<DataSource,Connection>
-
supportsInCriteriaSubquery
public boolean supportsInCriteriaSubquery()
Description copied from class:ExecutionFactory
Support indicates connector accepts IN criteria with a subquery on the right side- Overrides:
supportsInCriteriaSubquery
in classExecutionFactory<DataSource,Connection>
-
supportsIsNullCriteria
public boolean supportsIsNullCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element IS NULL)- Overrides:
supportsIsNullCriteria
in classExecutionFactory<DataSource,Connection>
-
supportsLikeCriteria
public boolean supportsLikeCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element LIKE constant)- Overrides:
supportsLikeCriteria
in classExecutionFactory<DataSource,Connection>
-
supportsLikeCriteriaEscapeCharacter
public boolean supportsLikeCriteriaEscapeCharacter()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element LIKE constant ESCAPE char)- Overrides:
supportsLikeCriteriaEscapeCharacter
in classExecutionFactory<DataSource,Connection>
-
supportsNotCriteria
public boolean supportsNotCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts logical criteria NOT- Overrides:
supportsNotCriteria
in classExecutionFactory<DataSource,Connection>
-
supportsOrCriteria
public boolean supportsOrCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts logical criteria connected by OR- Overrides:
supportsOrCriteria
in classExecutionFactory<DataSource,Connection>
-
supportsOrderByUnrelated
public boolean supportsOrderByUnrelated()
Description copied from class:ExecutionFactory
Support indicates connector accepts ORDER BY clause with columns not from the select- Overrides:
supportsOrderByUnrelated
in classExecutionFactory<DataSource,Connection>
- Returns:
-
supportsQuantifiedCompareCriteriaAll
public boolean supportsQuantifiedCompareCriteriaAll()
Description copied from class:ExecutionFactory
Support indicates connector accepts the quantified comparison criteria that use ALL- Overrides:
supportsQuantifiedCompareCriteriaAll
in classExecutionFactory<DataSource,Connection>
-
supportsScalarSubqueries
public boolean supportsScalarSubqueries()
Description copied from class:ExecutionFactory
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and HAVING clauses- Overrides:
supportsScalarSubqueries
in classExecutionFactory<DataSource,Connection>
-
supportsSearchedCaseExpressions
public boolean supportsSearchedCaseExpressions()
Description copied from class:ExecutionFactory
Support indicates connector can accept queries with searched CASE WHEN criteria ... END- Overrides:
supportsSearchedCaseExpressions
in classExecutionFactory<DataSource,Connection>
-
supportsSelfJoins
public boolean supportsSelfJoins()
Description copied from class:ExecutionFactory
Support indicates connector can accept self-joins where a group is joined to itself with aliases. Connector must also supportExecutionFactory.supportsAliasedTable()
.- Overrides:
supportsSelfJoins
in classExecutionFactory<DataSource,Connection>
-
supportsInlineViews
public boolean supportsInlineViews()
Description copied from class:ExecutionFactory
Support indicates connector can accept inline views (subqueries in the FROM clause).- Overrides:
supportsInlineViews
in classExecutionFactory<DataSource,Connection>
-
supportsQuantifiedCompareCriteriaSome
public boolean supportsQuantifiedCompareCriteriaSome()
Description copied from class:ExecutionFactory
Support indicates connector accepts the quantified comparison criteria that use SOME- Overrides:
supportsQuantifiedCompareCriteriaSome
in classExecutionFactory<DataSource,Connection>
-
supportsSetQueryOrderBy
public boolean supportsSetQueryOrderBy()
Description copied from class:ExecutionFactory
Support indicates that the connector supports an ORDER BY on a SetQuery.- Overrides:
supportsSetQueryOrderBy
in classExecutionFactory<DataSource,Connection>
-
supportsUnions
public boolean supportsUnions()
Description copied from class:ExecutionFactory
Support indicates that the connector supports the UNION of two queries.- Overrides:
supportsUnions
in classExecutionFactory<DataSource,Connection>
-
supportsBulkUpdate
public boolean supportsBulkUpdate()
Description copied from class:ExecutionFactory
Whether the source supports updates with multiple value sets- Overrides:
supportsBulkUpdate
in classExecutionFactory<DataSource,Connection>
-
supportsBatchedUpdates
public boolean supportsBatchedUpdates()
Description copied from class:ExecutionFactory
Whether the source supportsBatchedUpdates
- Overrides:
supportsBatchedUpdates
in classExecutionFactory<DataSource,Connection>
-
supportsCompareCriteriaOrdered
public boolean supportsCompareCriteriaOrdered()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.- Overrides:
supportsCompareCriteriaOrdered
in classExecutionFactory<DataSource,Connection>
-
supportsHaving
public boolean supportsHaving()
Description copied from class:ExecutionFactory
Whether the source supports the HAVING clause- Overrides:
supportsHaving
in classExecutionFactory<DataSource,Connection>
-
supportsSelectExpression
public boolean supportsSelectExpression()
Description copied from class:ExecutionFactory
Support indicates connector can accept expressions other than element symbols in the SELECT clause. Specific supports for the expression type are still checked.- Overrides:
supportsSelectExpression
in classExecutionFactory<DataSource,Connection>
-
supportsInsertWithQueryExpression
public boolean supportsInsertWithQueryExpression()
Description copied from class:ExecutionFactory
Support indicates that the connector can accept INSERTs with values specified by aSetQuery
orSelect
- Overrides:
supportsInsertWithQueryExpression
in classExecutionFactory<DataSource,Connection>
-
getMaxPreparedInsertBatchSize
@TranslatorProperty(display="Max Prepared Insert Batch Size", description="The max size of a prepared insert batch. Default 2048.", advanced=true) public int getMaxPreparedInsertBatchSize()
Get the max number of inserts to perform in one batch.- Returns:
-
setMaxPreparedInsertBatchSize
public void setMaxPreparedInsertBatchSize(int maxInsertBatchSize)
-
getDatabaseCalendar
public Calendar getDatabaseCalendar()
Gets the database calendar. This will be set to the time zone specified by the propertysetDatabaseTimeZone(String)
, or the local time zone if none is specified.- Returns:
- the database calendar
-
translate
public 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. Override with care.- Returns:
- list of translated parts
-
supportsBooleanExpressions
protected boolean supportsBooleanExpressions()
if boolean expressions are directly supported. will generally be false if there is no boolean datatype- Returns:
-
translateGeometrySelect
public Expression translateGeometrySelect(Expression expr)
Translate GEOMETRY column reference into an expression that will return WKB and possibly the SRID.- Parameters:
expr
-- Returns:
-
translateGeographySelect
public Expression translateGeographySelect(Expression expr)
Translate GEOGRAPHY column reference into an expression that will return WKB and possibly the SRID.- Parameters:
expr
-- Returns:
-
translateGeometryLiteral
public List<?> translateGeometryLiteral(Literal l)
Translate GEOMETRY literal into an expression that will convert to database geometry type.- Parameters:
l
-- Returns:
-
translateGeographyLiteral
public List<?> translateGeographyLiteral(Literal l)
Translate GEOGRAPHY literal into an expression that will convert to database geography type.- Parameters:
l
-- Returns:
-
translateGeometryParameter
public List<?> translateGeometryParameter(Parameter p)
Translate GEOMETRY parameter into an expression that will convert to database geometry type.- Parameters:
p
-- Returns:
-
translateGeographyParameter
public List<?> translateGeographyParameter(Parameter p)
Translate GEOGRAPHY parameter into an expression that will convert to database geography type.- Parameters:
p
-- Returns:
-
retrieveGeometryValue
public Object retrieveGeometryValue(ResultSet results, int paramIndex) throws SQLException
The default strategy assumes a blob value containing wkb- Parameters:
results
-paramIndex
-- Returns:
- Throws:
SQLException
-
retrieveGeographyValue
public Object retrieveGeographyValue(ResultSet results, int paramIndex) throws SQLException
The default strategy assumes a blob value containing wkb- Parameters:
results
-paramIndex
-- Returns:
- Throws:
SQLException
-
retrieveGeometryValue
public GeometryType retrieveGeometryValue(CallableStatement results, int parameterIndex) throws SQLException
- Throws:
SQLException
-
retrieveGeographyValue
public GeographyType retrieveGeographyValue(CallableStatement results, int parameterIndex) throws SQLException
- Throws:
SQLException
-
translateCommand
public 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.- Parameters:
command
-context
-- Returns:
- a list of translated parts
-
translateLimit
public 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.- Parameters:
limit
-context
-- Returns:
- a list of translated parts
-
getFunctionModifiers
public Map<String,FunctionModifier> getFunctionModifiers()
Return a map of function name to FunctionModifier.- Returns:
- Map of function name to FunctionModifier.
-
registerFunctionModifier
public void registerFunctionModifier(String name, FunctionModifier modifier)
Add theFunctionModifier
to the set of known modifiers.- Parameters:
name
-modifier
-
-
translateLiteralBoolean
public String translateLiteralBoolean(Boolean booleanValue)
Subclasses should override this method to provide a different sql translation of the literal boolean value. By default, a boolean literal is represented as:'0'
or'1'
.- Parameters:
booleanValue
- Boolean value, never null- Returns:
- Translated string
-
translateLiteralDate
public String translateLiteralDate(Date dateValue)
Subclasses should override this method to provide a different sql translation of the literal date value. By default, a date literal is represented as:{d '2002-12-31'}
- Parameters:
dateValue
- Date value, never null- Returns:
- Translated string
-
translateLiteralTime
public String translateLiteralTime(Time timeValue)
Subclasses should override this method to provide a different sql translation of the literal time value. By default, a time literal is represented as:{t '23:59:59'}
SeehasTimeType()
to represent literal times as timestamps.- Parameters:
timeValue
- Time value, never null- Returns:
- Translated string
-
translateLiteralTimestamp
public String translateLiteralTimestamp(Timestamp timestampValue)
Subclasses should override this method to provide a different sql translation of the literal timestamp value. By default, a timestamp literal is represented as:{ts '2002-12-31 23:59:59'}
. SeegetTimestampNanoPrecision()
to control the literal precision.- Parameters:
timestampValue
- Timestamp value, never null- Returns:
- Translated string
-
formatDateValue
public String formatDateValue(Date dateObject, boolean useTimezone)
Format the dateObject (of type date, time, or timestamp) into a string optionally using the DatabaseTimeZone.- Parameters:
dateObject
-- Returns:
- Formatted string
-
formatDateValue
public String formatDateValue(Date dateObject)
Format the dateObject (of type date, time, or timestamp) into a string using the DatabaseTimeZone.- Parameters:
dateObject
-- Returns:
- Formatted string
-
translateLiteralBinaryType
public String translateLiteralBinaryType(BinaryType obj)
Subclasses should override this method to provide a different sql translation of the literal varbinary value. By default, a varbinary literal is represented as:X'hex value'
- Parameters:
obj
- value, never null- Returns:
- Translated string
-
addSourceComment
public boolean addSourceComment()
Returns true to indicate that SQL should include a comment indicating the session and request ids.
-
useAsInGroupAlias
public boolean useAsInGroupAlias()
Indicates whether group alias should be of the form "...FROM groupA AS X" or "...FROM groupA X". Certain data sources (such as Oracle) may not support the first form.- Returns:
- boolean
-
usePreparedStatements
public boolean usePreparedStatements()
Use PreparedStatements (or CallableStatements) as appropriate for all commands. Bind values will be determined byLiteral.setBindEligible(boolean)
can be used to force a literal to be a bind value.
-
useParensForSetQueries
public boolean useParensForSetQueries()
Set to true to indicate that every branch of a set query should have parenthesis, i.e. (query) union (query)- Returns:
- true if parenthesis should be used for each set branch
-
hasTimeType
public boolean hasTimeType()
Return false to indicate that time support should be emulated with timestamps.- Returns:
- true if database has a time type
-
getSetOperationString
public String getSetOperationString(SetQuery.Operation operation)
Returns the name for a givenSetQuery.Operation
- Parameters:
operation
-- Returns:
- the name for the set operation
-
getSourceComment
public String getSourceComment(ExecutionContext context, Command command)
Returns the source comment for the given command- Parameters:
context
-command
-- Returns:
- the comment
-
replaceElementName
public String replaceElementName(String group, String element)
Override to return a name other than the default [group.]element- Parameters:
group
-element
-- Returns:
- thre replacement name
-
getTimestampNanoPrecision
public int getTimestampNanoPrecision()
Return the precision of timestamp literals. Defaults to 9.- Returns:
- digits of timestamp nano precision.
-
executeStoredProcedure
public ResultSet executeStoredProcedure(CallableStatement statement, List<Argument> preparedValues, Class<?> returnType) throws SQLException
This is a generic implementation. Because different databases handle stored procedures differently, subclasses should override this method if necessary.- Throws:
SQLException
-
registerSpecificTypeOfOutParameter
protected void registerSpecificTypeOfOutParameter(CallableStatement statement, Class<?> runtimeType, int index) throws SQLException
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- Throws:
SQLException
-
bindValue
public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
Sets prepared statement parameter i with param. Performs special handling to translate dates using the database time zone and to translate biginteger, float, and char to JDBC safe objects.- Parameters:
stmt
-param
-paramType
-i
-- Throws:
SQLException
-
useStreamsForLobs
public boolean useStreamsForLobs()
If streams should be used for Blob/Clob sets onPreparedStatement
s- Returns:
-
retrieveValue
public Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException
Retrieve the value on the current resultset row for the given column index.- Parameters:
results
-columnIndex
-expectedType
-- Returns:
- the value
- Throws:
SQLException
-
retrieveValue
public Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType) throws SQLException
Retrieve the value for the given parameter index- Parameters:
results
-parameterIndex
-expectedType
-- Returns:
- the value
- Throws:
SQLException
-
convertObject
protected Object convertObject(Object object) throws SQLException
- Throws:
SQLException
-
afterInitialConnectionObtained
protected void afterInitialConnectionObtained(Connection connection)
Called exactly once for this source.- Parameters:
connection
-
-
obtainedConnection
public void obtainedConnection(Connection connection)
Provides a hook to call source specific logic when a connection is obtained. defect request 13979 & 13978
-
getSQLConversionVisitor
public SQLConversionVisitor getSQLConversionVisitor()
Create theSQLConversionVisitor
that will perform translation. Typical custom JDBC connectors will not need to create custom conversion visitors, rather implementors should override existingJDBCExecutionFactory
methods.- Returns:
- the
SQLConversionVisitor
-
useParensForJoins
public boolean useParensForJoins()
Set to true to indicate that every branch of a join should have parenthesis.- Returns:
- true if every branch of a join should use parenthesis
-
getDefaultNullOrder
public ExecutionFactory.NullOrder getDefaultNullOrder()
Description copied from class:ExecutionFactory
Returns the default null ordering- Overrides:
getDefaultNullOrder
in classExecutionFactory<DataSource,Connection>
- Returns:
- the
ExecutionFactory.NullOrder
-
useSelectLimit
public boolean useSelectLimit()
Returns whether the limit clause is applied to the select clause.- Returns:
- true if the limit clause is part of the select
-
getLikeRegexString
public String getLikeRegexString()
Get the predicate name for LIKE_REGEX- Returns:
-
setFetchSize
public void setFetchSize(Command command, ExecutionContext context, Statement statement, int fetchSize) throws SQLException
Set the fetch size on the given statement.- Parameters:
context
-command
-statement
-fetchSize
-- Throws:
SQLException
-
supportsGeneratedKeys
public boolean supportsGeneratedKeys()
-
getStructRetrieval
@TranslatorProperty(display="Struct retrieval", description="Struct retrieval mode (OBJECT, COPY, ARRAY)", advanced=true) public JDBCExecutionFactory.StructRetrieval getStructRetrieval()
-
setStructRetrieval
public void setStructRetrieval(JDBCExecutionFactory.StructRetrieval structRetrieval)
-
supportsGeneratedKeys
protected boolean supportsGeneratedKeys(ExecutionContext context, Command command)
- Parameters:
context
-command
-- Returns:
- true if generated keys can be returned
-
createTempTable
public String createTempTable(String prefix, List<ColumnReference> cols, ExecutionContext context, Connection connection) throws SQLException
Create a temp table with the given name prefix and columns- Parameters:
prefix
-cols
-context
-connection
-- Returns:
- the name of the table created
- Throws:
SQLException
-
getCreateTempTableSQL
public String getCreateTempTableSQL(String name, List<ColumnReference> cols, boolean transactional)
-
getTemporaryTableName
public String getTemporaryTableName(String prefix)
- Parameters:
prefix
-- Returns:
- a valid temporary table name
-
getCreateTemporaryTablePostfix
public String getCreateTemporaryTablePostfix(boolean inTransaction)
- Parameters:
inTransaction
-- Returns:
- the post script for the temp table create
-
getCreateTemporaryTableString
public String getCreateTemporaryTableString(boolean inTransaction)
- Parameters:
inTransaction
-- Returns:
- the temp table creation ddl
-
getDialect
public SQLDialect getDialect()
-
getHibernateDialectClassName
public String getHibernateDialectClassName()
-
supportsDependentJoins
public boolean supportsDependentJoins()
Description copied from class:ExecutionFactory
NOTE: The pushed independent tuples will not have been converted to a unique set and may contain duplicates.- Overrides:
supportsDependentJoins
in classExecutionFactory<DataSource,Connection>
- Returns:
- true if dependent join key pushdown is supported
-
supportsFullDependentJoins
public boolean supportsFullDependentJoins()
- Overrides:
supportsFullDependentJoins
in classExecutionFactory<DataSource,Connection>
- Returns:
- true if full dependent join pushdown is supported
-
tempTableRequiresTransaction
public boolean tempTableRequiresTransaction()
-
loadedTemporaryTable
public void loadedTemporaryTable(String tableName, ExecutionContext context, Connection connection) throws SQLException
Called after the temporary table has been loaded- Parameters:
tableName
-context
-connection
-- Throws:
SQLException
-
isEnableDependentJoins
@TranslatorProperty(display="Enable Dependent Joins", description="Enable Dependent Join Pushdown", advanced=true) public boolean isEnableDependentJoins()
-
setEnableDependentJoins
public void setEnableDependentJoins(boolean enableDependentJoins)
-
useWithRollup
public boolean useWithRollup()
- Returns:
- true if the rollup syntax is WITH ROLLUP
-
getCommentFormat
@TranslatorProperty(display="Comment Format", description="Comment format string used with useCommentsInSourceQuery") public String getCommentFormat()
-
setCommentFormat
public void setCommentFormat(String commentFormat)
-
useScientificNotation
public boolean useScientificNotation()
- Returns:
- true if scientific notation should be used for float/double types
-
useUnicodePrefix
public boolean useUnicodePrefix()
- Returns:
- true if the N prefix an N* type binding should be used for strings containing non-ascii characters
-
useNBindingType
public boolean useNBindingType()
- Returns:
- true if an N type (NVARCHAR, NCLOB) should be used when a non-ascii value is encountered
-
isExtendedAscii
public boolean isExtendedAscii()
- Returns:
- true if the database code page includes extended characters values in the 128-255 range
-
isNonAscii
protected boolean isNonAscii(String val)
- Parameters:
val
-- Returns:
- true if the string is non-ascii
-
isNonAscii
protected boolean isNonAscii(Expression obj)
- Parameters:
obj
-- Returns:
- true if the string expression is possibly non-ascii
-
isCharacterType
protected boolean isCharacterType(Class<?> type)
- Parameters:
type
-- Returns:
- true if type is for characters
-
isNonAsciiFunction
protected boolean isNonAsciiFunction(Function f)
- Parameters:
f
-- Returns:
- true if the function is a conversion function to a non-ascii string type An implementation is not required if no such function exists, or the source can handle unicode string using the standard types.
-
intializeConnectionAfterCancel
public void intializeConnectionAfterCancel(Connection c) throws SQLException
Implemented if theConnection
needs initialized after a statement cancel- Parameters:
c
-- Throws:
SQLException
-
useBindingsForDependentJoin
@TranslatorProperty(display="Use Bindings For Dependent Join", description="If PreparedStatement bindings should be used for dependent join values.") public boolean useBindingsForDependentJoin()
Description copied from class:ExecutionFactory
If dependent join predicates should use literals that are marked as bind eligible.- Overrides:
useBindingsForDependentJoin
in classExecutionFactory<DataSource,Connection>
-
setUseBindingsForDependentJoin
public void setUseBindingsForDependentJoin(boolean useBindingsForDependentJoin)
-
useColumnNamesForGeneratedKeys
public boolean useColumnNamesForGeneratedKeys()
- Returns:
- true if column names are required to retrieve generated keys
-
getLateralKeyword
public String getLateralKeyword()
-
getRemovePushdownCharacters
@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()
-
setRemovePushdownCharacters
public void setRemovePushdownCharacters(String removePushdownCharacters)
-
isDefaultTimeZone
public boolean isDefaultTimeZone()
- Returns:
- true if the translator is using the VM default TimeZone
-
supportsProcedureParameterExpression
public boolean supportsProcedureParameterExpression()
Description copied from class:ExecutionFactory
Return true if the translator supports expressions as procedure paramters.- Overrides:
supportsProcedureParameterExpression
in classExecutionFactory<DataSource,Connection>
- Returns:
-
-