File tree 2 files changed +13
-0
lines changed 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,17 @@ module Make (Io : IO) = struct
369
369
let stop = Key_selector. first_greater_or_equal (Tuple. strinc prefix.Key_selector. key) in
370
370
get_range ?limit ?target_bytes ?snapshot ?reverse ?mode t ~start ~stop
371
371
372
+ let get_read_version t =
373
+ Fdb_ffi. transaction_get_read_version t
374
+ |> Future. to_io
375
+ >> =? fun future ->
376
+ let value_ptr = allocate int64_t 0L in
377
+ let err = Fdb_ffi. future_get_version future value_ptr in
378
+ if err = 0 then
379
+ return (Ok ! @ value_ptr)
380
+ else
381
+ return (Error err)
382
+
372
383
let set_bigstring t ~key ~value =
373
384
let length = Bigarray.Array1. dim value in
374
385
let char_ptr = bigarray_start array1 value in
Original file line number Diff line number Diff line change @@ -208,6 +208,8 @@ module Make (Io : IO) : sig
208
208
-> prefix :Key_selector .t
209
209
-> Range_result .t or_error io
210
210
211
+ val get_read_version : t -> int64 or_error io
212
+
211
213
val clear : t -> key :string -> unit
212
214
213
215
val clear_range : t -> start :string -> stop :string -> unit
You can’t perform that action at this time.
0 commit comments