withSnapshot

abstract fun <T> withSnapshot(action: LevelDBSnapshot.() -> T): T

Executes a provided action within the context of a LevelDB snapshot. This method ensures that the action runs with a consistent view of the database at the time the snapshot is created.

Parameters

action

The action to execute within the snapshot's context. This is a lambda with receiver that operates on a LevelDBSnapshot instance.