LMDB::MapDatabase(K, V)
Inherits LMDB::Database / Iterable / Enumerable / LMDB::Disposable / Reference / Object
Constructors
new(environment : Environment, transaction : AbstractTransaction, flags : Flag = Flag::None)
Sourcenew(environment : Environment, name : String, transaction : AbstractTransaction, flags : Flag = Flag::None)
SourceInstance methods
cursor
Create and yields a AbstractCursor to iterate through self, closed when the
block goes out of scope.
The created cursor is associated with the current transaction and self.
It cannot be used after the database is closed, nor when the transaction
has ended. A cursor in a Transaction can be closed before its
transaction ends, and will otherwise be closed when its transaction ends.
A cursor in a ReadOnlyTransaction must be closed explicitly, before or
after its transaction ends. It can be reused with Cursor#renew before
finally closing it.
delete(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _))
Sourcedelete(key : K)
Sourceensure_flags(flags)
Sourceget(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) : V
Sourceget(key : K) : V
Sourceget?(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) : V | Nil
Sourceput(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _), value : Pointer(V) | Slice(V) | Array(V) | StaticArray(V, _), flags : PutFlags = PutFlags::None)
Sourceput(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _), val : V, flags : PutFlags = PutFlags::None)
ditto
put(key : K, val : Pointer(V) | Slice(V) | Array(V) | StaticArray(V, _), flags : PutFlags = PutFlags::None)
ditto