public interface IQueryRewriter
AbstractQueryRewriter
,
JdbcDataContext
Modifier and Type | Method and Description |
---|---|
String |
escapeQuotes(String item)
Escapes the quotes within a String literal of a query item.
|
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. |
boolean |
isAggregateFunctionSupported(AggregateFunction function)
Determines whether a specific aggregate function is supported by the
database or not.
|
boolean |
isFirstRowSupported()
Gets whether this query rewriter is able to write the "First row" query
property to the query string.
|
boolean |
isMaxRowsSupported()
Gets whether this query rewriter is able to write the "Max rows" query
property to the query string.
|
boolean |
isScalarFunctionSupported(ScalarFunction function)
Determines whether a specific scalar function is supported by the
database or not.
|
boolean |
isTransactional()
Determines if the JDBC data source supports transactions or not.
|
String |
rewriteColumnType(ColumnType columnType,
Integer columnSize)
Rewrites the name of a column type, as it is written in CREATE TABLE
statements.
|
String |
rewriteFilterItem(FilterItem whereItem) |
String |
rewriteFromItem(FromItem item) |
String |
rewriteQuery(Query query) |
void |
setStatementParameter(PreparedStatement st,
int valueIndex,
Column column,
Object value)
Method which handles the action of setting a parameterized value on a
statement.
|
String rewriteFilterItem(FilterItem whereItem)
void setStatementParameter(PreparedStatement st, int valueIndex, Column column, Object value) throws SQLException
PreparedStatement.setObject(int, Object)
method but for some
types we use more specific setter methods.st
- valueIndex
- column
- value
- SQLException
Object getResultSetValue(ResultSet resultSet, int columnIndex, Column column) throws SQLException
ResultSet
when the anticipated value is mapped to a particular column.resultSet
- columnIndex
- column
- SQLException
boolean isMaxRowsSupported()
boolean isFirstRowSupported()
boolean isScalarFunctionSupported(ScalarFunction function)
function
- boolean isAggregateFunctionSupported(AggregateFunction function)
function
- String escapeQuotes(String item)
String rewriteColumnType(ColumnType columnType, Integer columnSize)
columnType
- the (non-null) ColumnType
to rewritecolumnSize
- the (possibly null) column size that may or may not have been
specifiedColumnType getColumnType(int jdbcType, String nativeType, Integer columnSize)
Types
), native type name and column size.jdbcType
- nativeType
- columnSize
- boolean isTransactional()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.