public class PostgresqlQueryRewriter extends LimitOffsetQueryRewriter
Constructor and Description |
---|
PostgresqlQueryRewriter(JdbcDataContext dataContext) |
Modifier and Type | Method and Description |
---|---|
ColumnType |
getColumnType(int jdbcType,
String nativeType,
Integer columnSize)
Gets the column type for a specific JDBC type (as defined in
Types ), native type name and column size. |
Object |
getResultSetValue(ResultSet resultSet,
int columnIndex,
Column column)
Retrieves a value from a JDBC
ResultSet when the anticipated value is mapped to a particular column. |
String |
rewriteColumnType(ColumnType columnType,
Integer columnSize)
Rewrites the name of a column type, as it is written in CREATE TABLE
statements.
|
protected String |
rewriteFromItem(Query query,
FromItem item) |
void |
setStatementParameter(PreparedStatement st,
int valueIndex,
Column column,
Object value)
Method which handles the action of setting a parameterized value on a
statement.
|
isFirstRowSupported, isMaxRowsSupported, rewriteQuery
beforeRewrite, escapeQuotes, isAggregateFunctionSupported, isScalarFunctionSupported, rewriteFilterItem, rewriteFilterItemWithOperandLiteral, rewriteTimestamp
getDataContext, isSchemaIncludedInColumnPaths, isSupportedVersion, isTransactional, rewriteColumnTypeInternal, rewriteFromClause, rewriteFromItem, rewriteGroupByClause, rewriteGroupByItem, rewriteHavingClause, rewriteOrderByClause, rewriteOrderByItem, rewriteSelectClause, rewriteSelectItem, rewriteWhereClause, toTime, toTimestamp
public PostgresqlQueryRewriter(JdbcDataContext dataContext)
public ColumnType getColumnType(int jdbcType, String nativeType, Integer columnSize)
IQueryRewriter
Types
), native type name and column size.getColumnType
in interface IQueryRewriter
getColumnType
in class AbstractQueryRewriter
public String rewriteColumnType(ColumnType columnType, Integer columnSize)
IQueryRewriter
rewriteColumnType
in interface IQueryRewriter
rewriteColumnType
in class DefaultQueryRewriter
columnType
- the (non-null) ColumnType
to rewritecolumnSize
- the (possibly null) column size that may or may not have been
specifiedpublic void setStatementParameter(PreparedStatement st, int valueIndex, Column column, Object value) throws SQLException
IQueryRewriter
PreparedStatement.setObject(int, Object)
method but for some
types we use more specific setter methods.setStatementParameter
in interface IQueryRewriter
setStatementParameter
in class AbstractQueryRewriter
SQLException
public Object getResultSetValue(ResultSet resultSet, int columnIndex, Column column) throws SQLException
IQueryRewriter
ResultSet
when the anticipated value is mapped to a particular column.getResultSetValue
in interface IQueryRewriter
getResultSetValue
in class AbstractQueryRewriter
SQLException
protected String rewriteFromItem(Query query, FromItem item)
rewriteFromItem
in class AbstractQueryRewriter
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.