Package org.teiid.translator.jdbc.sybase
Class SybaseExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<DataSource,Connection>
-
- org.teiid.translator.jdbc.JDBCExecutionFactory
-
- org.teiid.translator.jdbc.sybase.BaseSybaseExecutionFactory
-
- org.teiid.translator.jdbc.sybase.SybaseExecutionFactory
-
- Direct Known Subclasses:
SQLServerExecutionFactory
@Translator(name="sybase", description="A translator for Sybase Database") public class SybaseExecutionFactory extends BaseSybaseExecutionFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSybaseExecutionFactory.SybaseFormatFunctionModifier-
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 ConvertModifierconvertModifierstatic VersionFIFTEEN_0_2static VersionFIFTEEN_5protected Map<String,Object>formatMapprotected booleanjtdsDriverstatic VersionTWELVE_5static VersionTWELVE_5_3-
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 SybaseExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbooleanNullable()protected List<Object>convertDateToString(Function function)protected List<?>convertTimestampToString(Function function)StringgetHibernateDialectClassName()intgetMaxFromGroups()List<String>getSupportedFunctions()voidinitCapabilities(Connection connection)booleanisJtdsDriver()booleannullPlusNonNullIsNull()protected voidpopulateDateFormats()booleanpreserveNullTyping()Return true if null literals should retain a type (typically handled by a cast).protected booleansetFetchSize()voidsetFetchSize(Command command, ExecutionContext context, Statement statement, int fetchSize)Set the fetch size on the given statement.voidsetJtdsDriver(boolean jtdsDriver)voidstart()booleansupportsAggregatesEnhancedNumeric()booleansupportsFormatLiteral(String literal, ExecutionFactory.Format format)booleansupportsFunctionsInGroupBy()booleansupportsGroupByRollup()booleansupportsInlineViews()booleansupportsLiteralOnlyWithGrouping()booleansupportsOnlyFormatLiterals()booleansupportsRowLimit()booleansupportsSelectWithoutFrom()List<?>translateCommand(Command command, ExecutionContext context)SetQueries don't have a concept of TOP, an inline view is needed.StringtranslateLiteralBinaryType(BinaryType obj)Subclasses should override this method to provide a different sql translation of the literal varbinary value.StringtranslateLiteralDate(Date dateValue)Subclasses should override this method to provide a different sql translation of the literal date value.StringtranslateLiteralTimestamp(Timestamp timestampValue)Subclasses should override this method to provide a different sql translation of the literal timestamp value.protected booleanusesDatabaseVersion()booleanuseUnicodePrefix()-
Methods inherited from class org.teiid.translator.jdbc.sybase.BaseSybaseExecutionFactory
bindValue, getTemporaryTableName, getTimestampNanoPrecision, hasTimeType, retrieveValue, retrieveValue, supportsAggregatesCountBig, supportsBooleanExpressions, supportsCrossJoin, translate, translateLimit, useAsInGroupAlias, useSelectLimit
-
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, getLateralKeyword, getLikeRegexString, getMaxPreparedInsertBatchSize, getMetadata, getMetadataProcessor, getRemovePushdownCharacters, getSetOperationString, getSourceComment, getSQLConversionVisitor, getStructRetrieval, getVersion, 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, setMaxPreparedInsertBatchSize, setRemovePushdownCharacters, setStructRetrieval, setTrimStrings, setUseBindingsForDependentJoin, setUseBindVariables, setUseCommentsInSourceQuery, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsBatchedUpdates, supportsBulkUpdate, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsCorrelatedSubqueries, supportsDependentJoins, supportsExistsCriteria, supportsFullDependentJoins, supportsGeneratedKeys, 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, translateGeometrySelect, translateLiteralBoolean, translateLiteralTime, useBindingsForDependentJoin, useBindVariables, useColumnNamesForGeneratedKeys, useCommentsInSourceQuery, useNBindingType, useParensForJoins, useParensForSetQueries, usePreparedStatements, useScientificNotation, useStreamsForLobs, useWithRollup
-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, areLobsUsableAfterClose, createExecution, getCacheDirective, getCollationLocale, getConnection, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, 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, supportsArrayAgg, supportsArrayType, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsFullOuterJoins, supportsGeographyType, supportsGroupByMultipleDistinctAggregates, supportsInnerJoins, supportsIntersect, supportsIsDistinctCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderBy, supportsOrderByNullOrdering, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsRecursiveCommonTableExpressions, supportsRowOffset, supportsScalarSubqueryProjection, supportsSelectDistinct, supportsSelectExpressionArrayType, supportsSetQueryLimitOffset, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoin
-
-
-
-
Field Detail
-
TWELVE_5_3
public static final Version TWELVE_5_3
-
TWELVE_5
public static final Version TWELVE_5
-
FIFTEEN_0_2
public static final Version FIFTEEN_0_2
-
FIFTEEN_5
public static final Version FIFTEEN_5
-
jtdsDriver
protected boolean jtdsDriver
-
convertModifier
protected ConvertModifier convertModifier
-
-
Method Detail
-
populateDateFormats
protected void populateDateFormats()
-
start
public void start() throws TranslatorException- Overrides:
startin classJDBCExecutionFactory- Throws:
TranslatorException
-
getSupportedFunctions
public List<String> getSupportedFunctions()
- Overrides:
getSupportedFunctionsin classJDBCExecutionFactory
-
supportsInlineViews
public boolean supportsInlineViews()
- Overrides:
supportsInlineViewsin classJDBCExecutionFactory
-
supportsFunctionsInGroupBy
public boolean supportsFunctionsInGroupBy()
- Overrides:
supportsFunctionsInGroupByin classExecutionFactory<DataSource,Connection>
-
getMaxFromGroups
public int getMaxFromGroups()
- Overrides:
getMaxFromGroupsin classExecutionFactory<DataSource,Connection>
-
supportsAggregatesEnhancedNumeric
public boolean supportsAggregatesEnhancedNumeric()
- Overrides:
supportsAggregatesEnhancedNumericin classExecutionFactory<DataSource,Connection>
-
nullPlusNonNullIsNull
public boolean nullPlusNonNullIsNull()
- Overrides:
nullPlusNonNullIsNullin classBaseSybaseExecutionFactory
-
booleanNullable
public boolean booleanNullable()
- Overrides:
booleanNullablein classBaseSybaseExecutionFactory
-
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
-
translateLiteralDate
public String translateLiteralDate(Date dateValue)
Description copied from class:JDBCExecutionFactorySubclasses 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'}- Overrides:
translateLiteralDatein classJDBCExecutionFactory- Parameters:
dateValue- Date value, never null- Returns:
- Translated string
-
supportsRowLimit
public boolean supportsRowLimit()
- Overrides:
supportsRowLimitin classExecutionFactory<DataSource,Connection>
-
isJtdsDriver
@TranslatorProperty(display="JTDS Driver", description="True if the driver is the JTDS driver", advanced=true) public boolean isJtdsDriver()
-
setJtdsDriver
public void setJtdsDriver(boolean jtdsDriver)
-
setFetchSize
protected boolean setFetchSize()
-
setFetchSize
public void setFetchSize(Command command, ExecutionContext context, Statement statement, int fetchSize) throws SQLException
Description copied from class:JDBCExecutionFactorySet the fetch size on the given statement.- Overrides:
setFetchSizein classJDBCExecutionFactory- Throws:
SQLException
-
initCapabilities
public void initCapabilities(Connection connection) throws TranslatorException
- Overrides:
initCapabilitiesin classJDBCExecutionFactory- Throws:
TranslatorException
-
usesDatabaseVersion
protected boolean usesDatabaseVersion()
- Overrides:
usesDatabaseVersionin classJDBCExecutionFactory
-
supportsSelectWithoutFrom
public boolean supportsSelectWithoutFrom()
- Overrides:
supportsSelectWithoutFromin classExecutionFactory<DataSource,Connection>
-
getHibernateDialectClassName
public String getHibernateDialectClassName()
- Overrides:
getHibernateDialectClassNamein classJDBCExecutionFactory
-
supportsGroupByRollup
public boolean supportsGroupByRollup()
- Overrides:
supportsGroupByRollupin classExecutionFactory<DataSource,Connection>
-
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
-
supportsOnlyFormatLiterals
public boolean supportsOnlyFormatLiterals()
- Overrides:
supportsOnlyFormatLiteralsin classExecutionFactory<DataSource,Connection>
-
supportsFormatLiteral
public boolean supportsFormatLiteral(String literal, ExecutionFactory.Format format)
- Overrides:
supportsFormatLiteralin classExecutionFactory<DataSource,Connection>
-
translateCommand
public List<?> translateCommand(Command command, ExecutionContext context)
Description copied from class:BaseSybaseExecutionFactorySetQueries don't have a concept of TOP, an inline view is needed.- Overrides:
translateCommandin classBaseSybaseExecutionFactory- Returns:
- a list of translated parts
-
supportsLiteralOnlyWithGrouping
public boolean supportsLiteralOnlyWithGrouping()
-
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
-
preserveNullTyping
public boolean preserveNullTyping()
Description copied from class:JDBCExecutionFactoryReturn true if null literals should retain a type (typically handled by a cast).- Overrides:
preserveNullTypingin classJDBCExecutionFactory- Returns:
-
-