Class PreparedStatementBuilder
java.lang.Object
io.github.torand.fastersql.statement.PreparedStatementBuilder
Builder for creating PreparedStatement with a Connection.
-
Method Summary
Modifier and TypeMethodDescriptionprepare
(PreparableStatement statement) Creates JDBC prepared statement from the specified preparable statement, ready for execution.static PreparedStatementBuilder
using
(Connection connection) Creates builder for statements to be executed on specified connection.static PreparedStatementBuilder
using
(Connection connection, Dialect dialect) Creates builder for statements to be executed on specified connection, using specified SQL dialect.
-
Method Details
-
using
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
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
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.
-