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

Method close

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

If this SQL object was created with a Connection then this method closes the connection. If this SQL object was created from a DataSource then this method only frees any cached objects (statements in particular).

()

Source from the content-addressed store, hash-verified

3905 * this method only frees any cached objects (statements in particular).
3906 */
3907 @Override
3908 public void close() {
3909 namedParamSqlCache.clear();
3910 namedParamIndexPropCache.clear();
3911 clearStatementCache();
3912 if (useConnection != null) {
3913 try {
3914 useConnection.close();
3915 } catch (SQLException e) {
3916 LOG.finest("Caught exception closing connection: " + e.getMessage());
3917 }
3918 }
3919 }
3920
3921 /**
3922 * Returns the {@link DataSource} backing this instance.

Callers

nothing calls this directly

Calls 4

clearStatementCacheMethod · 0.95
clearMethod · 0.65
closeMethod · 0.65
getMessageMethod · 0.45

Tested by

no test coverage detected