Package org.postgresql.pljava.adt.spi


package org.postgresql.pljava.adt.spi
Types that will be of interest in the implementation of Adapters.

First-class PL/Java support for a new PostgreSQL data type entails implementation of an Adapter. Unlike non-Adapter code, an Adapter implementation may have to concern itself with the facilities in this package, Datum in particular. An Adapter should avoid leaking a Datum to non-Adapter code.

Adapter manager

There needs to be an Adapter-manager service to accept application requests to connect x PostgreSQL type with y Java type and find or compose available Adapters (built-in or by service loader) to do so. There is some work in that direction (the methods in AbstractType should be helpful), but no such manager yet.

Author:
Chapman Flack
  • Class
    Description
    Custom implementations of Java's Type interfaces, with methods for a couple useful manipulations.
    A class recording the bindings made in a ParameterizedType to the type parameters in a GenericDeclaration<Class>.
    A class dedicated to manipulating the types of multidimensional Java arrays, and their instances, that conform to PostgreSQL array constraints (non-'jagged', each dimension's arrays all equal size, no intermediate nulls).
    Raw access to the contents of a PostgreSQL datum.
    Accessor for a Datum located, at some offset, in memory represented by a <B> object.
    An accessor for use with a 'deformed' (array-of-Datum) memory layout.
    An accessor for use with a heap-tuple styled, flattened, memory layout.
    Interface through which PL/Java code reads the content of an existing PostgreSQL datum.
    Empty superinterface of Accessor.Deformed and Accessor.Heap, which are erased at run time but help distinguish, in source code, which memory layout convention an Accessor is tailored for.
    Methods that have variants on twos-complement Java types that might be signed or unsigned.
    Mixin with default signed implementations of the interface methods.
    Mixin with default unsigned implementations of the interface methods.
    A Verifier verifies the proper form of content written to a Datum.
    A verifier interface to be used when the ByteBuffer API provides the most natural interface for manipulating the content.
    A verifier interface to be used when the InputStream API provides the most natural interface for manipulating the content.