Class DatumUtils

java.lang.Object
org.postgresql.pljava.pg.DatumUtils

public class DatumUtils extends Object
Implementations of Datum.Accessor and a collection of related static methods.
  • Constructor Details

    • DatumUtils

      public DatumUtils()
  • Method Details

    • indexedTupleSlot

      public static TupleTableSlot.Indexed indexedTupleSlot(RegType type, int elements, ByteBuffer nulls, ByteBuffer values)
    • addressOf

      public static long addressOf(ByteBuffer bb)
    • fetchPointer

      public static long fetchPointer(ByteBuffer bb, int offset)
    • storePointer

      public static void storePointer(ByteBuffer bb, int offset, long value)
    • asReadOnlyNativeOrder

      public static ByteBuffer asReadOnlyNativeOrder(ByteBuffer bb)
    • mapFixedLength

      public static ByteBuffer mapFixedLength(ByteBuffer bb, int offset, int length)
    • mapCString

      public static ByteBuffer mapCString(ByteBuffer bb, int offset)
    • inspectVarlena

      public static int inspectVarlena(ByteBuffer bb, int offset)
      For now, just return the inline size (the size to be skipped if stepping over this varlena in a heap tuple).

      This is a reimplementation of some of the top of postgres.h, so that this common operation can be done without a JNI call to the C code.