Package org.teiid.translator.jdbc.oracle
Class OracleExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<DataSource,Connection>
-
- org.teiid.translator.jdbc.JDBCExecutionFactory
-
- org.teiid.translator.jdbc.oracle.OracleExecutionFactory
-
@Translator(name="oracle", description="A translator for Oracle 9i Database or later") public class OracleExecutionFactory extends JDBCExecutionFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
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 protected Map<Class<?>,Integer>customTypeCodesstatic StringDUALstatic VersionELEVEN_2static VersionELEVEN_2_0_4static StringFILTERstatic StringHINT_PREFIXstatic StringHINT_SUFFIXstatic StringNEAREST_NEIGHBORstatic StringNEAREST_NEIGHBOR_DISTANCEstatic VersionNINE_0static VersionNINE_2static StringORACLEstatic StringORACLE_SDOstatic StringRELATEstatic StringROWNUMstatic StringSEQUENCEstatic VersionTWELVEstatic StringWITHIN_DISTANCE-
Fields inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
DEFAULT_MAX_DEPENDENT_PREDICATES, DEFAULT_MAX_IN_CRITERIA, DEFAULT_TIME_ZONE, 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 OracleExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidbindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i)Sets prepared statement parameter i with param.protected JDBCMetadataProcessorcreateMetadataProcessor()Deprecated.StringcreateTempTable(String string, List<ColumnReference> cols, ExecutionContext context, Connection connection)Create a temp table with the given name prefix and columnsResultSetexecuteStoredProcedure(CallableStatement statement, List<Argument> preparedValues, Class<?> returnType)This is a generic implementation.StringgetCreateTemporaryTablePostfix(boolean inTransaction)StringgetCreateTemporaryTableString(boolean inTransaction)ExecutionFactory.NullOrdergetDefaultNullOrder()Returns the default null orderingStringgetHibernateDialectClassName()MetadataProcessor<Connection>getMetadataProcessor()Get a MetadataProcessor for the translator to read the metadata.StringgetSetOperationString(SetQuery.Operation operation)Returns the name for a givenSetQuery.OperationStringgetSourceComment(ExecutionContext context, Command command)Returns the source comment for the given commandSQLConversionVisitorgetSQLConversionVisitor()Create theSQLConversionVisitorthat will perform translation.List<String>getSupportedFunctions()Get list of all supported function names.StringgetTemporaryTableName(String prefix)uses a random table name strategy with a retry in thecreateTempTable(String, List, ExecutionContext, Connection)methodvoidhandleInsertSequences(Insert insert)booleanhasTimeType()Return false to indicate that time support should be emulated with timestamps.voidinitCapabilities(Connection connection)Will be called byExecutionFactory.start()with a null connection if a source connection is notExecutionFactory.isSourceRequiredForCapabilities()voidintializeConnectionAfterCancel(Connection c)Implemented if theConnectionneeds initialized after a statement cancelbooleanisExtendedAscii()protected booleanisNonAsciiFunction(Function f)booleanisOracleSuppliedDriver()protected voidregisterSpecificTypeOfOutParameter(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 typesStringreplaceElementName(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.ObjectretrieveGeometryValue(ResultSet results, int paramIndex)The default strategy assumes a blob value containing wkbvoidsetOracleSuppliedDriver(boolean oracleNative)voidstart()Initialize the connector with supplied configurationbooleansupportsAggregatesEnhancedNumeric()Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMPbooleansupportsArrayType()The engine uses array types for dependent joins and for array expression.protected booleansupportsBooleanExpressions()if boolean expressions are directly supported.booleansupportsCommonTableExpressions()booleansupportsConvert(int fromType, int toType)Used for fine grained control of convert/cast pushdown.booleansupportsCorrelatedSubqueryLimit()booleansupportsElementaryOlapOperations()booleansupportsExcept()Support indicates that the connector supports the EXCEPT of two queries.booleansupportsFormatLiteral(String literal, ExecutionFactory.Format format)booleansupportsFunctionsInGroupBy()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 booleansupportsGeneratedKeys(ExecutionContext context, Command command)booleansupportsGroupByRollup()booleansupportsInlineViews()Support indicates connector can accept inline views (subqueries in the FROM clause).booleansupportsIntersect()Support indicates that the connector supports the INTERSECT of two queries.booleansupportsLikeRegex()booleansupportsOnlyFormatLiterals()booleansupportsOnlyTimestampAddLiteral()booleansupportsOrderByNullOrdering()Returns whether the database supports explicit null ordering.booleansupportsRecursiveCommonTableExpressions()booleansupportsRowLimit()Gets whether the connector can limit the number of rows returned by a query.booleansupportsRowOffset()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 querybooleansupportsSelectExpressionArrayType()booleansupportsSelectWithoutFrom()booleansupportsSubqueryInOn()Refines subquery support.booleansupportsWindowFunctionNthValue()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.ExpressiontranslateGeometrySelect(Expression expr)Translate GEOMETRY column reference into an expression that will return WKB and possibly the SRID.StringtranslateLiteralBinaryType(BinaryType obj)Subclasses should override this method to provide a different sql translation of the literal varbinary value.StringtranslateLiteralTimestamp(Timestamp timestampValue)Subclasses should override this method to provide a different sql translation of the literal timestamp value.booleanuseAsInGroupAlias()Indicates whether group alias should be of the form "...FROM groupA AS X" or "...FROM groupA X".booleanuseColumnNamesForGeneratedKeys()booleanuseNBindingType()protected booleanusesDatabaseVersion()booleanuseStreamsForLobs()If streams should be used for Blob/Clob sets onPreparedStatementsbooleanuseUnicodePrefix()-
Methods inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
addSourceComment, afterInitialConnectionObtained, closeConnection, convertObject, createDirectExecution, createProcedureExecution, createResultSetExecution, createUpdateExecution, formatDateValue, formatDateValue, getCommentFormat, getConnection, getCreateTempTableSQL, getDatabaseCalendar, getDatabaseTimeZone, getDatabaseVersion, getDefaultSupportedFunctions, getDialect, getFunctionModifiers, getLateralKeyword, getLikeRegexString, getMaxPreparedInsertBatchSize, getMetadata, getRemovePushdownCharacters, getStructRetrieval, getTimestampNanoPrecision, getVersion, isCharacterType, isDefaultTimeZone, isEnableDependentJoins, isNonAscii, isNonAscii, isSourceRequired, isSourceRequiredForCapabilities, isTrimStrings, loadedTemporaryTable, obtainedConnection, preserveNullTyping, registerFunctionModifier, retrieveGeographyValue, retrieveGeographyValue, retrieveGeometryValue, retrieveValue, retrieveValue, setCommentFormat, setDatabaseTimeZone, setDatabaseVersion, setDatabaseVersion, setEnableDependentJoins, setFetchSize, setMaxPreparedInsertBatchSize, setRemovePushdownCharacters, 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, supportsProcedureParameterExpression, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsScalarSubqueries, supportsSearchedCaseExpressions, supportsSelectExpression, supportsSelfJoins, supportsSetQueryOrderBy, supportsUnions, tempTableRequiresTransaction, translateGeographyLiteral, translateGeographyParameter, translateGeographySelect, translateGeometryLiteral, translateGeometryParameter, translateLimit, translateLiteralBoolean, translateLiteralDate, translateLiteralTime, useBindingsForDependentJoin, useBindVariables, useCommentsInSourceQuery, useParensForJoins, useParensForSetQueries, usePreparedStatements, useScientificNotation, useSelectLimit, 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, supportsArrayAgg, supportsCompareCriteriaOrderedExclusive, supportsDirectQueryProcedure, supportsFullOuterJoins, supportsGeographyType, supportsGroupByMultipleDistinctAggregates, supportsInnerJoins, supportsIsDistinctCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlyRelationshipStyleJoins, supportsOnlySingleTableGroupBy, supportsOrderBy, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsScalarSubqueryProjection, supportsSelectDistinct, supportsSetQueryLimitOffset, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoin
-
-
-
-
Field Detail
-
NINE_0
public static final Version NINE_0
-
NINE_2
public static final Version NINE_2
-
ELEVEN_2_0_4
public static final Version ELEVEN_2_0_4
-
ELEVEN_2
public static final Version ELEVEN_2
-
TWELVE
public static final Version TWELVE
-
HINT_PREFIX
public static final String HINT_PREFIX
- See Also:
- Constant Field Values
-
HINT_SUFFIX
public static final String HINT_SUFFIX
- See Also:
- Constant Field Values
-
DUAL
public static final String DUAL
- See Also:
- Constant Field Values
-
ROWNUM
public static final String ROWNUM
- See Also:
- Constant Field Values
-
SEQUENCE
public static final String SEQUENCE
- See Also:
- Constant Field Values
-
RELATE
public static final String RELATE
- See Also:
- Constant Field Values
-
NEAREST_NEIGHBOR
public static final String NEAREST_NEIGHBOR
- See Also:
- Constant Field Values
-
FILTER
public static final String FILTER
- See Also:
- Constant Field Values
-
WITHIN_DISTANCE
public static final String WITHIN_DISTANCE
- See Also:
- Constant Field Values
-
NEAREST_NEIGHBOR_DISTANCE
public static final String NEAREST_NEIGHBOR_DISTANCE
- See Also:
- Constant Field Values
-
ORACLE_SDO
public static final String ORACLE_SDO
- See Also:
- Constant Field Values
-
ORACLE
public static final String ORACLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start() throws TranslatorExceptionDescription copied from class:ExecutionFactoryInitialize the connector with supplied configuration- Overrides:
startin classJDBCExecutionFactory- Throws:
TranslatorException
-
initCapabilities
public void initCapabilities(Connection connection) throws TranslatorException
Description copied from class:ExecutionFactoryWill be called byExecutionFactory.start()with a null connection if a source connection is notExecutionFactory.isSourceRequiredForCapabilities()- Overrides:
initCapabilitiesin classJDBCExecutionFactory- Throws:
TranslatorException
-
handleInsertSequences
public void handleInsertSequences(Insert insert) throws TranslatorException
- Throws:
TranslatorException
-
translateCommand
public List<?> translateCommand(Command command, ExecutionContext context)
Description copied from class:JDBCExecutionFactoryReturn a List of translated parts (LanguageObjects and Objects), or null if to rely on the default translation.- Overrides:
translateCommandin classJDBCExecutionFactory- Returns:
- a list of translated parts
-
useAsInGroupAlias
public boolean useAsInGroupAlias()
Description copied from class:JDBCExecutionFactoryIndicates 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.- Overrides:
useAsInGroupAliasin classJDBCExecutionFactory- Returns:
- boolean
-
getSetOperationString
public String getSetOperationString(SetQuery.Operation operation)
Description copied from class:JDBCExecutionFactoryReturns the name for a givenSetQuery.Operation- Overrides:
getSetOperationStringin classJDBCExecutionFactory- Returns:
- the name for the set operation
-
getSourceComment
public String getSourceComment(ExecutionContext context, Command command)
Description copied from class:JDBCExecutionFactoryReturns the source comment for the given command- Overrides:
getSourceCommentin classJDBCExecutionFactory- Returns:
- the comment
-
replaceElementName
public 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.- Overrides:
replaceElementNamein classJDBCExecutionFactory- Returns:
- thre replacement name
- Since:
- 5.0
-
hasTimeType
public boolean hasTimeType()
Description copied from class:JDBCExecutionFactoryReturn false to indicate that time support should be emulated with timestamps.- Overrides:
hasTimeTypein classJDBCExecutionFactory- Returns:
- true if database has a time type
-
bindValue
public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
Description copied from class:JDBCExecutionFactorySets 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.- Overrides:
bindValuein classJDBCExecutionFactory- Throws:
SQLException
-
useStreamsForLobs
public boolean useStreamsForLobs()
Description copied from class:JDBCExecutionFactoryIf streams should be used for Blob/Clob sets onPreparedStatements- Overrides:
useStreamsForLobsin classJDBCExecutionFactory- Returns:
-
getDefaultNullOrder
public ExecutionFactory.NullOrder getDefaultNullOrder()
Description copied from class:ExecutionFactoryReturns the default null ordering- Overrides:
getDefaultNullOrderin classJDBCExecutionFactory- Returns:
- the
ExecutionFactory.NullOrder
-
supportsOrderByNullOrdering
public boolean supportsOrderByNullOrdering()
Description copied from class:ExecutionFactoryReturns whether the database supports explicit null ordering.- Overrides:
supportsOrderByNullOrderingin classExecutionFactory<DataSource,Connection>- Returns:
- true if nulls first/last can be specified
-
getSQLConversionVisitor
public SQLConversionVisitor getSQLConversionVisitor()
Description copied from class:JDBCExecutionFactoryCreate theSQLConversionVisitorthat will perform translation. Typical custom JDBC connectors will not need to create custom conversion visitors, rather implementors should override existingJDBCExecutionFactorymethods.- Overrides:
getSQLConversionVisitorin classJDBCExecutionFactory- Returns:
- the
SQLConversionVisitor
-
getSupportedFunctions
public List<String> getSupportedFunctions()
Description copied from class:ExecutionFactoryGet list of all supported function names. Arithmetic functions have names like "+".- Overrides:
getSupportedFunctionsin classJDBCExecutionFactory- 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.
-
translateLiteralTimestamp
public String translateLiteralTimestamp(Timestamp timestampValue)
Description copied from class:JDBCExecutionFactorySubclasses 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'}. SeeJDBCExecutionFactory.getTimestampNanoPrecision()to control the literal precision.- Overrides:
translateLiteralTimestampin classJDBCExecutionFactory- Parameters:
timestampValue- Timestamp value, never null- Returns:
- Translated string
-
supportsInlineViews
public boolean supportsInlineViews()
Description copied from class:ExecutionFactorySupport indicates connector can accept inline views (subqueries in the FROM clause).- Overrides:
supportsInlineViewsin classJDBCExecutionFactory
-
supportsFunctionsInGroupBy
public boolean supportsFunctionsInGroupBy()
Description copied from class:ExecutionFactorySupport indicates that the connector supports non-column expressions in GROUP BY, such as:
SELECT dayofmonth(theDate), COUNT(*) FROM table GROUP BY dayofmonth(theDate)- Overrides:
supportsFunctionsInGroupByin classExecutionFactory<DataSource,Connection>
-
supportsRowLimit
public boolean supportsRowLimit()
Description copied from class:ExecutionFactoryGets whether the connector can limit the number of rows returned by a query.- Overrides:
supportsRowLimitin classExecutionFactory<DataSource,Connection>
-
supportsRowOffset
public boolean supportsRowOffset()
Description copied from class:ExecutionFactoryGets 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- Overrides:
supportsRowOffsetin classExecutionFactory<DataSource,Connection>
-
supportsExcept
public boolean supportsExcept()
Description copied from class:ExecutionFactorySupport indicates that the connector supports the EXCEPT of two queries.- Overrides:
supportsExceptin classExecutionFactory<DataSource,Connection>
-
supportsIntersect
public boolean supportsIntersect()
Description copied from class:ExecutionFactorySupport indicates that the connector supports the INTERSECT of two queries.- Overrides:
supportsIntersectin classExecutionFactory<DataSource,Connection>
-
supportsAggregatesEnhancedNumeric
public boolean supportsAggregatesEnhancedNumeric()
Description copied from class:ExecutionFactorySupport indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMP- Overrides:
supportsAggregatesEnhancedNumericin classExecutionFactory<DataSource,Connection>
-
supportsElementaryOlapOperations
public boolean supportsElementaryOlapOperations()
- Overrides:
supportsElementaryOlapOperationsin classExecutionFactory<DataSource,Connection>- Returns:
- true if Elementary OLAP operations are supported including window functions and inline window specifications that include simple expressions in partitioning and ordering
-
supportsLikeRegex
public boolean supportsLikeRegex()
- Overrides:
supportsLikeRegexin classExecutionFactory<DataSource,Connection>- Returns:
- true if the LIKE_REGEX predicate is supported
-
setOracleSuppliedDriver
public void setOracleSuppliedDriver(boolean oracleNative)
-
isOracleSuppliedDriver
@TranslatorProperty(display="Oracle Supplied Driver", description="True if the driver is an Oracle supplied driver", advanced=true) public boolean isOracleSuppliedDriver()
-
registerSpecificTypeOfOutParameter
protected void registerSpecificTypeOfOutParameter(CallableStatement statement, Class<?> runtimeType, int index) throws SQLException
Description copied from class:JDBCExecutionFactoryFor 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- Overrides:
registerSpecificTypeOfOutParameterin classJDBCExecutionFactory- Throws:
SQLException
-
executeStoredProcedure
public ResultSet executeStoredProcedure(CallableStatement statement, List<Argument> preparedValues, Class<?> returnType) throws SQLException
Description copied from class:JDBCExecutionFactoryThis is a generic implementation. Because different databases handle stored procedures differently, subclasses should override this method if necessary.- Overrides:
executeStoredProcedurein classJDBCExecutionFactory- Throws:
SQLException
-
supportsOnlyFormatLiterals
public boolean supportsOnlyFormatLiterals()
Description copied from class:ExecutionFactory- Overrides:
supportsOnlyFormatLiteralsin classExecutionFactory<DataSource,Connection>- Returns:
- true if only literal formats are supports.
-
supportsFormatLiteral
public boolean supportsFormatLiteral(String literal, ExecutionFactory.Format format)
- Overrides:
supportsFormatLiteralin classExecutionFactory<DataSource,Connection>- Returns:
- true if the given Java format string is supported
-
supportsArrayType
public boolean supportsArrayType()
Description copied from class:ExecutionFactoryThe engine uses array types for dependent joins and for array expression.- Overrides:
supportsArrayTypein classExecutionFactory<DataSource,Connection>- Returns:
- true if an array type is supported.
-
createMetadataProcessor
@Deprecated protected JDBCMetadataProcessor createMetadataProcessor()
Deprecated.- Overrides:
createMetadataProcessorin classJDBCExecutionFactory- See Also:
JDBCExecutionFactory.getMetadataProcessor()
-
getMetadataProcessor
public MetadataProcessor<Connection> getMetadataProcessor()
Description copied from class:ExecutionFactoryGet a MetadataProcessor for the translator to read the metadata. Typically this will return a new instance.- Overrides:
getMetadataProcessorin classJDBCExecutionFactory- Returns:
-
supportsCommonTableExpressions
public boolean supportsCommonTableExpressions()
- Overrides:
supportsCommonTableExpressionsin classExecutionFactory<DataSource,Connection>- Returns:
- true if the WITH clause is supported
-
supportsRecursiveCommonTableExpressions
public boolean supportsRecursiveCommonTableExpressions()
- Overrides:
supportsRecursiveCommonTableExpressionsin classExecutionFactory<DataSource,Connection>- Returns:
- true if a recursive WITH clause item is supported
-
supportsGeneratedKeys
protected boolean supportsGeneratedKeys(ExecutionContext context, Command command)
- Overrides:
supportsGeneratedKeysin classJDBCExecutionFactory- Returns:
- true if generated keys can be returned
-
usesDatabaseVersion
protected boolean usesDatabaseVersion()
- Overrides:
usesDatabaseVersionin classJDBCExecutionFactory
-
supportsSelectWithoutFrom
public boolean supportsSelectWithoutFrom()
- Overrides:
supportsSelectWithoutFromin classExecutionFactory<DataSource,Connection>- Returns:
- true if the translator support SELECT without a FROM clause
-
createTempTable
public String createTempTable(String string, List<ColumnReference> cols, ExecutionContext context, Connection connection) throws SQLException
Description copied from class:JDBCExecutionFactoryCreate a temp table with the given name prefix and columns- Overrides:
createTempTablein classJDBCExecutionFactory- Returns:
- the name of the table created
- Throws:
SQLException
-
getTemporaryTableName
public String getTemporaryTableName(String prefix)
uses a random table name strategy with a retry in thecreateTempTable(String, List, ExecutionContext, Connection)method- Overrides:
getTemporaryTableNamein classJDBCExecutionFactory- Returns:
- a valid temporary table name
-
getCreateTemporaryTablePostfix
public String getCreateTemporaryTablePostfix(boolean inTransaction)
- Overrides:
getCreateTemporaryTablePostfixin classJDBCExecutionFactory- Returns:
- the post script for the temp table create
-
getCreateTemporaryTableString
public String getCreateTemporaryTableString(boolean inTransaction)
- Overrides:
getCreateTemporaryTableStringin classJDBCExecutionFactory- Returns:
- the temp table creation ddl
-
getHibernateDialectClassName
public String getHibernateDialectClassName()
- Overrides:
getHibernateDialectClassNamein classJDBCExecutionFactory
-
supportsGroupByRollup
public boolean supportsGroupByRollup()
- Overrides:
supportsGroupByRollupin classExecutionFactory<DataSource,Connection>- Returns:
- true if the translator support GROUP BY ROLLUP
-
translateGeometrySelect
public Expression translateGeometrySelect(Expression expr)
Description copied from class:JDBCExecutionFactoryTranslate GEOMETRY column reference into an expression that will return WKB and possibly the SRID.- Overrides:
translateGeometrySelectin classJDBCExecutionFactory- Returns:
-
retrieveGeometryValue
public Object retrieveGeometryValue(ResultSet results, int paramIndex) throws SQLException
Description copied from class:JDBCExecutionFactoryThe default strategy assumes a blob value containing wkb- Overrides:
retrieveGeometryValuein classJDBCExecutionFactory- Returns:
- Throws:
SQLException
-
intializeConnectionAfterCancel
public void intializeConnectionAfterCancel(Connection c) throws SQLException
Description copied from class:JDBCExecutionFactoryImplemented if theConnectionneeds initialized after a statement cancel- Overrides:
intializeConnectionAfterCancelin classJDBCExecutionFactory- Throws:
SQLException
-
supportsCorrelatedSubqueryLimit
public boolean supportsCorrelatedSubqueryLimit()
- Overrides:
supportsCorrelatedSubqueryLimitin classExecutionFactory<DataSource,Connection>- Returns:
- true if a correlated subquery can support a limit clause
-
useColumnNamesForGeneratedKeys
public boolean useColumnNamesForGeneratedKeys()
- Overrides:
useColumnNamesForGeneratedKeysin classJDBCExecutionFactory- Returns:
- true if column names are required to retrieve generated keys
-
translateLiteralBinaryType
public String translateLiteralBinaryType(BinaryType obj)
Description copied from class:JDBCExecutionFactorySubclasses 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'- Overrides:
translateLiteralBinaryTypein classJDBCExecutionFactory- Parameters:
obj- value, never null- Returns:
- Translated string
-
supportsSubqueryInOn
public boolean supportsSubqueryInOn()
Description copied from class:ExecutionFactoryRefines subquery support.- Overrides:
supportsSubqueryInOnin classExecutionFactory<DataSource,Connection>- Returns:
- true if subqueries are supported in the on clause.
-
supportsConvert
public boolean supportsConvert(int fromType, int toType)Description copied from class:ExecutionFactoryUsed for fine grained control of convert/cast pushdown. TheExecutionFactory.getSupportedFunctions()should containSourceSystemFunctions.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.- Overrides:
supportsConvertin classExecutionFactory<DataSource,Connection>- Returns:
- true if the given conversion is supported.
- See Also:
TypeFacility.RUNTIME_CODES,TypeFacility.RUNTIME_CODES
-
supportsBooleanExpressions
protected boolean supportsBooleanExpressions()
Description copied from class:JDBCExecutionFactoryif boolean expressions are directly supported. will generally be false if there is no boolean datatype- Overrides:
supportsBooleanExpressionsin classJDBCExecutionFactory- Returns:
-
supportsSelectExpressionArrayType
public boolean supportsSelectExpressionArrayType()
- Overrides:
supportsSelectExpressionArrayTypein classExecutionFactory<DataSource,Connection>- Returns:
- true if array type expressions can be projected
-
translate
public List<?> translate(LanguageObject obj, ExecutionContext context)
Description copied from class:JDBCExecutionFactoryReturn a List of translated parts (LanguageObjects and Objects), or null if to rely on the default translation. Override with care.- Overrides:
translatein classJDBCExecutionFactory- Returns:
- list of translated parts
-
useUnicodePrefix
public boolean useUnicodePrefix()
- Overrides:
useUnicodePrefixin classJDBCExecutionFactory- Returns:
- true if the N prefix an N* type binding should be used for strings containing non-ascii characters
-
isNonAsciiFunction
protected boolean isNonAsciiFunction(Function f)
- Overrides:
isNonAsciiFunctionin classJDBCExecutionFactory- 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.
-
isExtendedAscii
public boolean isExtendedAscii()
- Overrides:
isExtendedAsciiin classJDBCExecutionFactory- Returns:
- true if the database code page includes extended characters values in the 128-255 range
-
useNBindingType
public boolean useNBindingType()
- Overrides:
useNBindingTypein classJDBCExecutionFactory- Returns:
- true if an N type (NVARCHAR, NCLOB) should be used when a non-ascii value is encountered
-
supportsOnlyTimestampAddLiteral
public boolean supportsOnlyTimestampAddLiteral()
- Overrides:
supportsOnlyTimestampAddLiteralin classExecutionFactory<DataSource,Connection>- Returns:
- true if the source supports only timestamp add literals
-
supportsWindowFunctionNthValue
public boolean supportsWindowFunctionNthValue()
- Overrides:
supportsWindowFunctionNthValuein classExecutionFactory<DataSource,Connection>- Returns:
- true if nth_value is supported.
defaults to
ExecutionFactory.supportsElementaryOlapOperations()
-
-