         //
         // 1. A database is invoked from some queue like the main queue:
         //
-        //      dbQueue.inDatabase { db in       // <-- we're here
+        //      serializedDatabase.sync { 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
+        //      serializedDatabase.sync { db in
+        //          serializedDatabase.sync { db in   // <-- we're here
         //          }
         //      }
         //
         // 3. A database in invoked from another database:
         //
-        //      dbQueue1.inDatabase { db1 in
-        //          dbQueue2.inDatabase { db2 in // <-- we're here
+        //      serializedDatabase1.sync { db1 in
+        //          serializedDatabase2.sync { db2 in // <-- we're here
         //          }
         //      }
         
         guard let watchdog = SchedulingWatchdog.current else {
             // Case 1
             return try queue.sync {
-                defer { preconditionNoTransactionLeft(db) }
+                defer { preconditionNoUnsafeTransactionLeft(db) }
                 return try block(db)
             }
         }

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

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