Package org.teiid.translator.jdbc.sybase
Class BaseSybaseExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<DataSource,Connection>
-
- org.teiid.translator.jdbc.JDBCExecutionFactory
-
- org.teiid.translator.jdbc.sybase.BaseSybaseExecutionFactory
-
- Direct Known Subclasses:
AccessExecutionFactory
,SAPIQExecutionFactory
,SybaseExecutionFactory
public class BaseSybaseExecutionFactory 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 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 BaseSybaseExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i)
Sets prepared statement parameter i with param.boolean
booleanNullable()
String
getTemporaryTableName(String prefix)
int
getTimestampNanoPrecision()
Return the precision of timestamp literals.boolean
hasTimeType()
Return false to indicate that time support should be emulated with timestamps.boolean
nullPlusNonNullIsNull()
Object
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.boolean
supportsAggregatesCountBig()
protected boolean
supportsBooleanExpressions()
if boolean expressions are directly supported.protected boolean
supportsCrossJoin()
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)
SetQueries don't have a concept of TOP, an inline view is needed.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.boolean
useAsInGroupAlias()
Indicates whether group alias should be of the form "...FROM groupA AS X" or "...FROM groupA X".boolean
useSelectLimit()
Returns whether the limit clause is applied to the select clause.-
Methods inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
addSourceComment, afterInitialConnectionObtained, closeConnection, convertObject, createDirectExecution, createMetadataProcessor, createProcedureExecution, createResultSetExecution, createTempTable, createUpdateExecution, executeStoredProcedure, formatDateValue, formatDateValue, getCommentFormat, getConnection, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCreateTempTableSQL, getDatabaseCalendar, getDatabaseTimeZone, getDatabaseVersion, getDefaultNullOrder, getDefaultSupportedFunctions, getDialect, getFunctionModifiers, getHibernateDialectClassName, getLateralKeyword, getLikeRegexString, getMaxPreparedInsertBatchSize, getMetadata, getMetadataProcessor, getRemovePushdownCharacters, getSetOperationString, getSourceComment, getSQLConversionVisitor, getStructRetrieval, getSupportedFunctions, getVersion, initCapabilities, intializeConnectionAfterCancel, isCharacterType, isDefaultTimeZone, isEnableDependentJoins, isExtendedAscii, isNonAscii, isNonAscii, isNonAsciiFunction, isSourceRequired, isSourceRequiredForCapabilities, isTrimStrings, loadedTemporaryTable, obtainedConnection, registerFunctionModifier, registerSpecificTypeOfOutParameter, replaceElementName, retrieveGeographyValue, retrieveGeographyValue, retrieveGeometryValue, retrieveGeometryValue, setCommentFormat, setDatabaseTimeZone, setDatabaseVersion, setDatabaseVersion, setEnableDependentJoins, setFetchSize, setMaxPreparedInsertBatchSize, setRemovePushdownCharacters, setStructRetrieval, setTrimStrings, setUseBindingsForDependentJoin, setUseBindVariables, setUseCommentsInSourceQuery, start, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsBatchedUpdates, supportsBulkUpdate, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsCorrelatedSubqueries, supportsDependentJoins, supportsExistsCriteria, supportsFullDependentJoins, supportsGeneratedKeys, supportsGeneratedKeys, supportsGroupBy, supportsHaving, supportsInCriteria, supportsInCriteriaSubquery, supportsInlineViews, supportsInsertWithQueryExpression, supportsIsNullCriteria, supportsLikeCriteria, supportsLikeCriteriaEscapeCharacter, supportsNotCriteria, supportsOrCriteria, supportsOrderByUnrelated, supportsProcedureParameterExpression, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsScalarSubqueries, supportsSearchedCaseExpressions, supportsSelectExpression, supportsSelfJoins, supportsSetQueryOrderBy, supportsUnions, tempTableRequiresTransaction, translateGeographyLiteral, translateGeographyParameter, translateGeographySelect, translateGeometryLiteral, translateGeometryParameter, translateGeometrySelect, translateLiteralBinaryType, translateLiteralBoolean, translateLiteralDate, translateLiteralTime, translateLiteralTimestamp, useBindingsForDependentJoin, useBindVariables, useColumnNamesForGeneratedKeys, useCommentsInSourceQuery, useNBindingType, useParensForJoins, useParensForSetQueries, usePreparedStatements, useScientificNotation, usesDatabaseVersion, useStreamsForLobs, useUnicodePrefix, 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, 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
-
-
-
-
Method Detail
-
useAsInGroupAlias
public boolean useAsInGroupAlias()
Description copied from class:JDBCExecutionFactory
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.- Overrides:
useAsInGroupAlias
in classJDBCExecutionFactory
- Returns:
- boolean
-
hasTimeType
public boolean hasTimeType()
Description copied from class:JDBCExecutionFactory
Return false to indicate that time support should be emulated with timestamps.- Overrides:
hasTimeType
in classJDBCExecutionFactory
- Returns:
- true if database has a time type
-
getTimestampNanoPrecision
public int getTimestampNanoPrecision()
Description copied from class:JDBCExecutionFactory
Return the precision of timestamp literals. Defaults to 9.- Overrides:
getTimestampNanoPrecision
in classJDBCExecutionFactory
- Returns:
- digits of timestamp nano precision.
-
translateCommand
public List<?> translateCommand(Command command, ExecutionContext context)
SetQueries don't have a concept of TOP, an inline view is needed.- Overrides:
translateCommand
in classJDBCExecutionFactory
- Returns:
- a list of translated parts
-
translate
public List<?> translate(LanguageObject obj, ExecutionContext context)
Description copied from class:JDBCExecutionFactory
Return a List of translated parts (LanguageObject
s and Objects), or null if to rely on the default translation. Override with care.- Overrides:
translate
in classJDBCExecutionFactory
- Returns:
- list of translated parts
-
supportsCrossJoin
protected boolean supportsCrossJoin()
-
translateLimit
public List<?> translateLimit(Limit limit, ExecutionContext context)
Description copied from class:JDBCExecutionFactory
Return a List of translated parts (LanguageObject
s and Objects), or null if to rely on the default translation.- Overrides:
translateLimit
in classJDBCExecutionFactory
- Returns:
- a list of translated parts
-
useSelectLimit
public boolean useSelectLimit()
Description copied from class:JDBCExecutionFactory
Returns whether the limit clause is applied to the select clause.- Overrides:
useSelectLimit
in classJDBCExecutionFactory
- Returns:
- true if the limit clause is part of the select
-
retrieveValue
public Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException
Description copied from class:JDBCExecutionFactory
Retrieve the value on the current resultset row for the given column index.- Overrides:
retrieveValue
in classJDBCExecutionFactory
- Returns:
- the value
- Throws:
SQLException
-
retrieveValue
public Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType) throws SQLException
Description copied from class:JDBCExecutionFactory
Retrieve the value for the given parameter index- Overrides:
retrieveValue
in classJDBCExecutionFactory
- Returns:
- the value
- Throws:
SQLException
-
bindValue
public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
Description copied from class:JDBCExecutionFactory
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.- Overrides:
bindValue
in classJDBCExecutionFactory
- Throws:
SQLException
-
nullPlusNonNullIsNull
public boolean nullPlusNonNullIsNull()
-
booleanNullable
public boolean booleanNullable()
-
getTemporaryTableName
public String getTemporaryTableName(String prefix)
- Overrides:
getTemporaryTableName
in classJDBCExecutionFactory
- Returns:
- a valid temporary table name
-
supportsBooleanExpressions
protected boolean supportsBooleanExpressions()
Description copied from class:JDBCExecutionFactory
if boolean expressions are directly supported. will generally be false if there is no boolean datatype- Overrides:
supportsBooleanExpressions
in classJDBCExecutionFactory
- Returns:
-
supportsAggregatesCountBig
public boolean supportsAggregatesCountBig()
- Overrides:
supportsAggregatesCountBig
in classExecutionFactory<DataSource,Connection>
- Returns:
- true if the translator supports a specific count aggregate returning a long value
ExecutionFactory.supportsAggregatesCount()
will be consulted by the engine, this capability only affects the name of the pushed count function if a long value is expected
-
-