- java.lang.Object
-
- org.postgresql.pljava.jdbc.AbstractResultSet
-
- org.postgresql.pljava.jdbc.ObjectResultSet
-
- org.postgresql.pljava.jdbc.SingleRowResultSet
-
- org.postgresql.pljava.jdbc.SingleRowReader
-
- org.postgresql.pljava.jdbc.SQLInputFromTuple
-
- All Implemented Interfaces:
AutoCloseable
,ResultSet
,SQLInput
,Wrapper
public class SQLInputFromTuple extends SingleRowReader implements SQLInput
Implements theSQLInput
interface for a user-defined type (UDT) implemented in Java, for the case where a composite type in PostgreSQL is used as the UDT's representation, so it can be accessed as a PG tuple.- Author:
- Thomas Hallgren
-
-
Field Summary
-
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
-
-
Constructor Summary
Constructors Constructor Description SQLInputFromTuple(DualState.Key cookie, long resourceOwner, long heapTupleHeaderPointer, TupleDesc tupleDesc)
Construct an instance, given the (native) pointer to a PGHeapTupleHeader
, as well as the TupleDesc (Java object this time) describing its structure.
-
Method Summary
Modifier and Type Method Description protected int
nextIndex()
Array
readArray()
Implemented overreadValue(java.lang.Class<T>)
.InputStream
readAsciiStream()
Implemented overreadClob()
.BigDecimal
readBigDecimal()
Implemented overreadValue(java.lang.Class<T>)
.InputStream
readBinaryStream()
Implemented overreadBlob()
.Blob
readBlob()
Implemented overreadBytes()
.boolean
readBoolean()
Implemented overreadValue(java.lang.Class<T>)
.byte
readByte()
Implemented overreadNumber(java.lang.Class)
.byte[]
readBytes()
Implemented overreadValue(java.lang.Class<T>)
.Reader
readCharacterStream()
Implemented overreadClob()
.Clob
readClob()
Implemented overreadString()
.Date
readDate()
Implemented overreadValue(java.lang.Class<T>)
.double
readDouble()
Implemented overreadNumber(java.lang.Class)
.float
readFloat()
Implemented overreadNumber(java.lang.Class)
.int
readInt()
Implemented overreadNumber(java.lang.Class)
.long
readLong()
Implemented overreadNumber(java.lang.Class)
.NClob
readNClob()
Not yet implemented.String
readNString()
Not yet implemented.Object
readObject()
<T> T
readObject(Class<T> type)
Ref
readRef()
Implemented overreadValue(java.lang.Class<T>)
.RowId
readRowId()
Not yet implemented.short
readShort()
Implemented overreadNumber(java.lang.Class)
.SQLXML
readSQLXML()
String
readString()
Implemented overreadValue(java.lang.Class<T>)
.Time
readTime()
Implemented overreadValue(java.lang.Class<T>)
.Timestamp
readTimestamp()
Implemented overreadValue(java.lang.Class<T>)
.URL
readURL()
Implemented overreadValue(java.lang.Class<T>)
.-
Methods inherited from class org.postgresql.pljava.jdbc.SingleRowReader
cancelRowUpdates, close, deleteRow, getConcurrency, getObjectValue, getTupleDesc, insertRow, isClosed, moveToInsertRow, rowUpdated, updateObject, updateObject, updateRow
-
Methods inherited from class org.postgresql.pljava.jdbc.SingleRowResultSet
absolute, afterLast, beforeFirst, findColumn, first, getFetchDirection, getFetchSize, getHoldability, getMetaData, getRow, getType, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, next, previous, relative, rowDeleted, rowInserted, setFetchDirection, setFetchSize
-
Methods inherited from class org.postgresql.pljava.jdbc.ObjectResultSet
clearWarnings, getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getDate, getDate, getDouble, getFloat, getInt, getLong, getNumber, getObject, getObject, getObject, getObjectValue, getObjectValue, getRef, getShort, getString, getTime, getTime, getTimestamp, getTimestamp, getUnicodeStream, getURL, getValue, getValue, getWarnings, refreshRow, updateArray, updateAsciiStream, updateBigDecimal, updateBinaryStream, updateBlob, updateBoolean, updateByte, updateBytes, updateCharacterStream, updateClob, updateDate, updateDouble, updateFloat, updateInt, updateLong, updateNull, updateRef, updateShort, updateString, updateTime, updateTimestamp, wasNull
-
Methods inherited from class org.postgresql.pljava.jdbc.AbstractResultSet
getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getCursorName, getDate, getDate, getDouble, getFloat, getInt, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getRef, getRowId, getRowId, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTimestamp, getTimestamp, getUnicodeStream, getURL, isWrapperFor, unwrap, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateByte, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDouble, updateFloat, updateInt, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateObject, updateObject, updateRef, updateRowId, updateRowId, updateShort, updateSQLXML, updateSQLXML, updateString, updateTime, updateTimestamp
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.ResultSet
updateObject, updateObject, updateObject, updateObject
-
-
-
-
Constructor Detail
-
SQLInputFromTuple
public SQLInputFromTuple(DualState.Key cookie, long resourceOwner, long heapTupleHeaderPointer, TupleDesc tupleDesc) throws SQLException
Construct an instance, given the (native) pointer to a PGHeapTupleHeader
, as well as the TupleDesc (Java object this time) describing its structure.- Throws:
SQLException
-
-
Method Detail
-
nextIndex
protected int nextIndex() throws SQLException
- Throws:
SQLException
-
readArray
public Array readArray() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readArray
in interfaceSQLInput
- Throws:
SQLException
-
readAsciiStream
public InputStream readAsciiStream() throws SQLException
Implemented overreadClob()
.- Specified by:
readAsciiStream
in interfaceSQLInput
- Throws:
SQLException
-
readBigDecimal
public BigDecimal readBigDecimal() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readBigDecimal
in interfaceSQLInput
- Throws:
SQLException
-
readBinaryStream
public InputStream readBinaryStream() throws SQLException
Implemented overreadBlob()
.- Specified by:
readBinaryStream
in interfaceSQLInput
- Throws:
SQLException
-
readBlob
public Blob readBlob() throws SQLException
Implemented overreadBytes()
.- Specified by:
readBlob
in interfaceSQLInput
- Throws:
SQLException
-
readBoolean
public boolean readBoolean() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readBoolean
in interfaceSQLInput
- Throws:
SQLException
-
readByte
public byte readByte() throws SQLException
Implemented overreadNumber(java.lang.Class)
.- Specified by:
readByte
in interfaceSQLInput
- Throws:
SQLException
-
readBytes
public byte[] readBytes() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readBytes
in interfaceSQLInput
- Throws:
SQLException
-
readCharacterStream
public Reader readCharacterStream() throws SQLException
Implemented overreadClob()
.- Specified by:
readCharacterStream
in interfaceSQLInput
- Throws:
SQLException
-
readClob
public Clob readClob() throws SQLException
Implemented overreadString()
.- Specified by:
readClob
in interfaceSQLInput
- Throws:
SQLException
-
readDate
public Date readDate() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readDate
in interfaceSQLInput
- Throws:
SQLException
-
readDouble
public double readDouble() throws SQLException
Implemented overreadNumber(java.lang.Class)
.- Specified by:
readDouble
in interfaceSQLInput
- Throws:
SQLException
-
readFloat
public float readFloat() throws SQLException
Implemented overreadNumber(java.lang.Class)
.- Specified by:
readFloat
in interfaceSQLInput
- Throws:
SQLException
-
readInt
public int readInt() throws SQLException
Implemented overreadNumber(java.lang.Class)
.- Specified by:
readInt
in interfaceSQLInput
- Throws:
SQLException
-
readLong
public long readLong() throws SQLException
Implemented overreadNumber(java.lang.Class)
.- Specified by:
readLong
in interfaceSQLInput
- Throws:
SQLException
-
readObject
public Object readObject() throws SQLException
- Specified by:
readObject
in interfaceSQLInput
- Throws:
SQLException
-
readRef
public Ref readRef() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readRef
in interfaceSQLInput
- Throws:
SQLException
-
readShort
public short readShort() throws SQLException
Implemented overreadNumber(java.lang.Class)
.- Specified by:
readShort
in interfaceSQLInput
- Throws:
SQLException
-
readString
public String readString() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readString
in interfaceSQLInput
- Throws:
SQLException
-
readTime
public Time readTime() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readTime
in interfaceSQLInput
- Throws:
SQLException
-
readTimestamp
public Timestamp readTimestamp() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readTimestamp
in interfaceSQLInput
- Throws:
SQLException
-
readURL
public URL readURL() throws SQLException
Implemented overreadValue(java.lang.Class<T>)
.- Specified by:
readURL
in interfaceSQLInput
- Throws:
SQLException
-
readSQLXML
public SQLXML readSQLXML() throws SQLException
- Specified by:
readSQLXML
in interfaceSQLInput
- Throws:
SQLException
-
readRowId
public RowId readRowId() throws SQLException
Not yet implemented.- Specified by:
readRowId
in interfaceSQLInput
- Throws:
SQLException
-
readNString
public String readNString() throws SQLException
Not yet implemented.- Specified by:
readNString
in interfaceSQLInput
- Throws:
SQLException
-
readNClob
public NClob readNClob() throws SQLException
Not yet implemented.- Specified by:
readNClob
in interfaceSQLInput
- Throws:
SQLException
-
readObject
public <T> T readObject(Class<T> type) throws SQLException
- Specified by:
readObject
in interfaceSQLInput
- Throws:
SQLException
-
-