Module Lmdb.Env
Collection of maps stored in a single memory-mapped file.
module Flags = Mdb.EnvFlags
val create : _ perm -> ?max_readers:int -> ?map_size:int -> ?max_maps:int -> ?flags:Flags.t -> ?mode:int -> string -> t
create perm path
creates an environment withRo
orRw
permissions with data and lock files in the already existing directorypath
. If no separate directory is desired,Flags.no_subdir
can be passed.The returned handle is not garbage collected and should be closed explicitely to free locks and prevent corruption on async environments.
- parameter map_size
Size of the memory map. Limited by the virtual address space.
- parameter max_readers
Maximum number of threads/reader slots.
- parameter max_maps
Maximum number of named maps.
- parameter mode
The UNIX permissions to set on created files and semaphores. Default is
0o644
.
val sync : ?force:bool -> t -> unit
val close : t -> unit
val copy : ?compact:bool -> t -> string -> unit
val copyfd : ?compact:bool -> t -> Unix.file_descr -> unit
val set_flags : t -> Flags.t -> bool -> unit
val flags : t -> Flags.t
val set_map_size : t -> int -> unit
val path : t -> string
val fd : t -> Unix.file_descr
val stat : t -> Mdb.stat
val info : t -> Mdb.envinfo
val max_readers : t -> int
val max_keysize : t -> int
val reader_list : t -> string list
val reader_check : t -> int