java.lang.Object
org.postgresql.pljava.internal.Relation
The
Relation
correspons to the internal PostgreSQL
Relation
.- Author:
- Thomas Hallgren
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the name of thisRelation
.Returns the schema name of thisRelation
.Returns a descriptor that describes tuples in thisRelation
.modifyTuple
(Tuple original, int[] fieldNumbers, Object[] values) Creates a newTuple
by substituting new values for selected columns copying the columns of the originalTuple
at other positions.
-
Method Details
-
getName
Returns the name of thisRelation
.- Throws:
SQLException
-
getSchema
Returns the schema name of thisRelation
.- Throws:
SQLException
-
getTupleDesc
Returns a descriptor that describes tuples in thisRelation
.- Throws:
SQLException
-
modifyTuple
Creates a newTuple
by substituting new values for selected columns copying the columns of the originalTuple
at other positions. The originalTuple
is not modified.Note: starting with PostgreSQL 10, this method can fail if SPI is not connected; it is the caller's responsibility in PG 10 and up to ensure that SPI is connected and that a longer-lived memory context than SPI's has been selected, if the caller wants the result of this call to survive
SPI_finish
.- Parameters:
original
- The tuple that serves as the source.fieldNumbers
- An array of one based indexes denoting the positions that are to receive modified values.values
- The array of new values. Each value in this array corresponds to an index in thefieldNumbers
array.- Returns:
- A copy of the original with modifications.
- Throws:
SQLException
- if indexes are out of range or the values illegal.
-