Interface Portal

All Superinterfaces:
AutoCloseable

public interface Portal extends AutoCloseable
Models a PostgreSQL Portal, an object representing the ongoing execution of a query and capable of returning a TupleDescriptor for the result, and fetching tuples of the result, either all at once, or in smaller batches.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The direction modes that can be used with fetch and move.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    A distinguished value for the count argument to fetch or move.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    fetch(Portal.Direction dir, long count)
    Fetches count more tuples (or ALL of them) in the specified direction.
    long
    move(Portal.Direction dir, long count)
    Moves the Portal's current position count rows (or ALL possible) in the specified direction.
    Returns the TupleDescriptor describing any tuples that may be fetched from this Portal.
  • Field Details

  • Method Details

    • close

      void close()
      Specified by:
      close in interface AutoCloseable
    • tupleDescriptor

      TupleDescriptor tupleDescriptor() throws SQLException
      Returns the TupleDescriptor describing any tuples that may be fetched from this Portal.
      Throws:
      SQLException
    • fetch

      List<TupleTableSlot> fetch(Portal.Direction dir, long count) throws SQLException
      Fetches count more tuples (or ALL of them) in the specified direction.
      Returns:
      a notional List of the fetched tuples. Iterating through the list may return the same TupleTableSlot repeatedly, with each tuple in turn stored in the slot.
      Throws:
      SQLException
      See Also:
      • "PostgreSQL documentation for SPI_scroll_cursor_fetch"
    • move

      long move(Portal.Direction dir, long count) throws SQLException
      Moves the Portal's current position count rows (or ALL possible) in the specified direction.
      Returns:
      the number of rows by which the position actually moved
      Throws:
      SQLException
      See Also:
      • "PostgreSQL documentation for SPI_scroll_cursor_move"