class

LMDB::MapDatabase(K, V)

Inherits LMDB::Database / Iterable / Enumerable / LMDB::Disposable / Reference / Object

Constructors

new(environment : Environment, transaction : AbstractTransaction, flags : Flag = Flag::None)
Source
new(environment : Environment, name : String, transaction : AbstractTransaction, flags : Flag = Flag::None)
Source

Instance 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.

Source
cursor

ditto

Source
delete(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _))
Source
delete(key : K)
Source
each

Must return an Iterator over the elements in this collection.

Source
ensure_flags(flags)
Source
get(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) : V
Source
get(key : K) : V
Source
get?(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) : V | Nil
Source
get?(key : K) : Value | Nil forall K

ditto

Source
put(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _), value : Pointer(V) | Slice(V) | Array(V) | StaticArray(V, _), flags : PutFlags = PutFlags::None)
Source
put(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _), val : V, flags : PutFlags = PutFlags::None)

ditto

Source
put(key : K, val : Pointer(V) | Slice(V) | Array(V) | StaticArray(V, _), flags : PutFlags = PutFlags::None)

ditto

Source
put(key : K, val : V, flags : PutFlags = PutFlags::None)

ditto

Source