diff options
Diffstat (limited to '')
| -rw-r--r-- | lib/scl/sublanguage.ml | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/scl/sublanguage.ml b/lib/scl/sublanguage.ml index 722ba08..87e4d42 100644 --- a/lib/scl/sublanguage.ml +++ b/lib/scl/sublanguage.ml @@ -1,8 +1,7 @@ -module Make (Storage : Management.Physical.S) = struct - module Exec = Executor.Make (Storage) +module Make (NT : Nt.S) = struct + module Exec = Executor.Make (NT) type configuration = unit - type storage = Storage.t type ast = Ast.statement type error = Exec.error @@ -14,14 +13,12 @@ module Make (Storage : Management.Physical.S) = struct | Ok r -> Ok r | Error (Parser.ParseError s) -> Error (Exec.ParseError s) - let execute storage db ast = - Exec.execute storage db ast + let execute ctx ast = + Exec.execute ctx ast |> Result.map (function - | Executor.Batch { cursor_id; rows; has_more } -> - Sublanguage_types.Cursor { cursor_id; rows; has_more } - | Executor.Closed db -> Sublanguage_types.Transition db) + | Executor.Batch { cursor_id; rows; has_more } -> + Sublanguage_types.Cursor { cursor_id; rows; has_more } + | Executor.Closed delta -> Sublanguage_types.Transition delta) let sexp_of_error = Exec.sexp_of_error end - -module Memory = Make (Management.Physical.Memory) |
