Class PgViewResultSet

java.lang.Object
oracle.pg.rdbms.pgql.PgqlResultSetImpl
oracle.pg.rdbms.pgql.pgview.PgViewResultSet
All Implemented Interfaces:
AutoCloseable, Iterable<oracle.pgql.lang.ResultAccess>, PgqlResultSet, oracle.pgql.lang.ResultAccess, oracle.pgql.lang.ResultSet<oracle.pgql.lang.ResultAccess>

public class PgViewResultSet extends oracle.pg.rdbms.pgql.PgqlResultSetImpl
This class provides a ResultSet for a PGQL query execution. It uses a JDBC-style ResultSet approach for consuming the query result.
  • Constructor Details

    • PgViewResultSet

      public PgViewResultSet(ResultSet rs, Statement stmt, int fetchSize, oracle.pg.rdbms.pgql.QueryContext ctx, PgqlExecution ope, long id, boolean closeStatement) throws SQLException
      Constructor
      Parameters:
      rs - JDBC ResultSet object for the SQL translation of this PGQL query
      stmt - JDBC Statement used to create this result set
      fetchSize - the fetch size to use for the result set
      ctx - the context for this query (flags, etc.)
      ope - the PgqlExecution object that generated this result set
      id - the id for this result set
      closeStatement - true if JDBC Statement should be closed in close method, false otherwise
      Throws:
      SQLException - if a database access error occurs
  • Method Details

    • getMetaData

      public oracle.pgql.lang.ResultSetMetaData getMetaData()
      Retrieves the number and properties of this ResultSet object's columns.
      Returns:
      the description of this ResultSet object's columns
    • getObject

      public Object getObject(int elementIdx) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as an Object
      Parameters:
      elementIdx - element index
      Returns:
      Object
      Throws:
      oracle.pgql.lang.PgqlException
    • getObject

      public Object getObject(String elementName) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as an Object
      Parameters:
      elementName - element name
      Returns:
      Object
      Throws:
      oracle.pgql.lang.PgqlException
    • getString

      public String getString(int elementIdx) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element index as a String
      Parameters:
      elementIdx - element index
      Returns:
      String
      Throws:
      oracle.pgql.lang.PgqlException
    • getString

      public String getString(String elementName) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as a String
      Parameters:
      elementName - element name
      Returns:
      String
      Throws:
      oracle.pgql.lang.PgqlException
    • getInteger

      public Integer getInteger(int elementIdx) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element index as an Integer
      Parameters:
      elementIdx - element index
      Returns:
      Integer
      Throws:
      oracle.pgql.lang.PgqlException
    • getInteger

      public Integer getInteger(String elementName) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as an Integer
      Parameters:
      elementName - element name
      Returns:
      Integer
      Throws:
      oracle.pgql.lang.PgqlException
    • getLong

      public Long getLong(int elementIdx) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element index as a Long
      Parameters:
      elementIdx - element index
      Returns:
      Long
      Throws:
      oracle.pgql.lang.PgqlException
    • getLong

      public Long getLong(String elementName) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as a Long
      Parameters:
      elementName - element name
      Returns:
      Long
      Throws:
      oracle.pgql.lang.PgqlException
    • getFloat

      public Float getFloat(int elementIdx) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element index as a Float
      Parameters:
      elementIdx - element index
      Returns:
      Float
      Throws:
      oracle.pgql.lang.PgqlException
    • getFloat

      public Float getFloat(String elementName) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as a Float
      Parameters:
      elementName - element name
      Returns:
      Float
      Throws:
      oracle.pgql.lang.PgqlException
    • getDouble

      public Double getDouble(int elementIdx) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element index as a Double
      Parameters:
      elementIdx - element index
      Returns:
      Double
      Throws:
      oracle.pgql.lang.PgqlException
    • getDouble

      public Double getDouble(String elementName) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as a Double
      Parameters:
      elementName - element name
      Returns:
      Double
      Throws:
      oracle.pgql.lang.PgqlException
    • getBoolean

      public Boolean getBoolean(int elementIdx) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element index as a Boolean
      Parameters:
      elementIdx - element index
      Returns:
      Boolean
      Throws:
      oracle.pgql.lang.PgqlException
    • getBoolean

      public Boolean getBoolean(String elementName) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as a Boolean
      Parameters:
      elementName - element name
      Returns:
      Boolean
      Throws:
      oracle.pgql.lang.PgqlException
    • getDate

      public LocalDate getDate(int columnIdx) throws oracle.pgql.lang.PgqlException
      Retrieves the value of the designated column in the current row as a LocalDate
      Specified by:
      getDate in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getDate in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      columnIdx - column index
      Returns:
      LocalDate
      Throws:
      oracle.pgql.lang.PgqlException
    • getDate

      public LocalDate getDate(String columnName) throws oracle.pgql.lang.PgqlException
      Retrieves the value of the designated column in the current row as a LocalDate
      Specified by:
      getDate in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getDate in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      columnName - column name
      Returns:
      LocalDate
      Throws:
      oracle.pgql.lang.PgqlException
    • getTime

      public LocalTime getTime(int columnIdx) throws oracle.pgql.lang.PgqlException
      Retrieves the value of the designated column in the current row as a LocalTime
      Specified by:
      getTime in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getTime in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      columnIdx - column index
      Returns:
      LocalTime
      Throws:
      oracle.pgql.lang.PgqlException
    • getTime

      public LocalTime getTime(String columnName) throws oracle.pgql.lang.PgqlException
      Retrieves the value of the designated column in the current row as a LocalTime
      Specified by:
      getTime in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getTime in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      columnName - column name
      Returns:
      LocalTime
      Throws:
      oracle.pgql.lang.PgqlException
    • getTimestamp

      public LocalDateTime getTimestamp(int columnIdx) throws oracle.pgql.lang.PgqlException
      Retrieves the value of the designated column in the current row as a LocalDateTime
      Specified by:
      getTimestamp in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getTimestamp in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      columnIdx - column index
      Returns:
      LocalDateTime
      Throws:
      oracle.pgql.lang.PgqlException
    • getTimestamp

      public LocalDateTime getTimestamp(String columnName) throws oracle.pgql.lang.PgqlException
      Retrieves the value of the designated column in the current row as a LocalDateTime
      Specified by:
      getTimestamp in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getTimestamp in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      columnName - column name
      Returns:
      LocalDateTime
      Throws:
      oracle.pgql.lang.PgqlException
    • getTimeWithTimezone

      public OffsetTime getTimeWithTimezone(int columnIdx) throws oracle.pgql.lang.PgqlException
      Retrieves the value of the designated column in the current row as an OffsetTime
      Specified by:
      getTimeWithTimezone in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getTimeWithTimezone in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      columnIdx - column index
      Returns:
      OffsetTime
      Throws:
      oracle.pgql.lang.PgqlException
    • getTimeWithTimezone

      public OffsetTime getTimeWithTimezone(String columnName) throws oracle.pgql.lang.PgqlException
      Retrieves the value of the designated column in the current row as an OffsetTime
      Specified by:
      getTimeWithTimezone in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getTimeWithTimezone in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      columnName - column name
      Returns:
      OffsetTime
      Throws:
      oracle.pgql.lang.PgqlException
    • getTimestampWithTimezone

      public OffsetDateTime getTimestampWithTimezone(int elementIdx) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element index as an OffsetDateTime
      Specified by:
      getTimestampWithTimezone in interface oracle.pgql.lang.ResultAccess
      Overrides:
      getTimestampWithTimezone in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
      Parameters:
      elementIdx - element index
      Returns:
      OffsetDateTime
      Throws:
      oracle.pgql.lang.PgqlException
    • getTimestampWithTimezone

      public OffsetDateTime getTimestampWithTimezone(String elementName) throws oracle.pgql.lang.PgqlException
      Gets the value of the designated element by element name as an OffsetDateTime
      Parameters:
      elementName - element name
      Returns:
      OffsetDateTime
      Throws:
      oracle.pgql.lang.PgqlException
    • getValueType

      public int getValueType(int elementIdx) throws oracle.pgql.lang.PgqlException
      Description copied from interface: PgqlResultSet
      Returns the type of value for the given element. The returned values correspond to values in the T column of the PG relational schema.
      Parameters:
      elementIdx - element index
      Returns:
      the type of value
      Throws:
      oracle.pgql.lang.PgqlException - when an error occurs while retrieving the value type
    • getValueType

      public int getValueType(String elementName) throws oracle.pgql.lang.PgqlException
      Description copied from interface: PgqlResultSet
      Returns the type of value for the given element. The returned values correspond to values in the T column of the PG relational schema.
      Parameters:
      elementName - element name
      Returns:
      the type of value
      Throws:
      oracle.pgql.lang.PgqlException - when an error occurs while retrieving the value type