Module org.postgresql.pljava
Package org.postgresql.pljava
Interface Adapter.Contract.Array<T,E,A extends Adapter<E,?>>
- Type Parameters:
T
- the type to be returned by an instance of the contract.E
- the type returned by an associatedAdapter
for the element type (or the boxed type, if the adapter returns a primitive type).A
- The subtype ofAdapter
that the contract requires; reference-returning (As
) and all of the primitive-returning types must be distinguished.
- All Superinterfaces:
Adapter.Contract<T>
- All Known Subinterfaces:
Array.AsFlatList<E>
- Enclosing interface:
Adapter.Contract<T>
public static interface Adapter.Contract.Array<T,E,A extends Adapter<E,?>>
extends Adapter.Contract<T>
Base for functional interfaces that serve as contracts
for array-like types.
The distinguishing feature is an associated Adapter
handling
the element type of the array-like type. This form of contract may
be useful for range and multirange types as well as for arrays.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.postgresql.pljava.Adapter.Contract
Adapter.Contract.Array<T,
E, A extends Adapter<E, ?>>, Adapter.Contract.Scalar<T> -
Method Summary
Modifier and TypeMethodDescriptionconstruct
(int nDims, int[] dimsAndBounds, A adapter, TupleTableSlot.Indexed slot) Constructs a representation T representing a PostgreSQL array.
-
Method Details
-
construct
T construct(int nDims, int[] dimsAndBounds, A adapter, TupleTableSlot.Indexed slot) throws SQLException Constructs a representation T representing a PostgreSQL array.- Parameters:
nDims
- the number of array dimensions (always one half ofdimsAndBounds.length
, but passed separately for convenience)dimsAndBounds
- the first nDims elements represent the total number of valid indices for each dimension, and the next nDims elements represent the first valid index for each dimension. For example, if nDims is 3, dimsAndBounds[1] is 6, and dimsAndBounds[4] is -2, then the array's second dimension uses indices in [-2,4). The array is a copy and may be used freely.adapter
- an Adapter producing a representation of the array's element type.slot
- A TupleTableSlot with multiple components accessible by a (single, flat) index, all of the same type, described by a one-element TupleDescriptor.- Throws:
SQLException
-