package tezos-lmdb

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type error =
  1. | NoSuchFileOrDir
  2. | IOError
  3. | EnvironmentLocked
  4. | OutOfMemory
  5. | PermissionDenied
  6. | InvalidArgument
  7. | NoSpaceLeftOnDevice
  8. | KeyExist
  9. | KeyNotFound
  10. | PageNotFound
  11. | Corrupted
  12. | Panic
  13. | VersionMismatch
  14. | InvalidFile
  15. | MapFull
  16. | DbsFull
  17. | ReadersFull
  18. | TLSFull
  19. | TxnFull
  20. | CursorFull
  21. | PageFull
  22. | MapResized
  23. | Incompatible
  24. | BadRslot
  25. | BadTxn
  26. | BadValSize
  27. | BadDbi
  28. | TxnProblem
val string_of_error : error -> string
val pp_error : Stdlib.Format.formatter -> error -> unit
val to_msg : ('a, error) Rresult.result -> ('a, [> Rresult.R.msg ]) Rresult.result
type version = {
  1. major : int;
  2. minor : int;
  3. patch : int;
}
val version : unit -> version
type ro
type rw
type t
type flag_env =
  1. | FixedMap
  2. | NoSubdir
  3. | NoSync
  4. | RdOnly
  5. | NoMetaSync
  6. | WriteMap
  7. | MapAsync
  8. | NoTLS
  9. | NoLock
  10. | NoRdAhead
  11. | NoMemInit
  12. | PrevMeta
val opendir : ?maxreaders:int -> ?maxdbs:int -> ?mapsize:int64 -> ?flags:flag_env list -> string -> Unix.file_perm -> (t, error) Rresult.result
val closedir : t -> unit
val copy : ?compact:bool -> t -> string -> (unit, error) Rresult.result
val copyfd : ?compact:bool -> t -> Unix.file_descr -> (unit, error) Rresult.result
type stat = {
  1. psize : int;
  2. depth : int;
  3. branch_pages : int;
  4. leaf_pages : int;
  5. overflow_pages : int;
  6. entries : int;
}
val stat : t -> stat
type envinfo = {
  1. mapsize : int;
  2. last_pgno : int;
  3. last_txnid : int;
  4. maxreaders : int;
  5. numreaders : int;
}
val envinfo : t -> envinfo
val sync : ?force:bool -> t -> (unit, error) Rresult.result
val get_flags : t -> flag_env list
val set_flags : t -> flag_env list -> (unit, error) Rresult.result
val clear_flags : t -> flag_env list -> (unit, error) Rresult.result
val get_path : t -> string
val get_fd : t -> Unix.file_descr
val get_maxreaders : t -> int
val get_maxkeysize : t -> int
val set_mapsize : t -> int64 -> (unit, error) Rresult.result
type _ txn
val create_rw_txn : ?nosync:bool -> ?nometasync:bool -> ?parent:rw txn -> t -> (rw txn, error) Rresult.result
val create_ro_txn : ?nosync:bool -> ?nometasync:bool -> ?parent:_ txn -> t -> (ro txn, error) Rresult.result
val get_txn_id : _ txn -> int
val get_txn_env : _ txn -> t
val commit_txn : _ txn -> (unit, error) Rresult.result
val abort_txn : _ txn -> unit
val reset_ro_txn : ro txn -> unit
val renew_ro_txn : ro txn -> (unit, error) Rresult.result
type flag_open =
  1. | ReverseKey
  2. | DupSort
  3. | IntegerKey
  4. | DupFixed
  5. | IntegerDup
  6. | ReverseDup
  7. | Create
type db
val opendb : ?flags:flag_open list -> ?name:string -> _ txn -> (db, error) Rresult.result
val db_stat : _ txn -> db -> (stat, error) Rresult.result
val db_flags : _ txn -> db -> (flag_open list, error) Rresult.result
val db_drop : _ txn -> db -> (unit, error) Rresult.result
val with_ro_db : ?nosync:bool -> ?nometasync:bool -> ?parent:_ txn -> ?flags:flag_open list -> ?name:string -> t -> f:(ro txn -> db -> ('a, error) Rresult.result) -> ('a, error) Rresult.result
val with_rw_db : ?nosync:bool -> ?nometasync:bool -> ?parent:rw txn -> ?flags:flag_open list -> ?name:string -> t -> f:(rw txn -> db -> ('a, error) Rresult.result) -> ('a, error) Rresult.result
type buffer = (char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t
val get : _ txn -> db -> string -> (buffer, error) Rresult.result
val mem : _ txn -> db -> string -> (bool, error) Rresult.result
type flag_put =
  1. | NoOverwrite
  2. | NoDupData
  3. | Current
  4. | Reserve
  5. | Append
  6. | AppendDup
  7. | Multiple
val put : ?flags:flag_put list -> rw txn -> db -> string -> buffer -> (unit, error) Rresult.result
val put_string : ?flags:flag_put list -> rw txn -> db -> string -> string -> (unit, error) Rresult.result
val del : ?data:buffer -> rw txn -> db -> string -> (unit, error) Rresult.result
val del_string : ?data:string -> rw txn -> db -> string -> (unit, error) Rresult.result
type _ cursor
val opencursor : 'a txn -> db -> ('a cursor, error) Rresult.result
val cursor_close : _ cursor -> unit
val cursor_renew : ro txn -> ro cursor -> (unit, error) Rresult.result
val cursor_txn : 'a cursor -> 'a txn
val cursor_db : _ cursor -> db
val cursor_first : _ cursor -> (unit, error) Rresult.result
val cursor_last : _ cursor -> (unit, error) Rresult.result
val cursor_prev : _ cursor -> (unit, error) Rresult.result
val cursor_next : _ cursor -> (unit, error) Rresult.result
val cursor_at : _ cursor -> string -> (unit, error) Rresult.result
val cursor_get : _ cursor -> (buffer * buffer, error) Rresult.result
val cursor_fold_left : f:('a -> (buffer * buffer) -> ('a, error) Rresult.result) -> init:'a -> _ cursor -> ('a, error) Rresult.result
val cursor_iter : f:((buffer * buffer) -> (unit, error) Rresult.result) -> _ cursor -> (unit, error) Rresult.result
val with_cursor : 'a txn -> db -> f:('a cursor -> ('b, error) Rresult.result) -> ('b, error) Rresult.result
type cursor_op =
  1. | First
  2. | First_dup
  3. | Get_both
  4. | Get_both_range
  5. | Get_current
  6. | Get_multiple
  7. | Last
  8. | Last_dup
  9. | Next
  10. | Next_dup
  11. | Next_multiple
  12. | Next_nodup
  13. | Prev
  14. | Prev_dup
  15. | Prev_nodup
  16. | Set
  17. | Set_key
  18. | Set_range
  19. | Prev_multiple
val cursor_put : ?flags:flag_put list -> rw cursor -> string -> buffer -> (unit, error) Rresult.result
val cursor_put_string : ?flags:flag_put list -> rw cursor -> string -> string -> (unit, error) Rresult.result
val cursor_del : ?flags:flag_put list -> rw cursor -> (unit, error) Rresult.result
val cursor_count : _ cursor -> (int, error) Rresult.result
OCaml

Innovation. Community. Security.