module LMDB
Defined in:
lmdb.crlmdb/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
- .check(code)
-
.library_version : Tuple(Int32, Int32, Int32)
Returns a tuple of integers describing the LMBD library version that the binding is linked against.
-
.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
.
Macro Summary
-
db_flags(*values)
Same as doing LMDB::Database::Flag.flag(*values)
-
env_flags(*values)
Same as doing LMDB::Environment::Flag.flag(*values)
Class Method Detail
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.
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
.