     func async(_ block: @escaping (Database) -> Void) {
         queue.async {
             block(self.db)
-            self.preconditionNoTransactionLeft(self.db)
+            self.preconditionNoUnsafeTransactionLeft(self.db)
         }
     }
     

        //
        // 1. A database is invoked from some queue like the main queue:
        //
        //      dbQueue.inDatabase { db in       // <-- we're here
        //      }
        //
        // 2. A database is invoked in a reentrant way:
        //
        //      dbQueue.inDatabase { db in
        //          dbQueue.inDatabase { db in   // <-- we're here
        //          }
        //      }
        //
        // 3. A database in invoked from another database:
        //
        //      dbQueue1.inDatabase { db1 in
        //          dbQueue2.inDatabase { db2 in // <-- we're here
        //          }
        //      }
        
        guard let watchdog = SchedulingWatchdog.current else {
            // Case 1
            return try queue.sync {
                defer { preconditionNoTransactionLeft(db) }
                return try block(db)
            }
        }

        // Case 3
        return try queue.sync {
            try SchedulingWatchdog.current!.inheritingAllowedDatabases(from: watchdog) {
                defer { preconditionNoUnsafeTransactionLeft(db) }
                return try block(db)
            }
        }
