MCPcopy Create free account
hub / github.com/BaseXdb/basex / close

Method close

basex-core/src/main/java/org/basex/core/Command.java:381–384  ·  view source on GitHub ↗

Closes the specified database if it is currently opened and only pinned once. @param ctx database context @param db database to be closed @return true if opened database was closed

(final Context ctx, final String db)

Source from the content-addressed store, hash-verified

379 * @return {@code true} if opened database was closed
380 */
381 protected static boolean close(final Context ctx, final String db) {
382 final Data data = ctx.data();
383 return data != null && db.equals(data.meta.name) && ctx.datas.pins(db) == 1 && Close.close(ctx);
384 }
385}

Callers

nothing calls this directly

Calls 4

closeMethod · 0.95
dataMethod · 0.45
equalsMethod · 0.45
pinsMethod · 0.45

Tested by

no test coverage detected