Interface SqlClient<T>

Type Parameters:
T - the original
All Superinterfaces:
Client<T>
All Known Implementing Classes:
H2Client, HikariSqlClient, JavaSqlClient

public interface SqlClient<T> extends Client<T>
The interface for SQL client
  • Method Details

    • getConnection

      Connection getConnection() throws SQLException
      Get the connection
      Returns:
      the connection
      Throws:
      SQLException - if there is an SQL error
    • createStatementBuilder

      default StatementBuilder createStatementBuilder() throws SQLException
      Create a new statement builder for this client
      Returns:
      the statement builder
      Throws:
      SQLException - if there is an SQL error
    • createStatementBuilderSafe

      default Optional<StatementBuilder> createStatementBuilderSafe()
      Create a new statement builder for this client but ignores exceptions
      Returns:
      the statement builder
    • createBatchBuilder

      default BatchBuilder createBatchBuilder(@Language("SQL") String statement) throws SQLException
      Create a new batch builder for this client
      Parameters:
      statement - the statement
      Returns:
      the batch builder
      Throws:
      SQLException - if there is an SQL error
    • createBatchBuilderSafe

      default Optional<BatchBuilder> createBatchBuilderSafe(@Language("SQL") String statement)
      Create a new batch builder for this client but ignores exceptions
      Parameters:
      statement - the statement
      Returns:
      the batch builder