Class PostgreSQLExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<DataSource,Connection>
-
- org.teiid.translator.jdbc.JDBCExecutionFactory
-
- org.teiid.translator.jdbc.postgresql.PostgreSQLExecutionFactory
-
- Direct Known Subclasses:
GreenplumExecutionFactory,RedshiftExecutionFactory
@Translator(name="postgresql", description="A translator for postgreSQL Database") public class PostgreSQLExecutionFactory extends JDBCExecutionFactory
Translator class for PostgreSQL. Updated to expect a 8.0+ jdbc client- Since:
- 4.3
-
-
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 ConvertModifierconvertModifierstatic VersionEIGHT_0static VersionEIGHT_1static VersionEIGHT_2static VersionEIGHT_3static VersionEIGHT_4static VersionNINE_0static VersionNINE_3static VersionNINE_4static VersionONE_3static VersionONE_4static VersionONE_5protected OracleFormatFunctionModifierparseModifierstatic StringPOSTGRESQLstatic VersionTWO_0-
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 PostgreSQLExecutionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<Object>addDefaultEscape(Like like)Add a default escapevoidbindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i)Sets prepared statement parameter i with param.ObjectconvertToken(String group)Convert to a new parsing token or return null if not possibleStringgetCreateTemporaryTablePostfix(boolean inTransaction)ExecutionFactory.NullOrdergetDefaultNullOrder()Returns the default null orderingStringgetHibernateDialectClassName()intgetMaxProjectedColumns()The number of columns supported in projected select clause.MetadataProcessor<Connection>getMetadataProcessor()Get a MetadataProcessor for the translator to read the metadata.StringgetPostGisVersion()SQLConversionVisitorgetSQLConversionVisitor()Create theSQLConversionVisitorthat will perform translation.List<String>getSupportedFunctions()Get list of all supported function names.intgetTimestampNanoPrecision()Return the precision of timestamp literals.voidinitCapabilities(Connection connection)Will be called byExecutionFactory.start()with a null connection if a source connection is notExecutionFactory.isSourceRequiredForCapabilities()booleanisProjSupported()voidloadedTemporaryTable(String tableName, ExecutionContext context, Connection connection)pg needs to collect stats for effective planningbooleanpreserveNullTyping()Return true if null literals should retain a type (typically handled by a cast).ObjectretrieveGeographyValue(ResultSet results, int paramIndex)The default strategy assumes a blob value containing wkbObjectretrieveGeometryValue(ResultSet results, int paramIndex)The default strategy assumes a blob value containing wkbObjectretrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType)Retrieve the value for the given parameter indexObjectretrieveValue(ResultSet results, int columnIndex, Class<?> expectedType)Retrieve the value on the current resultset row for the given column index.voidsetPostGisVersion(String postGisVersion)voidsetProjSupported(boolean projSupported)voidstart()Initialize the connector with supplied configurationbooleansupportsAdvancedOlapOperations()booleansupportsAggregatesEnhancedNumeric()Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMPbooleansupportsArrayAgg()booleansupportsArrayType()The engine uses array types for dependent joins and for array expression.booleansupportsCommonTableExpressions()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)booleansupportsGeographyType()If the geography type is supported by the standard ST_ geospatial functionsbooleansupportsInlineViews()This is true only after Postgre version 7.1 However, since version 7 was released in 2000 we'll assume a post 7 instance.booleansupportsIntersect()Support indicates that the connector supports the INTERSECT of two queries.booleansupportsIsDistinctCriteria()Support indicates connector accepts criteria of form (exp1 IS DISTINCT exp2)booleansupportsLateralJoin()booleansupportsLikeRegex()booleansupportsOnlyFormatLiterals()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()booleansupportsSimilarTo()booleansupportsStringAgg()booleansupportsWindowDistinctAggregates()List<?>translate(LanguageObject obj, ExecutionContext context)Postgres doesn't provide min/max(boolean), so this conversion writes a min(BooleanValue) as bool_and(BooleanValue)ExpressiontranslateGeographySelect(Expression expr)Translate GEOGRAPHY column reference into an expression that will return WKB and possibly the SRID.ExpressiontranslateGeometrySelect(Expression expr)Translate GEOMETRY column reference into an expression that will return WKB and possibly the SRID.List<?>translateLimit(Limit limit, ExecutionContext context)Return a List of translated parts (LanguageObjects and Objects), or null if to rely on the default translation.StringtranslateLiteralBinaryType(BinaryType obj)Subclasses should override this method to provide a different sql translation of the literal varbinary value.StringtranslateLiteralBoolean(Boolean booleanValue)Subclasses should override this method to provide a different sql translation of the literal boolean value.StringtranslateLiteralDate(Date dateValue)Subclasses should override this method to provide a different sql translation of the literal date value.StringtranslateLiteralTime(Time timeValue)Subclasses should override this method to provide a different sql translation of the literal time value.StringtranslateLiteralTimestamp(Timestamp timestampValue)Subclasses should override this method to provide a different sql translation of the literal timestamp value.protected booleanusesDatabaseVersion()booleanuseStreamsForLobs()If streams should be used for Blob/Clob sets onPreparedStatements-
Methods inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
addSourceComment, afterInitialConnectionObtained, closeConnection, convertObject, createDirectExecution, createMetadataProcessor, createProcedureExecution, createResultSetExecution, createTempTable, createUpdateExecution, executeStoredProcedure, formatDateValue, formatDateValue, getCommentFormat, getConnection, getCreateTemporaryTableString, getCreateTempTableSQL, getDatabaseCalendar, getDatabaseTimeZone, getDatabaseVersion, getDefaultSupportedFunctions, getDialect, getFunctionModifiers, getLateralKeyword, getLikeRegexString, getMaxPreparedInsertBatchSize, getMetadata, getRemovePushdownCharacters, getSetOperationString, getSourceComment, getStructRetrieval, getTemporaryTableName, getVersion, hasTimeType, intializeConnectionAfterCancel, isCharacterType, isDefaultTimeZone, isEnableDependentJoins, isExtendedAscii, isNonAscii, isNonAscii, isNonAsciiFunction, isSourceRequired, isSourceRequiredForCapabilities, isTrimStrings, obtainedConnection, registerFunctionModifier, registerSpecificTypeOfOutParameter, replaceElementName, retrieveGeographyValue, retrieveGeometryValue, setCommentFormat, setDatabaseTimeZone, setDatabaseVersion, setDatabaseVersion, setEnableDependentJoins, setFetchSize, setMaxPreparedInsertBatchSize, setRemovePushdownCharacters, setStructRetrieval, setTrimStrings, setUseBindingsForDependentJoin, setUseBindVariables, setUseCommentsInSourceQuery, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsBatchedUpdates, supportsBooleanExpressions, 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, translateCommand, translateGeographyLiteral, translateGeographyParameter, translateGeometryLiteral, translateGeometryParameter, useAsInGroupAlias, useBindingsForDependentJoin, useBindVariables, useColumnNamesForGeneratedKeys, useCommentsInSourceQuery, useNBindingType, useParensForJoins, useParensForSetQueries, usePreparedStatements, useScientificNotation, useSelectLimit, useUnicodePrefix, useWithRollup
-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, 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, supportsAggregatesCountBig, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsFullOuterJoins, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsInnerJoins, supportsLateralJoinCondition, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlyRelationshipStyleJoins, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderBy, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsScalarSubqueryProjection, supportsSelectDistinct, supportsSetQueryLimitOffset, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUpsert, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoin
-
-
-
-
Field Detail
-
POSTGRESQL
public static String POSTGRESQL
-
EIGHT_0
public static final Version EIGHT_0
-
EIGHT_1
public static final Version EIGHT_1
-
EIGHT_2
public static final Version EIGHT_2
-
EIGHT_3
public static final Version EIGHT_3
-
EIGHT_4
public static final Version EIGHT_4
-
NINE_0
public static final Version NINE_0
-
NINE_3
public static final Version NINE_3
-
NINE_4
public static final Version NINE_4
-
parseModifier
protected OracleFormatFunctionModifier parseModifier
-
ONE_3
public static final Version ONE_3
-
ONE_4
public static final Version ONE_4
-
ONE_5
public static final Version ONE_5
-
TWO_0
public static final Version TWO_0
-
convertModifier
protected ConvertModifier convertModifier
-
-
Method Detail
-
convertToken
public Object convertToken(String group)
Convert to a new parsing token or return null if not possible- Parameters:
group-- Returns:
-
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
-
translateLiteralBoolean
public String translateLiteralBoolean(Boolean booleanValue)
Description copied from class:JDBCExecutionFactorySubclasses should override this method to provide a different sql translation of the literal boolean value. By default, a boolean literal is represented as:'0'or'1'.- Overrides:
translateLiteralBooleanin classJDBCExecutionFactory- Parameters:
booleanValue- Boolean 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
-
translateLiteralTime
public String translateLiteralTime(Time timeValue)
Description copied from class:JDBCExecutionFactorySubclasses should override this method to provide a different sql translation of the literal time value. By default, a time literal is represented as:{t '23:59:59'}SeeJDBCExecutionFactory.hasTimeType()to represent literal times as timestamps.- Overrides:
translateLiteralTimein classJDBCExecutionFactory- Parameters:
timeValue- Time value, never null- Returns:
- Translated string
-
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
-
getTimestampNanoPrecision
public int getTimestampNanoPrecision()
Description copied from class:JDBCExecutionFactoryReturn the precision of timestamp literals. Defaults to 9.- Overrides:
getTimestampNanoPrecisionin classJDBCExecutionFactory- Returns:
- digits of timestamp nano precision.
-
translateLimit
public List<?> translateLimit(Limit limit, 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:
translateLimitin classJDBCExecutionFactory- Returns:
- a list of translated parts
-
translate
public List<?> translate(LanguageObject obj, ExecutionContext context)
Postgres doesn't provide min/max(boolean), so this conversion writes a min(BooleanValue) as bool_and(BooleanValue)- Overrides:
translatein classJDBCExecutionFactory- Returns:
- list of translated parts
- Since:
- 4.3
- See Also:
LanguageObjectVisitor.visit(org.teiid.language.AggregateFunction)
-
addDefaultEscape
public static List<Object> addDefaultEscape(Like like)
Add a default escape- Parameters:
like-- 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
-
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.
-
supportsInlineViews
public boolean supportsInlineViews()
This is true only after Postgre version 7.1 However, since version 7 was released in 2000 we'll assume a post 7 instance.- Overrides:
supportsInlineViewsin classJDBCExecutionFactory
-
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>
-
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
-
supportsArrayAgg
public boolean supportsArrayAgg()
- Overrides:
supportsArrayAggin classExecutionFactory<DataSource,Connection>- Returns:
- true if array_agg is supported
-
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
-
supportsAdvancedOlapOperations
public boolean supportsAdvancedOlapOperations()
- Overrides:
supportsAdvancedOlapOperationsin classExecutionFactory<DataSource,Connection>- Returns:
- true if Advanced OLAP operations are supported including the aggregate function filter clause.
-
supportsWindowDistinctAggregates
public boolean supportsWindowDistinctAggregates()
- Overrides:
supportsWindowDistinctAggregatesin classExecutionFactory<DataSource,Connection>- Returns:
- true if distinct aggregates can be windowed function.
-
supportsSimilarTo
public boolean supportsSimilarTo()
- Overrides:
supportsSimilarToin classExecutionFactory<DataSource,Connection>- Returns:
- true if the SIMILAR TO predicate is supported
-
supportsLikeRegex
public boolean supportsLikeRegex()
- Overrides:
supportsLikeRegexin classExecutionFactory<DataSource,Connection>- Returns:
- true if the LIKE_REGEX predicate is supported
-
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.
-
supportsSelectExpressionArrayType
public boolean supportsSelectExpressionArrayType()
- Overrides:
supportsSelectExpressionArrayTypein classExecutionFactory<DataSource,Connection>- Returns:
- true if array type expressions can be projected
-
usesDatabaseVersion
protected boolean usesDatabaseVersion()
- Overrides:
usesDatabaseVersionin classJDBCExecutionFactory
-
supportsStringAgg
public boolean supportsStringAgg()
- Overrides:
supportsStringAggin classExecutionFactory<DataSource,Connection>- Returns:
- true if string_agg is supported
-
supportsSelectWithoutFrom
public boolean supportsSelectWithoutFrom()
- Overrides:
supportsSelectWithoutFromin classExecutionFactory<DataSource,Connection>- Returns:
- true if the translator support SELECT without a FROM clause
-
getHibernateDialectClassName
public String getHibernateDialectClassName()
- Overrides:
getHibernateDialectClassNamein classJDBCExecutionFactory
-
getCreateTemporaryTablePostfix
public String getCreateTemporaryTablePostfix(boolean inTransaction)
- Overrides:
getCreateTemporaryTablePostfixin classJDBCExecutionFactory- Returns:
- the post script for the temp table create
-
loadedTemporaryTable
public void loadedTemporaryTable(String tableName, ExecutionContext context, Connection connection) throws SQLException
pg needs to collect stats for effective planning- Overrides:
loadedTemporaryTablein classJDBCExecutionFactory- Throws:
SQLException
-
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
-
setPostGisVersion
public void setPostGisVersion(String postGisVersion)
-
getPostGisVersion
@TranslatorProperty(display="PostGIS Version", description="The version of the PostGIS extension.", advanced=true) public String getPostGisVersion()
-
isProjSupported
@TranslatorProperty(display="Proj support enabled", description="If PostGIS Proj support is enabled for ST_TRANSFORM", advanced=true) public boolean isProjSupported()
-
setProjSupported
public void setProjSupported(boolean projSupported)
-
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:
-
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:
-
translateGeographySelect
public Expression translateGeographySelect(Expression expr)
Description copied from class:JDBCExecutionFactoryTranslate GEOGRAPHY column reference into an expression that will return WKB and possibly the SRID.- Overrides:
translateGeographySelectin 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
-
retrieveGeographyValue
public Object retrieveGeographyValue(ResultSet results, int paramIndex) throws SQLException
Description copied from class:JDBCExecutionFactoryThe default strategy assumes a blob value containing wkb- Overrides:
retrieveGeographyValuein classJDBCExecutionFactory- Returns:
- Throws:
SQLException
-
useStreamsForLobs
public boolean useStreamsForLobs()
Description copied from class:JDBCExecutionFactoryIf streams should be used for Blob/Clob sets onPreparedStatements- Overrides:
useStreamsForLobsin classJDBCExecutionFactory- Returns:
-
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
-
supportsLateralJoin
public boolean supportsLateralJoin()
- Overrides:
supportsLateralJoinin classExecutionFactory<DataSource,Connection>- Returns:
- true if the source supports lateral join
-
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
-
supportsIsDistinctCriteria
public boolean supportsIsDistinctCriteria()
Description copied from class:ExecutionFactorySupport indicates connector accepts criteria of form (exp1 IS DISTINCT exp2)- Overrides:
supportsIsDistinctCriteriain classExecutionFactory<DataSource,Connection>
-
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>
-
supportsGeographyType
public boolean supportsGeographyType()
Description copied from class:ExecutionFactoryIf the geography type is supported by the standard ST_ geospatial functions- Overrides:
supportsGeographyTypein classExecutionFactory<DataSource,Connection>- Returns:
- true if the translator supports the geography type
-
retrieveValue
public Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType) throws SQLException
Description copied from class:JDBCExecutionFactoryRetrieve the value for the given parameter index- Overrides:
retrieveValuein classJDBCExecutionFactory- Returns:
- the value
- Throws:
SQLException
-
retrieveValue
public Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException
Description copied from class:JDBCExecutionFactoryRetrieve the value on the current resultset row for the given column index.- Overrides:
retrieveValuein classJDBCExecutionFactory- Returns:
- the value
- Throws:
SQLException
-
getMaxProjectedColumns
public int getMaxProjectedColumns()
Description copied from class:ExecutionFactoryThe number of columns supported in projected select clause. Added for a postgresql limitation.- Overrides:
getMaxProjectedColumnsin classExecutionFactory<DataSource,Connection>- Returns:
- the maximum number of columns in the projected select clause or -1 if there is no limit
-
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:
-
-