class LMDB::MapDatabase(K, V)

Direct Known Subclasses

Defined in:

lmdb/database.cr

Constructors

Instance Method Summary

Instance methods inherited from class LMDB::Database

==(other : self) ==, [](key) [], []=(key, value) []=, []?(key) []?, clear clear, cursor(&)
cursor
cursor
, delete(key : String | Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) forall K
delete(key : K) forall K
delete
, do_close do_close, each(&)
each
each
, each_key(&) each_key, environment : Environment environment, flags : Flag flags, get(key : String | Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) : Value forall K
get(key : K) : Value forall K
get
, get?(key : String | Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) : Value | Nil forall K
get?(key : K) : Value | Nil forall K
get?
, put(key : String | Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _), value : String | Pointer(V) | Slice(V) | Array(V) | StaticArray(V, _), flags : PutFlags = PutFlags::None) forall K, V
put(key : String | Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _), val : V, flags : PutFlags = PutFlags::None) forall K, V
put(key : K, val : String | Pointer(V) | Slice(V) | Array(V) | StaticArray(V, _), flags : PutFlags = PutFlags::None) forall K, V
put(key : K, val : V, flags : PutFlags = PutFlags::None) forall K, V
put
, size size, stat stat, to_unsafe : UInt32 to_unsafe

Constructor methods inherited from class LMDB::Database

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

Instance methods inherited from module LMDB::Disposable

close close, closed? closed?

Constructor Detail

def self.new(environment : Environment, transaction : AbstractTransaction, flags : Flag = Flag::None) #

[View source]
def self.new(environment : Environment, name : String, transaction : AbstractTransaction, flags : Flag = Flag::None) #

[View source]

Instance Method Detail

def cursor(&) #
Description copied from class LMDB::Database

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.


[View source]
def cursor #
Description copied from class LMDB::Database

ditto


[View source]
def delete(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) #

[View source]
def delete(key : K) #

[View source]
def each #
Description copied from module Iterable({LMDB::Value, LMDB::Value})

Must return an Iterator over the elements in this collection.


[View source]
def ensure_flags(flags) #

[View source]
def get(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) : V #

[View source]
def get(key : K) : V #

[View source]
def get?(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _)) : V | Nil #

[View source]
def get?(key : K) : Value | Nil forall K #
Description copied from class LMDB::Database

ditto


[View source]
def put(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _), value : Pointer(V) | Slice(V) | Array(V) | StaticArray(V, _), flags : PutFlags = PutFlags::None) #

[View source]
def put(key : Pointer(K) | Slice(K) | Array(K) | StaticArray(K, _), val : V, flags : PutFlags = PutFlags::None) #

ditto


[View source]
def put(key : K, val : Pointer(V) | Slice(V) | Array(V) | StaticArray(V, _), flags : PutFlags = PutFlags::None) #

ditto


[View source]
def put(key : K, val : V, flags : PutFlags = PutFlags::None) #

ditto


[View source]