Creates a new Sql instance given a JDBC connection URL. @param url a database url of the form jdbc: subprotocol : subname @return a new Sql instance with a connection @throws SQLException if a database access error occurs
(String url)
| 319 | * @throws SQLException if a database access error occurs |
| 320 | */ |
| 321 | public static Sql newInstance(String url) throws SQLException { |
| 322 | Connection connection = DriverManager.getConnection(url); |
| 323 | return new Sql(connection); |
| 324 | } |
| 325 | |
| 326 | /** |
| 327 | * Invokes a closure passing it a new Sql instance created from the given JDBC connection URL. |
no test coverage detected