aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-04-27 23:29:57 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-04-27 23:29:57 -0300
commit4fdf3392868c72ff4c33b70d165a177e97f2fece (patch)
tree4eebfc260c890ea56d59f874cdfa0c9b1f55cd98 /lib/dml
parent97960adb8426e5270fe16b027e82a2c61674f821 (diff)
downloadSakura-4fdf3392868c72ff4c33b70d165a177e97f2fece.tar.gz
Sakura-4fdf3392868c72ff4c33b70d165a177e97f2fece.zip
Format
Diffstat (limited to '')
-rw-r--r--lib/dml/executor.ml16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/dml/executor.ml b/lib/dml/executor.ml
index e92b0f5..a4b4e21 100644
--- a/lib/dml/executor.ml
+++ b/lib/dml/executor.ml
@@ -12,11 +12,13 @@ module Make (Storage : Management.Physical.S) = struct
let sexp_of_error e =
let open Sexplib.Sexp in
match e with
- | ParseError s -> List [Atom "parse-error"; Atom s]
- | ManipulationError e -> Error.sexp_of_error e
- | RelationNotFound s -> List [Atom "relation-not-found"; Atom s]
- | AlgebraError (Algebra.StorageError s) -> List [Atom "storage-error"; Atom s]
- | AlgebraError (Algebra.GeneratorError s) -> List [Atom "generator-error"; Atom s]
+ | ParseError s -> List [ Atom "parse-error"; Atom s ]
+ | ManipulationError e -> Error.sexp_of_error e
+ | RelationNotFound s -> List [ Atom "relation-not-found"; Atom s ]
+ | AlgebraError (Algebra.StorageError s) ->
+ List [ Atom "storage-error"; Atom s ]
+ | AlgebraError (Algebra.GeneratorError s) ->
+ List [ Atom "generator-error"; Atom s ]
let ( let* ) = Result.bind
let wrap_manip r = Result.map_error (fun e -> ManipulationError e) r
@@ -122,7 +124,9 @@ module Make (Storage : Management.Physical.S) = struct
(fun acc t ->
let* db = acc in
let* rel = get_rel db target in
- let tuple_hash = Hashing.hash_tuple (retarget rel.Relation.name t) in
+ let tuple_hash =
+ Hashing.hash_tuple (retarget rel.Relation.name t)
+ in
let* db, _ =
Ops.retract_tuple storage db rel ~tuple_hash |> wrap_manip
in