LevelDBReader

interface LevelDBReader

Interface for reading from a LevelDB database. Provides methods for getting values and iterating over key-value pairs.

Inheritors

Types

Link copied to clipboard
@Serializable
data class Entry(val key: String, val value: String)

Represents a key-value pair in a LevelDB database. The key and value are both eagerly initialized and read from the database when the pair is created.

Link copied to clipboard
@Serializable
data class LazyEntry(val key: <Error class: unknown class><String>, val value: <Error class: unknown class><String>)

Represents a key-value pair in a LevelDB database. The key and value are both lazy-initialized and read from the database only when accessed for the first time.

Functions

Link copied to clipboard
abstract fun get(key: String, verifyChecksums: Boolean = false, fillCache: Boolean = true): String?

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

Link copied to clipboard
abstract fun scan(from: String? = null, verifyChecksums: Boolean = false, fillCache: Boolean = true): 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.