package lmdb

  1. Overview
  2. Docs

Module Lmdb.EnvSource

Collection of maps stored in a single memory-mapped file.

Sourcetype t
Sourcemodule Flags = Mdb.EnvFlags
Sourceval create : _ perm -> ?max_readers:int -> ?map_size:int -> ?max_maps:int -> ?flags:Flags.t -> ?mode:int -> string -> t

create perm path creates an environment with Ro or Rw permissions with data and lock files in the already existing directory path. 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.

Sourceval sync : ?force:bool -> t -> unit
Sourceval close : t -> unit
Sourceval copy : ?compact:bool -> t -> string -> unit
Sourceval copyfd : ?compact:bool -> t -> Unix.file_descr -> unit
Sourceval set_flags : t -> Flags.t -> bool -> unit
Sourceval flags : t -> Flags.t
Sourceval set_map_size : t -> int -> unit
Sourceval path : t -> string
Sourceval fd : t -> Unix.file_descr
Sourceval stat : t -> Mdb.stat
Sourceval info : t -> Mdb.envinfo
Sourceval max_readers : t -> int
Sourceval max_keysize : t -> int
Sourceval reader_list : t -> string list
Sourceval reader_check : t -> int
OCaml

Innovation. Community. Security.