Interface DbStatements

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DbStatements
Configuration of statements to be used by database provider.
  • Method Details

    • statement

      String statement(String name) throws DbClientException
      Get statement text for a named statement.
      name - name of the statement
      text of the statement (such as SQL code for SQL-based database statements)
      DbClientException - in case the statement name does not exist
    • builder

      static DbStatements.Builder builder()
      Builder of statements.
      a builder to customize statements
    • create

      static DbStatements create(Config config)
      Create statements from configuration. Statement configuration is expected to be a map of name to statement pairs.
      config - configuration of the statements
      statements as read from the configuration