sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Lmdb.MapSourceKey-value maps.
type ('key, 'value, -'dup) t constraint 'perm = [< `Read | `Write ] constraint 'dup = [< `Dup | `Uni ]A handle for a map from keys of type 'key to values of type 'value. The map may support only a single value per key ([ `Dup ]) or multiple values per key ([ `Dup | `Uni ]).
val create :
([< `Dup | `Uni ] as 'dup) card ->
key:'key Conv.t ->
value:'value Conv.t ->
?txn:[> `Read | `Write ] Txn.t ->
?name:string ->
Env.t ->
('key, 'value, 'dup) tcreate dup ~key ~value env open (and possibly create) a map in the environment env.
dup may be Dup or Nodup, specifying whether the map supports multiple values per key.
Only a single transaction may call this function at a time. This transaction needs to finish before any other transaction may call this function.
val open_existing :
([< `Dup | `Uni ] as 'dup) card ->
key:'key Conv.t ->
value:'value Conv.t ->
?txn:[> `Read ] Txn.t ->
?name:string ->
Env.t ->
('key, 'value, 'dup) topen_existing env is like create, but only opens already existing maps.
get map key returns the first value associated to key.
val add :
('key, 'value, _) t ->
?txn:[> `Write ] Txn.t ->
?flags:Flags.t ->
'key ->
'value ->
unitadd map key value adds value to key.
For a map not supporting duplicates an existing value is overwritten. For a map supporting duplicates the value is added to the key. This is the same as overwrite for duplicate maps, but overwrite ~flags:Flags.no_overwrite for non-duplicate maps.
val set :
('key, 'value, _) t ->
?txn:[> `Write ] Txn.t ->
?flags:Flags.t ->
'key ->
'value ->
unitset map key value sets binding of key to value.
Values of an already existing key are silently overwritten.
remove map key removes key from map.
drop ?delete map Empties map.
compare_key map ?txn a b Compares a and b as if they were keys in map.
compare map ?txn a b Same as compare_key.