Class PostgreSqlResultIterator
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.dml.result.ResultIterator
-
- com.feedzai.commons.sql.abstraction.dml.result.PostgreSqlResultIterator
-
- All Implemented Interfaces:
AutoCloseable
public class PostgreSqlResultIterator extends ResultIterator
Result iterator for thePostgreSqlEngineengine.- Since:
- 2.0.0
- Author:
- Rui Vilao (rui.vilao@feedzai.com)
-
-
Constructor Summary
Constructors Constructor Description PostgreSqlResultIterator(PreparedStatement statement)Creates a new instance ofPostgreSqlResultIterator.PostgreSqlResultIterator(Statement statement, String sql)Creates a new instance ofPostgreSqlResultIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultColumncreateResultColumn(String name, Object value)Creates aResultColumnfor the given engine in place.protected QueryExceptionHandlergetQueryExceptionHandler()Gets the instance ofQueryExceptionHandlerto be used in disambiguating SQL exceptions.-
Methods inherited from class com.feedzai.commons.sql.abstraction.dml.result.ResultIterator
cancel, close, getColumnNames, getCurrentRowCount, isClosed, next, nextResult
-
-
-
-
Constructor Detail
-
PostgreSqlResultIterator
public PostgreSqlResultIterator(Statement statement, String sql) throws DatabaseEngineException
Creates a new instance ofPostgreSqlResultIterator.- Parameters:
statement- The statement.sql- The sql statement.- Throws:
DatabaseEngineException- If a database access error occurs.
-
PostgreSqlResultIterator
public PostgreSqlResultIterator(PreparedStatement statement) throws DatabaseEngineException
Creates a new instance ofPostgreSqlResultIterator.- Parameters:
statement- The prepared statement.- Throws:
DatabaseEngineException- If a database access error occurs.
-
-
Method Detail
-
createResultColumn
public ResultColumn createResultColumn(String name, Object value)
Description copied from class:ResultIteratorCreates aResultColumnfor the given engine in place.- Specified by:
createResultColumnin classResultIterator- Parameters:
name- The name of the column.value- The value on the column.- Returns:
- A specific result column given the implementation.
-
getQueryExceptionHandler
protected QueryExceptionHandler getQueryExceptionHandler()
Description copied from class:ResultIteratorGets the instance ofQueryExceptionHandlerto be used in disambiguating SQL exceptions.- Overrides:
getQueryExceptionHandlerin classResultIterator- Returns:
- the
QueryExceptionHandler.
-
-