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)
| 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 | } |