@arkade-os/sdk Documentation - v0.5.0-rc.11
    Preparing search index...

    Function closeDatabase

    • Decrements the reference count and closes the database when no references remain.

      Refcount contract: call once per successful openDatabase, never per rejection. A rejected open already cleared its own bookkeeping, so a call paired with it decrements whatever entry a successor installed under the same name. createManagedConnection honours this — it only closes while it holds a promise, and every rejection path drops that promise first.

      Parameters

      • dbName: string

        The name of the database to close.

      Returns Promise<boolean>

      True if the database was closed, false otherwise.