LevelDB class abstract

Constructors

LevelDB.open({required Options options, required String filePath})
Open the database with the specified filePath.
factory
LevelDB.pointer({required Pointer<leveldb_t> pointer, required Options options})
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

approximateMemoryUsage() int
returns the approximate number of bytes of memory in use by the DB.
close() → void
Close leveldb, release any pointer
compact(RawData beginKey, RawData endKey) → void
Compact the underlying storage for the key range *begin,*end. In particular, deleted and overwritten versions are discarded, and the data is rearranged to reduce the cost of operations needed to access the data. This operation should typically only be invoked by users who understand the underlying implementation.
delete(RawData key, {bool ensured = false}) → void
Set the database entry for key to value.
get(RawData key, {bool verifyChecksums = false, bool fillCache = true, Snapshot? snapshot}) RawData
Returns the corresponding value for key
getSnapshot() → Snapshot
Return a handle to the current DB state. Iterators created with this handle will all observe a stable snapshot of the current DB state. The caller must call Snapshot.dispose when the snapshot is no longer needed.
iterator({bool verifyChecksums = false, bool fillCache = true, Snapshot snapshot}) DBIterator
Return an iterator over the contents of the database. Caller should dispose the iterator when it is no longer needed. The returned iterator should be disposed before this db is disposed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numFilesAtLevel(int level) int
Number of files at level
put(RawData key, RawData value, {bool ensured = false}) → void
Set the database entry for key to value.
sstables() String
returns a multi-line string that describes all of the sstables that make up the db contents.
stats() String
returns a multi-line string that describes statistics about the internal operation of the DB
toString() String
A string representation of this object.
inherited
write(BatchUpdates updates, {bool ensured = false}) → void
Apply the specified updates to the database.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

destroy(String filePath, Options options) → void
Destroy the contents of the specified database. Be very careful using this method.
repair(String filePath, Options options) → void
If a DB cannot be opened, you may attempt to call this method to resurrect as much of the contents of the database as possible. Some data may be lost, so be careful when calling this function on a database that contains important information.