Interface Recorder

All Superinterfaces:
AutoCloseable

public interface Recorder extends AutoCloseable
Object that can execute queries and return their response.

Depending on its Mode, the recorder executes each query on a backing database, generating a recording file as it goes, or answers each query by consulting an existing recording.

The modes allow you to run compliance tests in environments where the backend database is not available.

Created via Recorders.config().

  • Method Details

    • executeQuery

      void executeQuery(String db, String name, String sql, Consumer<ResultSet> consumer)
      Executes a query and calls consumer with the ResultSet containing the results of the query.
    • close

      void close()

      Unlike the method in the base class, never throws an unchecked exception.

      Specified by:
      close in interface AutoCloseable