Interface SlotTester


public interface SlotTester
A temporary test jig during TupleTableSlot development, not intended to last.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A temporary marker interface used on classes or interfaces whose static final fields should be visible to adapterPlease.
  • Method Summary

    Modifier and Type
    Method
    Description
    adapterPlease(String clazz, String field)
    Return one of the predefined Adapter instances, given knowledge of the class name and static final field name within that class inside PL/Java's implementation module.
    test(String query)
    Execute query, returning its complete result as a List of TupleTableSlot.
    Unwrap a ResultSet instance from the legacy JDBC layer as a Portal instance so results can be retrieved using new API.
  • Method Details

    • unwrapAsPortal

      Portal unwrapAsPortal(ResultSet rs) throws SQLException
      Unwrap a ResultSet instance from the legacy JDBC layer as a Portal instance so results can be retrieved using new API.
      Parameters:
      rs - a ResultSet, which can only be an SPIResultSet obtained from the legacy JDBC implementation, not yet closed or used to fetch anything, and will be closed.
      Throws:
      SQLException
    • test

      List<TupleTableSlot> test(String query)
      Execute query, returning its complete result as a List of TupleTableSlot.
    • adapterPlease

      Adapter adapterPlease(String clazz, String field) throws ReflectiveOperationException
      Return one of the predefined Adapter instances, given knowledge of the class name and static final field name within that class inside PL/Java's implementation module.

      Example:

       adapterPlease(
        "org.postgresql.pljava.pg.adt.Primitives", "FLOAT8_INSTANCE");
      
      Throws:
      ReflectiveOperationException