NativeLevelDB

Functions

Link copied to clipboard
open override fun batch(operations: List<LevelDBBatchOperation>, sync: Boolean)

Performs a batch operation on the LevelDB database.

Link copied to clipboard
inline fun LevelDB.batch(sync: Boolean = false, builder: LevelDBBatchBuilder.() -> Unit)

Performs a batch operation on the LevelDB database.

Link copied to clipboard
open fun close()
Link copied to clipboard
open override fun compactRange(start: String, end: String)

Compacts the range of keys between the specified start and end keys in the LevelDB database.

Link copied to clipboard
open override fun delete(key: String, sync: Boolean)

Deletes a key-value pair from the LevelDB database.

Link copied to clipboard
open override fun get(key: String, verifyChecksums: Boolean, fillCache: Boolean): String?

Retrieves the value associated with a given key in the LevelDB database.

Link copied to clipboard
open override fun put(key: String, value: String, sync: Boolean)

Inserts or updates a key-value pair in the LevelDB database.

Link copied to clipboard
open override fun scan(from: String?, verifyChecksums: Boolean, fillCache: Boolean): CloseableSequence<LevelDBReader.LazyEntry>

Creates an Iterable to traverse all key-value pairs in the LevelDB database. The sequence will start from the specified key, or from the first key if no key is specified. LevelDB sorts keys in lexicographic order.

Link copied to clipboard
inline fun <T> LevelDB.scan(from: String? = null, verifyChecksums: Boolean = false, fillCache: Boolean = true, action: (<Error class: unknown class><LevelDBReader.LazyEntry>) -> T): T

Creates an Iterable to traverse all key-value pairs in the LevelDB database. The sequence will start from the specified key, or from the first key if no key is specified. LevelDB sorts keys in lexicographic order.

Link copied to clipboard
open override 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.