org.teiid.translator.jdbc.sybase
Class SybaseExecutionFactory

java.lang.Object
  extended by org.teiid.translator.ExecutionFactory<javax.sql.DataSource,java.sql.Connection>
      extended by org.teiid.translator.jdbc.JDBCExecutionFactory
          extended by org.teiid.translator.jdbc.sybase.SybaseExecutionFactory
Direct Known Subclasses:
AccessExecutionFactory, SQLServerExecutionFactory

@Translator(name="sybase")
public class SybaseExecutionFactory
extends JDBCExecutionFactory


Nested Class Summary
 
Nested classes/interfaces inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
JDBCExecutionFactory.NullOrder
 
Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory
ExecutionFactory.SupportedJoinCriteria
 
Field Summary
 
Fields inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
DEFAULT_MAX_IN_CRITERIA, DEFAULT_TIME_ZONE
 
Fields inherited from class org.teiid.translator.ExecutionFactory
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE
 
Constructor Summary
SybaseExecutionFactory()
           
 
Method Summary
protected  java.util.List<java.lang.Object> convertDateToString(Function function)
           
protected  java.util.List<?> convertTimestampToString(Function function)
          Written to only support version 15
 int getMaxFromGroups()
          The number of groups supported in the from clause.
 int getMaxInCriteriaSize()
          Get the integer value representing the number of values allowed in an IN criteria in the WHERE clause of a query
 java.util.List<java.lang.String> getSupportedFunctions()
          Get list of all supported function names.
 int getTimestampNanoPrecision()
          Return the precision of timestamp literals.
 boolean hasTimeType()
          Return false to indicate that time support should be emulated with timestamps.
 void start()
          Initialize the connector with supplied configuration
 boolean supportsFunctionsInGroupBy()
          Support indicates that the connector supports functions in GROUP BY, such as: SELECT dayofmonth(theDate), COUNT(*) FROM table GROUP BY dayofmonth(theDate)
 boolean supportsInlineViews()
          Support indicates connector can accept inline views (subqueries in the FROM clause).
 java.util.List<?> translateCommand(Command command, ExecutionContext context)
          SetQueries don't have a concept of TOP, an inline view is needed.
 java.util.List<?> translateLimit(Limit limit, ExecutionContext context)
          Return a List of translated parts (LanguageObjects 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, bindValue, closeConnection, createProcedureExecution, createResultSetExecution, createUpdateExecution, executeStoredProcedure, formatDateValue, getConnection, getDatabaseCalendar, getDatabaseTimeZone, getDatabaseVersion, getDefaultNullOrder, getDefaultSupportedFunctions, getFunctionModifiers, getMetadata, getSetOperationString, getSourceComment, getSQLConversionVisitor, isSourceRequired, isTrimStrings, obtainedConnection, registerFunctionModifier, registerSpecificTypeOfOutParameter, replaceElementName, retrieveValue, retrieveValue, setDatabaseTimeZone, setDatabaseVersion, setTrimStrings, setUseBindVariables, setUseCommentsInSourceQuery, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsBatchedUpdates, supportsBetweenCriteria, supportsBulkUpdate, supportsCaseExpressions, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsCorrelatedSubqueries, supportsExistsCriteria, supportsExplicitNullOrdering, supportsGroupBy, supportsHaving, supportsInCriteria, supportsInCriteriaSubquery, supportsInsertWithQueryExpression, supportsIsNullCriteria, supportsLikeCriteria, supportsLikeCriteriaEscapeCharacter, supportsNotCriteria, supportsOrCriteria, supportsOrderByUnrelated, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsScalarSubqueries, supportsSearchedCaseExpressions, supportsSelectExpression, supportsSelfJoins, supportsSetQueryOrderBy, supportsUnions, translate, translateLiteralBoolean, translateLiteralDate, translateLiteralTime, translateLiteralTimestamp, useBindVariables, useCommentsInSourceQuery, useParensForJoins, useParensForSetQueries, usePreparedStatements
 
Methods inherited from class org.teiid.translator.ExecutionFactory
createExecution, getInstance, getLanguageFactory, getSupportedJoinCriteria, getTypeFacility, isImmutable, requiresCriteria, setImmutable, setRequiresCriteria, setSourceRequired, setSupportedJoinCriteria, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, supportsExcept, supportsFullOuterJoins, supportsInnerJoins, supportsIntersect, supportsOrderBy, supportsOuterJoins, supportsRowLimit, supportsRowOffset, supportsSelectDistinct, useAnsiJoin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SybaseExecutionFactory

public SybaseExecutionFactory()
Method Detail

start

public void start()
           throws TranslatorException
Description copied from class: ExecutionFactory
Initialize the connector with supplied configuration

Overrides:
start in class JDBCExecutionFactory
Throws:
TranslatorException

convertDateToString

protected java.util.List<java.lang.Object> convertDateToString(Function function)

convertTimestampToString

protected java.util.List<?> convertTimestampToString(Function function)
Written to only support version 15

Parameters:
function -
Returns:

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 class JDBCExecutionFactory
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 class JDBCExecutionFactory
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 class JDBCExecutionFactory
Returns:
digits of timestamp nano precision.

translateCommand

public java.util.List<?> translateCommand(Command command,
                                          ExecutionContext context)
SetQueries don't have a concept of TOP, an inline view is needed.

Overrides:
translateCommand in class JDBCExecutionFactory
Returns:
a list of translated parts

translateLimit

public java.util.List<?> translateLimit(Limit limit,
                                        ExecutionContext context)
Description copied from class: JDBCExecutionFactory
Return a List of translated parts (LanguageObjects and Objects), or null if to rely on the default translation.

Overrides:
translateLimit in class JDBCExecutionFactory
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 class JDBCExecutionFactory
Returns:
true if the limit clause is part of the select

getMaxInCriteriaSize

public int getMaxInCriteriaSize()
Description copied from class: ExecutionFactory
Get the integer value representing the number of values allowed in an IN criteria in the WHERE clause of a query

Overrides:
getMaxInCriteriaSize in class JDBCExecutionFactory

getSupportedFunctions

public java.util.List<java.lang.String> getSupportedFunctions()
Description copied from class: ExecutionFactory
Get list of all supported function names. Arithmetic functions have names like "+".

Overrides:
getSupportedFunctions in class JDBCExecutionFactory

supportsInlineViews

public boolean supportsInlineViews()
Description copied from class: ExecutionFactory
Support indicates connector can accept inline views (subqueries in the FROM clause).

Overrides:
supportsInlineViews in class JDBCExecutionFactory

supportsFunctionsInGroupBy

public boolean supportsFunctionsInGroupBy()
Description copied from class: ExecutionFactory

Support indicates that the connector supports functions in GROUP BY, such as: SELECT dayofmonth(theDate), COUNT(*) FROM table GROUP BY dayofmonth(theDate)


NOT CURRENTLY USED - group by expressions create an inline view for pushdown

Overrides:
supportsFunctionsInGroupBy in class ExecutionFactory<javax.sql.DataSource,java.sql.Connection>

getMaxFromGroups

public int getMaxFromGroups()
Description copied from class: ExecutionFactory
The number of groups supported in the from clause. Added for a Sybase limitation.

Overrides:
getMaxFromGroups in class ExecutionFactory<javax.sql.DataSource,java.sql.Connection>
Returns:
the number of groups supported in the from clause, or -1 if there is no limit


Copyright © 2010. All Rights Reserved.