Package oracle.pg.rdbms.pgql.pgview
Class PgViewResultSet
- java.lang.Object
-
- oracle.pg.rdbms.pgql.PgqlResultSetImpl
-
- oracle.pg.rdbms.pgql.pgview.PgViewResultSet
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.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 Summary
Constructors Constructor Description PgViewResultSet(java.sql.ResultSet rs, java.sql.Statement stmt, int fetchSize, oracle.pg.rdbms.pgql.QueryContext ctx, PgqlExecution ope, long id, boolean closeStatement)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
getBoolean(int elementIdx)
Gets the value of the designated element by element index as aBoolean
java.lang.Boolean
getBoolean(java.lang.String elementName)
Gets the value of the designated element by element name as aBoolean
java.time.LocalDate
getDate(int columnIdx)
Retrieves the value of the designated column in the current row as aLocalDate
java.time.LocalDate
getDate(java.lang.String columnName)
Retrieves the value of the designated column in the current row as aLocalDate
java.lang.Double
getDouble(int elementIdx)
Gets the value of the designated element by element index as aDouble
java.lang.Double
getDouble(java.lang.String elementName)
Gets the value of the designated element by element name as aDouble
java.lang.Float
getFloat(int elementIdx)
Gets the value of the designated element by element index as aFloat
java.lang.Float
getFloat(java.lang.String elementName)
Gets the value of the designated element by element name as aFloat
java.lang.Integer
getInteger(int elementIdx)
Gets the value of the designated element by element index as anInteger
java.lang.Integer
getInteger(java.lang.String elementName)
Gets the value of the designated element by element name as anInteger
java.lang.Long
getLong(int elementIdx)
Gets the value of the designated element by element index as aLong
java.lang.Long
getLong(java.lang.String elementName)
Gets the value of the designated element by element name as aLong
oracle.pgql.lang.ResultSetMetaData
getMetaData()
Retrieves the number and properties of thisResultSet
object's columns.java.lang.Object
getObject(int elementIdx)
Gets the value of the designated element by element name as anObject
java.lang.Object
getObject(java.lang.String elementName)
Gets the value of the designated element by element name as anObject
java.lang.String
getString(int elementIdx)
Gets the value of the designated element by element index as aString
java.lang.String
getString(java.lang.String elementName)
Gets the value of the designated element by element name as aString
java.time.LocalTime
getTime(int columnIdx)
Retrieves the value of the designated column in the current row as aLocalTime
java.time.LocalTime
getTime(java.lang.String columnName)
Retrieves the value of the designated column in the current row as aLocalTime
java.time.LocalDateTime
getTimestamp(int columnIdx)
Retrieves the value of the designated column in the current row as aLocalDateTime
java.time.LocalDateTime
getTimestamp(java.lang.String columnName)
Retrieves the value of the designated column in the current row as aLocalDateTime
java.time.OffsetDateTime
getTimestampWithTimezone(int elementIdx)
Gets the value of the designated element by element index as anOffsetDateTime
java.time.OffsetDateTime
getTimestampWithTimezone(java.lang.String elementName)
Gets the value of the designated element by element name as anOffsetDateTime
java.time.OffsetTime
getTimeWithTimezone(int columnIdx)
Retrieves the value of the designated column in the current row as anOffsetTime
java.time.OffsetTime
getTimeWithTimezone(java.lang.String columnName)
Retrieves the value of the designated column in the current row as anOffsetTime
int
getValueType(int elementIdx)
Returns the type of value for the given element.int
getValueType(java.lang.String elementName)
Returns the type of value for the given element.-
Methods inherited from class oracle.pg.rdbms.pgql.PgqlResultSetImpl
absolute, afterLast, beforeFirst, close, first, getLegacyDate, getLegacyDate, getList, getList, getVertexLabels, getVertexLabels, iterator, last, next, previous, print, print, relative
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.pg.rdbms.pgql.PgqlResultSet
print, print
-
-
-
-
Constructor Detail
-
PgViewResultSet
public PgViewResultSet(java.sql.ResultSet rs, java.sql.Statement stmt, int fetchSize, oracle.pg.rdbms.pgql.QueryContext ctx, PgqlExecution ope, long id, boolean closeStatement) throws java.sql.SQLException
Constructor- Parameters:
rs
- JDBC ResultSet object for the SQL translation of this PGQL querystmt
- JDBC Statement used to create this result setfetchSize
- the fetch size to use for the result setctx
- the context for this query (flags, etc.)ope
- the PgqlExecution object that generated this result setid
- the id for this result setcloseStatement
- true if JDBC Statement should be closed in close method, false otherwise- Throws:
java.sql.SQLException
- if a database access error occurs
-
-
Method Detail
-
getMetaData
public oracle.pgql.lang.ResultSetMetaData getMetaData()
Retrieves the number and properties of thisResultSet
object's columns.- Returns:
- the description of this
ResultSet
object's columns
-
getObject
public java.lang.Object getObject(int elementIdx) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as anObject
- Parameters:
elementIdx
- element index- Returns:
Object
- Throws:
oracle.pgql.lang.PgqlException
-
getObject
public java.lang.Object getObject(java.lang.String elementName) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as anObject
- Parameters:
elementName
- element name- Returns:
Object
- Throws:
oracle.pgql.lang.PgqlException
-
getString
public java.lang.String getString(int elementIdx) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element index as aString
- Parameters:
elementIdx
- element index- Returns:
String
- Throws:
oracle.pgql.lang.PgqlException
-
getString
public java.lang.String getString(java.lang.String elementName) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as aString
- Parameters:
elementName
- element name- Returns:
String
- Throws:
oracle.pgql.lang.PgqlException
-
getInteger
public java.lang.Integer getInteger(int elementIdx) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element index as anInteger
- Parameters:
elementIdx
- element index- Returns:
Integer
- Throws:
oracle.pgql.lang.PgqlException
-
getInteger
public java.lang.Integer getInteger(java.lang.String elementName) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as anInteger
- Parameters:
elementName
- element name- Returns:
Integer
- Throws:
oracle.pgql.lang.PgqlException
-
getLong
public java.lang.Long getLong(int elementIdx) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element index as aLong
- Parameters:
elementIdx
- element index- Returns:
Long
- Throws:
oracle.pgql.lang.PgqlException
-
getLong
public java.lang.Long getLong(java.lang.String elementName) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as aLong
- Parameters:
elementName
- element name- Returns:
Long
- Throws:
oracle.pgql.lang.PgqlException
-
getFloat
public java.lang.Float getFloat(int elementIdx) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element index as aFloat
- Parameters:
elementIdx
- element index- Returns:
Float
- Throws:
oracle.pgql.lang.PgqlException
-
getFloat
public java.lang.Float getFloat(java.lang.String elementName) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as aFloat
- Parameters:
elementName
- element name- Returns:
Float
- Throws:
oracle.pgql.lang.PgqlException
-
getDouble
public java.lang.Double getDouble(int elementIdx) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element index as aDouble
- Parameters:
elementIdx
- element index- Returns:
Double
- Throws:
oracle.pgql.lang.PgqlException
-
getDouble
public java.lang.Double getDouble(java.lang.String elementName) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as aDouble
- Parameters:
elementName
- element name- Returns:
Double
- Throws:
oracle.pgql.lang.PgqlException
-
getBoolean
public java.lang.Boolean getBoolean(int elementIdx) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element index as aBoolean
- Parameters:
elementIdx
- element index- Returns:
Boolean
- Throws:
oracle.pgql.lang.PgqlException
-
getBoolean
public java.lang.Boolean getBoolean(java.lang.String elementName) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as aBoolean
- Parameters:
elementName
- element name- Returns:
Boolean
- Throws:
oracle.pgql.lang.PgqlException
-
getDate
public java.time.LocalDate getDate(int columnIdx) throws oracle.pgql.lang.PgqlException
Retrieves the value of the designated column in the current row as aLocalDate
- Specified by:
getDate
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getDate
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
columnIdx
- column index- Returns:
LocalDate
- Throws:
oracle.pgql.lang.PgqlException
-
getDate
public java.time.LocalDate getDate(java.lang.String columnName) throws oracle.pgql.lang.PgqlException
Retrieves the value of the designated column in the current row as aLocalDate
- Specified by:
getDate
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getDate
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
columnName
- column name- Returns:
LocalDate
- Throws:
oracle.pgql.lang.PgqlException
-
getTime
public java.time.LocalTime getTime(int columnIdx) throws oracle.pgql.lang.PgqlException
Retrieves the value of the designated column in the current row as aLocalTime
- Specified by:
getTime
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getTime
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
columnIdx
- column index- Returns:
LocalTime
- Throws:
oracle.pgql.lang.PgqlException
-
getTime
public java.time.LocalTime getTime(java.lang.String columnName) throws oracle.pgql.lang.PgqlException
Retrieves the value of the designated column in the current row as aLocalTime
- Specified by:
getTime
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getTime
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
columnName
- column name- Returns:
LocalTime
- Throws:
oracle.pgql.lang.PgqlException
-
getTimestamp
public java.time.LocalDateTime getTimestamp(int columnIdx) throws oracle.pgql.lang.PgqlException
Retrieves the value of the designated column in the current row as aLocalDateTime
- Specified by:
getTimestamp
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getTimestamp
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
columnIdx
- column index- Returns:
LocalDateTime
- Throws:
oracle.pgql.lang.PgqlException
-
getTimestamp
public java.time.LocalDateTime getTimestamp(java.lang.String columnName) throws oracle.pgql.lang.PgqlException
Retrieves the value of the designated column in the current row as aLocalDateTime
- Specified by:
getTimestamp
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getTimestamp
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
columnName
- column name- Returns:
LocalDateTime
- Throws:
oracle.pgql.lang.PgqlException
-
getTimeWithTimezone
public java.time.OffsetTime getTimeWithTimezone(int columnIdx) throws oracle.pgql.lang.PgqlException
Retrieves the value of the designated column in the current row as anOffsetTime
- Specified by:
getTimeWithTimezone
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getTimeWithTimezone
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
columnIdx
- column index- Returns:
OffsetTime
- Throws:
oracle.pgql.lang.PgqlException
-
getTimeWithTimezone
public java.time.OffsetTime getTimeWithTimezone(java.lang.String columnName) throws oracle.pgql.lang.PgqlException
Retrieves the value of the designated column in the current row as anOffsetTime
- Specified by:
getTimeWithTimezone
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getTimeWithTimezone
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
columnName
- column name- Returns:
OffsetTime
- Throws:
oracle.pgql.lang.PgqlException
-
getTimestampWithTimezone
public java.time.OffsetDateTime getTimestampWithTimezone(int elementIdx) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element index as anOffsetDateTime
- Specified by:
getTimestampWithTimezone
in interfaceoracle.pgql.lang.ResultAccess
- Overrides:
getTimestampWithTimezone
in classoracle.pg.rdbms.pgql.PgqlResultSetImpl
- Parameters:
elementIdx
- element index- Returns:
OffsetDateTime
- Throws:
oracle.pgql.lang.PgqlException
-
getTimestampWithTimezone
public java.time.OffsetDateTime getTimestampWithTimezone(java.lang.String elementName) throws oracle.pgql.lang.PgqlException
Gets the value of the designated element by element name as anOffsetDateTime
- 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(java.lang.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
-
-