package camltc

  1. Overview
  2. Docs
type bdb
type bdbcur
val default_mode : int
val readonly_mode : int
type opt =
  1. | BDBTLARGE
val put : bdb -> string -> string -> unit
val get : bdb -> string -> string
val get3 : bdb -> string -> string
val oreader : int
val owriter : int
val ocreat : int
val otrunc : int
val onolck : int
val olcknb : int
val otsync : int
val create : ?mode:int -> ?lcnum:int -> ?ncnum:int -> string -> opt list -> bdb

create a bdb for standalone use

val close : bdb -> unit

close given bdb

val delete : bdb -> unit

delete given bdb (must have been closed before)

val sync : bdb -> unit

sync the given bdb

val get_cursor : bdb -> bdbcur

create a cursor for the given bdb

val get3_generic : bdb -> string -> int -> int -> string

get3_generic bdb s off len considers the substring of s as the key for a get3

val get_nolock : bdb -> string -> string
val out : bdb -> string -> unit
val range : bdb -> string option -> bool -> string option -> bool -> int -> string array
val exists : bdb -> string -> bool
val delete_prefix : bdb -> string -> int
val prefix_keys : bdb -> string -> int -> string array
type include_key = bool
type upper_border =
  1. | BKey of string * include_key
  2. | BOmega
val range_ascending : bdb -> string -> bool -> upper_border -> ((string * string) -> 'a -> 'a * bool) -> 'a -> 'a
val range_descending : bdb -> upper_border -> string -> bool -> ((string * string) -> 'a -> 'a * bool) -> 'a -> 'a
val range_entries : string -> bdb -> string option -> bool -> string option -> bool -> int -> (string * string) array
val rev_range_entries : string -> bdb -> string option -> bool -> string option -> bool -> int -> (string * string) list
val get_key_count : bdb -> int64
val first : bdb -> bdbcur -> unit
val jump : bdb -> bdbcur -> string -> unit
val next : bdb -> bdbcur -> unit
val prev : bdb -> bdbcur -> unit
val last : bdb -> bdbcur -> unit
val cur_out : bdb -> bdbcur -> unit

cur_out b c deletes the current key value pair and jumps to next

val key : bdb -> bdbcur -> string
val value : bdb -> bdbcur -> string
val key3 : bdb -> bdbcur -> string
val value3 : bdb -> bdbcur -> string
val with_cursor : bdb -> (bdb -> bdbcur -> 'a) -> 'a
val _tranbegin : bdb -> unit
val _trancommit : bdb -> unit
val _tranabort : bdb -> unit
type flag =
  1. | BDBFOPEN
  2. | BDBFFATAL
val flags : bdb -> flag list
val defrag : ?step:int64 -> bdb -> int
val copy_from_cursor : source:bdb -> cursor:bdbcur -> target:bdb -> max:int option -> int
OCaml

Innovation. Community. Security.