@FunctionalInterface
public interface StatementSupplier
PreparedStatement
.Modifier and Type | Method and Description |
---|---|
java.sql.PreparedStatement |
get(java.sql.Connection cn)
Create a JDBC SQL PreparedStatement containing 0 or more parameters.
|
java.sql.PreparedStatement get(java.sql.Connection cn) throws java.sql.SQLException
Sample use:
StatementSupplier ss =
(cn) -> cn.prepareStatement("SELECT id, firstname, lastname"
+ " FROM persons WHERE id = ?");
cn
- JDBC connectionjava.sql.SQLException
- on failureCopyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641