Class PreparedStatementBuilder

java.lang.Object
io.github.torand.fastersql.statement.PreparedStatementBuilder

public class PreparedStatementBuilder extends Object
Builder for creating PreparedStatement with a Connection.
  • Method Details

    • using

      public static PreparedStatementBuilder using(Connection connection)
      Creates builder for statements to be executed on specified connection. The SQL dialect is selected based on metadata from connection.
      Parameters:
      connection - the connection.
      Returns:
      the statement builder
    • using

      public static PreparedStatementBuilder using(Connection connection, Dialect dialect)
      Creates builder for statements to be executed on specified connection, using specified SQL dialect.
      Parameters:
      connection - the connection.
      dialect - the SQL dialect.
      Returns:
      the statement builder.
    • prepare

      public PreparedStatement prepare(PreparableStatement statement) throws SQLException
      Creates JDBC prepared statement from the specified preparable statement, ready for execution.
      Parameters:
      statement - the preparable statement.
      Returns:
      the prepared statement.
      Throws:
      SQLException - if database access error occurs or statement parameter assignment fails.