Class SingleRowWriter

  • All Implemented Interfaces:
    AutoCloseable, ResultSet, Wrapper

    public class SingleRowWriter
    extends SingleRowResultSet
    A single row, updateable ResultSet, specially made for functions and procedures that returns complex types or sets.

    A TupleDesc must be passed to the constructor. After values have been written, the native pointer to a formed Tuple can be retrieved using getTupleAndClear().

    Author:
    Thomas Hallgren
    • Constructor Detail

      • SingleRowWriter

        public SingleRowWriter​(TupleDesc tupleDesc)
                        throws SQLException
        Construct a SingleRowWriter given a descriptor of the tuple structure it should produce.
        Throws:
        SQLException
    • Method Detail

      • rowUpdated

        public boolean rowUpdated()
                           throws SQLException
        Returns true if the row contains any non null values since all values of the row are null initially.
        Throws:
        SQLException
      • close

        public void close()
                   throws SQLException
        Cancels all changes but doesn't really close the set.
        Throws:
        SQLException
      • getTupleAndClear

        public long getTupleAndClear()
                              throws SQLException
        Creates a tuple from the current row values and then cancel all row updates to prepare for a new row. This method is called automatically by the trigger handler and should not be called in any other way.
        Returns:
        The native pointer of the Tuple reflecting the current row values.
        Throws:
        SQLException