Interface RefCursor

All Superinterfaces:
Closeable

public interface RefCursor extends Closeable
A ref cursor value object. Cursor objects can be attached to a PostgresqlConnection which allows interaction with the cursor object by fetching the cursor and closing it. Cursor objects are stateful resources. Obtaining a cursor typically keeps the cursor open on the database server. The cursor object can get invalidated if the transaction is closed. Cursor objects should be closed if they are no longer required. Detached cursors that were instantiated without a connection may throw UnsupportedOperationException when attempting to fetch or close the cursor.
  • Method Details

    • getCursorName

      String getCursorName()
      Return the ref cursor name (portal name).
      Returns:
      the ref cursor name (portal name).
    • fetch

      Fetch the contents of the cursor using FETCH ALL IN.
      Returns:
      the PostgresqlResult associated with the ref cursor.
    • close

      Mono<Void> close()
      Close the cursor.
      Specified by:
      close in interface Closeable
      Returns:
      a Mono terminating with success the cursor was closed.