diff options
Diffstat (limited to 'lib/dml')
| -rw-r--r-- | lib/dml/executor.ml | 16 |
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 |
