@Translator(name="oracle", description="A translator for Oracle 9i Database or later") public class OracleExecutionFactory extends JDBCExecutionFactory
JDBCExecutionFactory.StructRetrievalExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport| Modifier and Type | Field and Description |
|---|---|
static String |
DUAL |
static Version |
ELEVEN_2 |
static Version |
ELEVEN_2_0_4 |
static String |
FILTER |
static String |
HINT_PREFIX |
static String |
HINT_SUFFIX |
static String |
NEAREST_NEIGHBOR |
static String |
NEAREST_NEIGHBOR_DISTANCE |
static Version |
NINE_0 |
static Version |
NINE_2 |
static String |
ORACLE |
static String |
ORACLE_SDO |
static String |
RELATE |
static String |
ROWNUM |
static String |
SEQUENCE |
static Version |
TWELVE |
static String |
WITHIN_DISTANCE |
DEFAULT_MAX_DEPENDENT_PREDICATES, DEFAULT_MAX_IN_CRITERIA, DEFAULT_TIME_ZONE, dialectDEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE| Constructor and Description |
|---|
OracleExecutionFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindValue(PreparedStatement stmt,
Object param,
Class<?> paramType,
int i)
Sets prepared statement parameter i with param.
|
protected JDBCMetadataProcessor |
createMetadataProcessor()
Deprecated.
|
String |
createTempTable(String string,
List<ColumnReference> cols,
ExecutionContext context,
Connection connection)
Create a temp table with the given name prefix and columns
|
ResultSet |
executeStoredProcedure(CallableStatement statement,
List<Argument> preparedValues,
Class<?> returnType)
This is a generic implementation.
|
String |
getCreateTemporaryTablePostfix(boolean inTransaction) |
String |
getCreateTemporaryTableString(boolean inTransaction) |
ExecutionFactory.NullOrder |
getDefaultNullOrder()
Returns the default null ordering
|
String |
getHibernateDialectClassName() |
MetadataProcessor<Connection> |
getMetadataProcessor()
Get a MetadataProcessor for the translator to read the metadata.
|
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. |
List<String> |
getSupportedFunctions()
Get list of all supported function names.
|
String |
getTemporaryTableName(String prefix)
uses a random table name strategy with a
retry in the
createTempTable(String, List, ExecutionContext, Connection) method |
void |
handleInsertSequences(Insert insert) |
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 |
isOracleSuppliedDriver() |
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)
Don't fully qualify elements if table = DUAL or element = ROWNUM or special stuff is packed into name in source value.
|
Object |
retrieveGeometryValue(ResultSet results,
int paramIndex) |
void |
setOracleSuppliedDriver(boolean oracleNative) |
void |
start()
Initialize the connector with supplied configuration
|
boolean |
supportsAggregatesEnhancedNumeric()
Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMP
|
boolean |
supportsArrayType()
The engine uses array types for dependent joins and for array expression.
|
protected boolean |
supportsBooleanExpressions()
if boolean expressions are directly supported.
|
boolean |
supportsCommonTableExpressions() |
boolean |
supportsConvert(int fromType,
int toType)
Used for fine grained control of convert/cast pushdown.
|
boolean |
supportsCorrelatedSubqueryLimit() |
boolean |
supportsElementaryOlapOperations() |
boolean |
supportsExcept()
Support indicates that the connector supports the EXCEPT of two queries.
|
boolean |
supportsFormatLiteral(String literal,
ExecutionFactory.Format format) |
boolean |
supportsFunctionsInGroupBy()
Support indicates that the connector supports non-column expressions in GROUP BY, such as:
SELECT dayofmonth(theDate), COUNT(*) FROM table GROUP BY dayofmonth(theDate) |
protected boolean |
supportsGeneratedKeys(ExecutionContext context,
Command command) |
boolean |
supportsGroupByRollup() |
boolean |
supportsInlineViews()
Support indicates connector can accept inline views (subqueries
in the FROM clause).
|
boolean |
supportsIntersect()
Support indicates that the connector supports the INTERSECT of two queries.
|
boolean |
supportsLikeRegex() |
boolean |
supportsOnlyFormatLiterals()
|
boolean |
supportsOrderByNullOrdering()
Returns whether the database supports explicit null ordering.
|
boolean |
supportsRecursiveCommonTableExpressions() |
boolean |
supportsRowLimit()
Gets whether the connector can limit the number of rows returned by a query.
|
boolean |
supportsRowOffset()
Gets whether the connector supports a SQL clause (similar to the LIMIT with an offset) that can return
result sets that start in the middle of the resulting rows returned by a query
|
boolean |
supportsSelectExpressionArrayType() |
boolean |
supportsSelectWithoutFrom() |
boolean |
supportsSubqueryInOn()
Refines subquery support.
|
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. |
Expression |
translateGeometrySelect(Expression expr)
Translate GEOMETRY column reference into an expression that
will return SRID & WKB.
|
String |
translateLiteralBinaryType(BinaryType obj)
Subclasses should override this method to provide a different sql translation
of the literal varbinary 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 |
useColumnNamesForGeneratedKeys() |
protected boolean |
usesDatabaseVersion() |
boolean |
useStreamsForLobs()
If streams should be used for Blob/Clob sets on
PreparedStatements |
addSourceComment, afterInitialConnectionObtained, closeConnection, convertObject, createDirectExecution, createProcedureExecution, createResultSetExecution, createUpdateExecution, formatDateValue, formatDateValue, getCommentFormat, getConnection, getCreateTempTableSQL, getDatabaseCalendar, getDatabaseTimeZone, getDatabaseVersion, getDefaultSupportedFunctions, getDialect, getFunctionModifiers, getLateralKeyword, getLikeRegexString, getMaxPreparedInsertBatchSize, getMetadata, getStructRetrieval, getTimestampNanoPrecision, getVersion, isEnableDependentJoins, isSourceRequired, isSourceRequiredForCapabilities, isTrimStrings, loadedTemporaryTable, obtainedConnection, parseName, registerFunctionModifier, retrieveGeometryValue, retrieveValue, retrieveValue, setCommentFormat, setDatabaseTimeZone, setDatabaseVersion, setDatabaseVersion, setEnableDependentJoins, setFetchSize, setMaxPreparedInsertBatchSize, setStructRetrieval, setTrimStrings, setUseBindingsForDependentJoin, setUseBindVariables, setUseCommentsInSourceQuery, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsBatchedUpdates, supportsBulkUpdate, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsCorrelatedSubqueries, supportsDependentJoins, supportsExistsCriteria, supportsFullDependentJoins, supportsGeneratedKeys, supportsGroupBy, supportsHaving, supportsInCriteria, supportsInCriteriaSubquery, supportsInsertWithQueryExpression, supportsIsNullCriteria, supportsLikeCriteria, supportsLikeCriteriaEscapeCharacter, supportsNotCriteria, supportsOrCriteria, supportsOrderByUnrelated, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsScalarSubqueries, supportsSearchedCaseExpressions, supportsSelectExpression, supportsSelfJoins, supportsSetQueryOrderBy, supportsUnions, tempTableRequiresTransaction, translateGeometryLiteral, translateLimit, translateLiteralBoolean, translateLiteralDate, translateLiteralTime, useBindingsForDependentJoin, useBindVariables, useCommentsInSourceQuery, useParensForJoins, useParensForSetQueries, usePreparedStatements, useScientificNotation, useSelectLimit, useUnicodePrefix, useWithRollupaddPushDownFunction, 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, supportsArrayAgg, supportsCompareCriteriaOrderedExclusive, supportsDirectQueryProcedure, supportsFullOuterJoins, supportsGroupByMultipleDistinctAggregates, supportsInnerJoins, supportsIsDistinctCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyLiteralComparison, supportsOnlySingleTableGroupBy, supportsOrderBy, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsScalarSubqueryProjection, supportsSelectDistinct, supportsSetQueryLimitOffset, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowOrderByWithAggregates, useAnsiJoinpublic static final Version NINE_0
public static final Version NINE_2
public static final Version ELEVEN_2_0_4
public static final Version ELEVEN_2
public static final Version TWELVE
public static final String HINT_PREFIX
public static final String HINT_SUFFIX
public static final String DUAL
public static final String ROWNUM
public static final String SEQUENCE
public static final String RELATE
public static final String NEAREST_NEIGHBOR
public static final String FILTER
public static final String WITHIN_DISTANCE
public static final String NEAREST_NEIGHBOR_DISTANCE
public static final String ORACLE_SDO
public static final String ORACLE
public void start()
throws TranslatorException
ExecutionFactorystart in class JDBCExecutionFactoryTranslatorExceptionpublic void initCapabilities(Connection connection) throws TranslatorException
ExecutionFactoryExecutionFactory.start() with a null connection if a source connection is not ExecutionFactory.isSourceRequiredForCapabilities()initCapabilities in class JDBCExecutionFactoryTranslatorExceptionpublic void handleInsertSequences(Insert insert) throws TranslatorException
TranslatorExceptionpublic List<?> translateCommand(Command command, ExecutionContext context)
JDBCExecutionFactoryLanguageObjects and Objects), or null
if to rely on the default translation.translateCommand in class JDBCExecutionFactorypublic boolean useAsInGroupAlias()
JDBCExecutionFactoryuseAsInGroupAlias in class JDBCExecutionFactorypublic String getSetOperationString(SetQuery.Operation operation)
JDBCExecutionFactorySetQuery.OperationgetSetOperationString in class JDBCExecutionFactorypublic String getSourceComment(ExecutionContext context, Command command)
JDBCExecutionFactorygetSourceComment in class JDBCExecutionFactorypublic String replaceElementName(String group, String element)
replaceElementName in class JDBCExecutionFactoryorg.teiid.language.visitor.SQLStringVisitor#skipGroupInElement(java.lang.String, java.lang.String)public boolean hasTimeType()
JDBCExecutionFactoryhasTimeType in class JDBCExecutionFactorypublic void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
JDBCExecutionFactorybindValue in class JDBCExecutionFactorySQLExceptionpublic boolean useStreamsForLobs()
JDBCExecutionFactoryPreparedStatementsuseStreamsForLobs in class JDBCExecutionFactorypublic ExecutionFactory.NullOrder getDefaultNullOrder()
ExecutionFactorygetDefaultNullOrder in class JDBCExecutionFactoryExecutionFactory.NullOrderpublic boolean supportsOrderByNullOrdering()
ExecutionFactorysupportsOrderByNullOrdering in class ExecutionFactory<DataSource,Connection>public SQLConversionVisitor getSQLConversionVisitor()
JDBCExecutionFactorySQLConversionVisitor that will perform translation. Typical custom
JDBC connectors will not need to create custom conversion visitors, rather implementors
should override existing JDBCExecutionFactory methods.getSQLConversionVisitor in class JDBCExecutionFactorySQLConversionVisitorpublic List<String> getSupportedFunctions()
ExecutionFactorygetSupportedFunctions in class JDBCExecutionFactoryfor 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 String translateLiteralTimestamp(Timestamp timestampValue)
JDBCExecutionFactory{ts '2002-12-31 23:59:59'}.
See JDBCExecutionFactory.getTimestampNanoPrecision() to control the literal
precision.translateLiteralTimestamp in class JDBCExecutionFactorytimestampValue - Timestamp value, never nullpublic boolean supportsInlineViews()
ExecutionFactorysupportsInlineViews in class JDBCExecutionFactorypublic boolean supportsFunctionsInGroupBy()
ExecutionFactorySupport indicates that the connector supports non-column expressions in GROUP BY, such as:
SELECT dayofmonth(theDate), COUNT(*) FROM table GROUP BY dayofmonth(theDate)
supportsFunctionsInGroupBy in class ExecutionFactory<DataSource,Connection>public boolean supportsRowLimit()
ExecutionFactorysupportsRowLimit in class ExecutionFactory<DataSource,Connection>public boolean supportsRowOffset()
ExecutionFactorysupportsRowOffset in class ExecutionFactory<DataSource,Connection>public boolean supportsExcept()
ExecutionFactorysupportsExcept in class ExecutionFactory<DataSource,Connection>public boolean supportsIntersect()
ExecutionFactorysupportsIntersect in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesEnhancedNumeric()
ExecutionFactorysupportsAggregatesEnhancedNumeric in class ExecutionFactory<DataSource,Connection>public boolean supportsElementaryOlapOperations()
supportsElementaryOlapOperations in class ExecutionFactory<DataSource,Connection>public boolean supportsLikeRegex()
supportsLikeRegex in class ExecutionFactory<DataSource,Connection>public void setOracleSuppliedDriver(boolean oracleNative)
@TranslatorProperty(display="Oracle Supplied Driver", description="True if the driver is an Oracle supplied driver", advanced=true) public boolean isOracleSuppliedDriver()
protected void registerSpecificTypeOfOutParameter(CallableStatement statement, Class<?> runtimeType, int index) throws SQLException
JDBCExecutionFactoryregisterSpecificTypeOfOutParameter in class JDBCExecutionFactorySQLExceptionpublic ResultSet executeStoredProcedure(CallableStatement statement, List<Argument> preparedValues, Class<?> returnType) throws SQLException
JDBCExecutionFactoryexecuteStoredProcedure in class JDBCExecutionFactorySQLExceptionpublic boolean supportsOnlyFormatLiterals()
ExecutionFactorysupportsOnlyFormatLiterals in class ExecutionFactory<DataSource,Connection>public boolean supportsFormatLiteral(String literal, ExecutionFactory.Format format)
supportsFormatLiteral in class ExecutionFactory<DataSource,Connection>public boolean supportsArrayType()
ExecutionFactorysupportsArrayType in class ExecutionFactory<DataSource,Connection>@Deprecated protected JDBCMetadataProcessor createMetadataProcessor()
createMetadataProcessor in class JDBCExecutionFactorygetMetadataProcessorpublic MetadataProcessor<Connection> getMetadataProcessor()
ExecutionFactorygetMetadataProcessor in class JDBCExecutionFactorypublic boolean supportsCommonTableExpressions()
supportsCommonTableExpressions in class ExecutionFactory<DataSource,Connection>public boolean supportsRecursiveCommonTableExpressions()
supportsRecursiveCommonTableExpressions in class ExecutionFactory<DataSource,Connection>protected boolean supportsGeneratedKeys(ExecutionContext context, Command command)
supportsGeneratedKeys in class JDBCExecutionFactoryprotected boolean usesDatabaseVersion()
usesDatabaseVersion in class JDBCExecutionFactorypublic boolean supportsSelectWithoutFrom()
supportsSelectWithoutFrom in class ExecutionFactory<DataSource,Connection>public String createTempTable(String string, List<ColumnReference> cols, ExecutionContext context, Connection connection) throws SQLException
JDBCExecutionFactorycreateTempTable in class JDBCExecutionFactorySQLExceptionpublic String getTemporaryTableName(String prefix)
createTempTable(String, List, ExecutionContext, Connection) methodgetTemporaryTableName in class JDBCExecutionFactorypublic String getCreateTemporaryTablePostfix(boolean inTransaction)
getCreateTemporaryTablePostfix in class JDBCExecutionFactorypublic String getCreateTemporaryTableString(boolean inTransaction)
getCreateTemporaryTableString in class JDBCExecutionFactorypublic String getHibernateDialectClassName()
getHibernateDialectClassName in class JDBCExecutionFactorypublic boolean supportsGroupByRollup()
supportsGroupByRollup in class ExecutionFactory<DataSource,Connection>public Expression translateGeometrySelect(Expression expr)
JDBCExecutionFactorytranslateGeometrySelect in class JDBCExecutionFactorypublic Object retrieveGeometryValue(ResultSet results, int paramIndex) throws SQLException
retrieveGeometryValue in class JDBCExecutionFactorySQLExceptionpublic void intializeConnectionAfterCancel(Connection c) throws SQLException
JDBCExecutionFactoryConnection needs initialized after a statement cancelintializeConnectionAfterCancel in class JDBCExecutionFactorySQLExceptionpublic boolean supportsCorrelatedSubqueryLimit()
supportsCorrelatedSubqueryLimit in class ExecutionFactory<DataSource,Connection>public boolean useColumnNamesForGeneratedKeys()
useColumnNamesForGeneratedKeys in class JDBCExecutionFactorypublic String translateLiteralBinaryType(BinaryType obj)
JDBCExecutionFactoryX'hex value'translateLiteralBinaryType in class JDBCExecutionFactoryobj - value, never nullpublic boolean supportsSubqueryInOn()
ExecutionFactorysupportsSubqueryInOn in class ExecutionFactory<DataSource,Connection>public boolean supportsConvert(int fromType,
int toType)
ExecutionFactoryExecutionFactory.getSupportedFunctions() should
contain SourceSystemFunctions.CONVERT. This method can then return false to indicate
a lack of specific support. The engine will does not care about an unnecessary conversion
where fromType == toType.
By default lob conversion is disabled.supportsConvert in class ExecutionFactory<DataSource,Connection>fromType - @see RUNTIME_CODEStoType - @see RUNTIME_CODESprotected boolean supportsBooleanExpressions()
JDBCExecutionFactorysupportsBooleanExpressions in class JDBCExecutionFactorypublic boolean supportsSelectExpressionArrayType()
supportsSelectExpressionArrayType in class ExecutionFactory<DataSource,Connection>public List<?> translate(LanguageObject obj, ExecutionContext context)
JDBCExecutionFactoryLanguageObjects and Objects), or null
if to rely on the default translation. Override with care.translate in class JDBCExecutionFactoryCopyright © 2017 JBoss by Red Hat. All rights reserved.