struct

LMDB::Value

Inherits Struct / Value / Object

Constructors

new(size : UInt64, data : Pointer(UInt8))

Initialize self from a given size and a bytes pointer.

Source
new(ptr : Pointer(T)) forall T

Initialize a LMDB::Value from a given pointer. No extra memory allocated.

Source
new(slice : Slice(T) | Array(T) | StaticArray(T, _)) forall T

Initialize a LMDB::Value from a given slice or array. No extra memory allocated.

Source
new(str : String)

Initialize a LMDB::Value from a given string. No extra memory allocated.

Source
new(value : T) forall T

Initialize a LMDB::Value from a given value. Copies value contents to a new allocated pointer.

Source

Instance methods

==(other : self)
Source
as_array(of klass : T.class) : Array(T) forall T
Source
as_bool
Source
as_char
Source
as_f
Source
as_f32
Source
as_f64
Source
as_i
Source
as_i128
Source
as_i16
Source
as_i32
Source
as_i64
Source
as_i8
Source
as_slice(of klass : T.class) : Slice(T) forall T
Source
as_str
Source
as_u128
Source
as_u16
Source
as_u32
Source
as_u64
Source
as_u8
Source
as_value(of klass : Array(T).class) forall T
Source
as_value(of klass : Slice(T).class) forall T
Source
as_value(of klass : String.class)
Source
as_value(of klass : T.class) : T forall T
Source
clone

Returns a new self with a #cloned #data.

Source
cmp_data(other : self, txn : Transaction, db : Database)

Compare two Values according to a particular transaction and database. Assume both items are data items in the database. The given database db must be configured with the sorted duplicates option.

Returns 0 if the two objects are equal, a negative number if this object is considered less than other, or a positive number otherwise.

Source
cmp_key(other : self, txn : Transaction, db : Database)

Compare two Values according to a particular transaction and database. Assume both items are keys in the database.

Returns 0 if the two objects are equal, a negative number if this object is considered less than other, or a positive number otherwise.

Source
data
Source
size
Source
to_slice
Source
to_unsafe
Source

Macros

check_type!(type)
Source