module LMDB

Defined in:

lmdb.cr
lmdb/cursor.cr
lmdb/database.cr
lmdb/environment.cr
lmdb/error.cr
lmdb/transaction.cr
lmdb/types.cr

Constant Summary

TYPES = [Bool, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Float32, Float64, Char]

Supported types

VERSION = "0.1.0"

Class Method Summary

Macro Summary

Class Method Detail

def self.check(code) #

[View source]
def self.library_version : Tuple(Int32, Int32, Int32) #

Returns a tuple of integers describing the LMBD library version that the binding is linked against. The version of the binding itself is available from the VERSION constant.


[View source]
def self.open(path : String, flags : Environment::Flag = env_flags(NoTls), mode = FileMode.new(420), max_dbs : Int = 0, map_size : Int = 0, &) #

Open and yields an LMDB database Environment. The environment is closed when the block goes out of scope.

Example:

LMDB.open("mydbdir") do |env|
  # ...
end

See Environment#new.


[View source]

Macro Detail

macro db_flags(*values) #

Same as doing LMDB::Database::Flag.flag(*values)


[View source]
macro env_flags(*values) #

Same as doing LMDB::Environment::Flag.flag(*values)


[View source]