Top Description Fields Constructors Methods
com.ziclix.python.sql

pack-priv Class DynamicFetch

Located in compilation unit of com.ziclix.python.sql.Fetch.

extends Fetch
Class Inheritance

Dynamically construct the results from an execute*(). The static version builds the entire result set immediately upon completion of the query, however in some circumstances, this requires far too many resources to be efficient. In this version of the fetch the resources remain constant. The dis-advantage to this approach from an API perspective is its impossible to generate an accurate rowcount since not all the rows have been consumed.

Field Summary

Modifier and TypeField and Description
protected ResultSet
resultSet

Field resultSet

protected Set<Integer>
skipCols

Field skipCols

Inherited from com.ziclix.python.sql.Fetch:
descriptionrowcountrownumber

Constructor Summary

AccessConstructor and Description
public
DynamicFetch(DataHandler datahandler)

Construct a dynamic fetch.

Method Summary

Modifier and TypeMethod and Description
public void
add(ResultSet resultSet)

Implements abstract com.ziclix.python.sql.Fetch.add.

Add the result set to the results.

public void
add(ResultSet resultSet, Set<Integer>
JDBC-indexed set of columns to be skipped
skipCols
)

Implements abstract com.ziclix.python.sql.Fetch.add.

Add the result set to the results.

public void
add(CallableStatement callableStatement, Procedure procedure, PyObject params)

Implements abstract com.ziclix.python.sql.Fetch.add.

Method add

public void
close()

Overrides com.ziclix.python.sql.Fetch.close.

Close the underlying ResultSet.

private PyObject
fetch(int size, boolean all)

Internal use only.

public PyObject
fetchall()

Implements abstract com.ziclix.python.sql.Fetch.fetchall.

Iterate the remaining contents of the ResultSet and return.

public PyObject
fetchmany(int size)

Implements abstract com.ziclix.python.sql.Fetch.fetchmany.

Iterate up to size rows remaining in the ResultSet and return.

public PyObject
nextset()

Implements abstract com.ziclix.python.sql.Fetch.nextset.

Always returns None.

public void
scroll(int value, String mode)

Implements abstract com.ziclix.python.sql.Fetch.scroll.

Method scroll

Inherited from com.ziclix.python.sql.Fetch:
addWarningListenercreateDescriptioncreateDescriptioncreateResultcreateResultscreateResultsfetchonefireWarninggetDescriptiongetRowCountnewFetchrefersDirectlyToremoveWarningListenertraverse

Field Detail

resultSetback to summary
protected ResultSet resultSet

Field resultSet

skipColsback to summary
protected Set<Integer> skipCols

Field skipCols

Constructor Detail

DynamicFetchback to summary
public DynamicFetch(DataHandler datahandler)

Construct a dynamic fetch.

Method Detail

addback to summary
public void add(ResultSet resultSet)

Implements abstract com.ziclix.python.sql.Fetch.add.

Add the result set to the results. If more than one result set is attempted to be added, an Error is raised since JDBC requires that only one ResultSet be iterated for one Statement at any one time. Since this is a dynamic iteration, it precludes the addition of more than one result set.

Annotations
@Override
addback to summary
public void add(ResultSet resultSet, Set<Integer> skipCols)

Implements abstract com.ziclix.python.sql.Fetch.add.

Add the result set to the results. If more than one result set is attempted to be added, an Error is raised since JDBC requires that only one ResultSet be iterated for one Statement at any one time. Since this is a dynamic iteration, it precludes the addition of more than one result set.

Parameters
skipCols:Set<Integer>

Doc from com.ziclix.python.sql.Fetch.add.

JDBC-indexed set of columns to be skipped

Annotations
@Override
addback to summary
public void add(CallableStatement callableStatement, Procedure procedure, PyObject params)

Implements abstract com.ziclix.python.sql.Fetch.add.

Method add

Annotations
@Override
closeback to summary
public void close() throws SQLException

Overrides com.ziclix.python.sql.Fetch.close.

Close the underlying ResultSet.

Annotations
@Override
fetchback to summary
private PyObject fetch(int size, boolean all)

Internal use only. If all is true, return everything that's left in the result set, otherwise return up to size. Fewer than size may be returned if fewer than size results are left in the set.

fetchallback to summary
public PyObject fetchall()

Implements abstract com.ziclix.python.sql.Fetch.fetchall.

Iterate the remaining contents of the ResultSet and return.

Returns:PyObject

Doc from com.ziclix.python.sql.Fetch.fetchall.

a sequence of sequences from the result set, or None when no more data is available

Annotations
@Override

fetchmanyback to summary
public PyObject fetchmany(int size)

Implements abstract com.ziclix.python.sql.Fetch.fetchmany.

Iterate up to size rows remaining in the ResultSet and return.

Returns:PyObject

Doc from com.ziclix.python.sql.Fetch.fetchmany.

a sequence of sequences from the result set, or None when no more data is available

Annotations
@Override

nextsetback to summary
public PyObject nextset()

Implements abstract com.ziclix.python.sql.Fetch.nextset.

Always returns None.

Returns:PyObject

Doc from com.ziclix.python.sql.Fetch.nextset.

true if more sets exist, else None

Annotations
@Override

scrollback to summary
public void scroll(int value, String mode)

Implements abstract com.ziclix.python.sql.Fetch.scroll.

Method scroll

Annotations
@Override