java.lang.Object
org.postgresql.pljava.internal.Portal
The
Portal correspons to the internal PostgreSQL
Portal type.- Author:
- Thomas Hallgren
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Invalidates this structure and frees up memory using the internal functionSPI_cursor_closelongfetch(boolean forward, long count) Performs anSPI_cursor_fetch.getName()Returns the name of this Portal.longReturns the value of theportalPosattribute.Returns the TupleDesc that describes the row Tuples for this Portal.booleanisAtEnd()Returns the value of theatEndattribute.booleanReturns the value of theatStartattribute.longmove(boolean forward, long count) Performs anSPI_cursor_move.
-
Method Details
-
close
public void close()Invalidates this structure and frees up memory using the internal functionSPI_cursor_close -
getName
Returns the name of this Portal.- Throws:
SQLException- if the handle to the native structure is stale.
-
getPortalPos
Returns the value of theportalPosattribute.- Throws:
SQLException- if the handle to the native structure is stale.
-
getTupleDesc
Returns the TupleDesc that describes the row Tuples for this Portal.- Throws:
SQLException- if the handle to the native structure is stale.
-
fetch
Performs anSPI_cursor_fetch.The fetched rows are parked at the C global
SPI_tuptable; seeSPI.getTupTablefor retrieving them. (While faithful to the way the C API works, this seems a bit odd as a Java API, and suggests that calls to this method and thenSPI.getTupTablewould ideally be done inside a singledoInPG.)- Parameters:
forward- Set totruefor forward,falsefor backward.count- Maximum number of rows to fetch.- Returns:
- The actual number of fetched rows.
- Throws:
SQLException- if the handle to the native structure is stale.
-
isAtEnd
Returns the value of theatEndattribute.- Throws:
SQLException- if the handle to the native structure is stale.
-
isAtStart
Returns the value of theatStartattribute.- Throws:
SQLException- if the handle to the native structure is stale.
-
move
Performs anSPI_cursor_move.- Parameters:
forward- Set totruefor forward,falsefor backward.count- Maximum number of rows to fetch.- Returns:
- The actual number of rows moved.
- Throws:
SQLException- if the handle to the native structure is stale.
-