Package org.postgresql.core
Class Tuple
- java.lang.Object
-
- org.postgresql.core.Tuple
-
public class Tuple extends java.lang.Object
Class representing a row in aResultSet
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
fieldCount()
Number of fields in the tuplebyte[]
get(int index)
Get the data for the given fieldint
length()
Total length in bytes of the tuple data.Tuple
readOnlyCopy()
Create a read-only copy of the tuplevoid
set(int index, byte[] fieldData)
Set the given field to the given data.Tuple
updateableCopy()
Create a copy of the tuple for updating.
-
-
-
Method Detail
-
fieldCount
public int fieldCount()
Number of fields in the tuple- Returns:
- number of fields
-
length
public int length()
Total length in bytes of the tuple data.- Returns:
- the number of bytes in this tuple
-
get
public byte[] get(int index)
Get the data for the given field- Parameters:
index
- 0-based field position in the tuple- Returns:
- byte array of the data
-
updateableCopy
public Tuple updateableCopy()
Create a copy of the tuple for updating.- Returns:
- a copy of the tuple that allows updates
-
readOnlyCopy
public Tuple readOnlyCopy()
Create a read-only copy of the tuple- Returns:
- a copy of the tuple that does not allow updates
-
set
public void set(int index, byte[] fieldData)
Set the given field to the given data.- Parameters:
index
- 0-based field positionfieldData
- the data to set
-
-