MCPcopy Index your code
hub / github.com/apache/groovy / newInstance

Method newInstance

subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java:321–324  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 1

withInstanceMethod · 0.95

Calls 10

loadDriverMethod · 0.95
invokeConstructorOfMethod · 0.95
setConnectionMethod · 0.95
getConnectionMethod · 0.80
containsKeyMethod · 0.65
getMethod · 0.65
removeMethod · 0.65
toStringMethod · 0.65
setPropertyMethod · 0.65
putAllMethod · 0.45

Tested by

no test coverage detected