diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2025-07-03 19:43:29 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2025-07-03 19:43:29 -0300 |
| commit | 481063c322ecc729bc9d3c5d2bca830f70ce8022 (patch) | |
| tree | 948d88af8345a3a493bffff796c5b212f29acd85 /lib/server.ml | |
| parent | ab7ce52387d0de7160f1fac71f61c76ab1b150f7 (diff) | |
| download | Sakura-481063c322ecc729bc9d3c5d2bca830f70ce8022.tar.gz Sakura-481063c322ecc729bc9d3c5d2bca830f70ce8022.zip | |
schema propagation commandocaml_archive
Diffstat (limited to 'lib/server.ml')
| -rw-r--r-- | lib/server.ml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/server.ml b/lib/server.ml index d06f8e8..ea1a79a 100644 --- a/lib/server.ml +++ b/lib/server.ml @@ -31,9 +31,15 @@ let client_read sock maxlen = let command = Protocol.command_of_sexp (Sexplib.Sexp.of_string x) in (* let command = Protocol.command_of_xml_light_exn (Protocol_conv_xml.Xml_light.of_string x) in *) let Ok (commit, locations) = Relation.prepare () in - let Ok (_, (Disk.Command.Read response)) = - Planner.Executor.perform commit locations command - in return @@ Sexplib.Sexp.to_string (Protocol.sexp_of_facts response) + (* let Ok (_, (Disk.Command.Read response)) = *) + (* Planner.Executor.perform commit locations command *) + (* Ok (_, (Disk.Command.Read response)) = *) + match Planner.Executor.perform commit locations command with + | Ok (_, Disk.Command.Read response) -> + return @@ Sexplib.Sexp.to_string (Protocol.sexp_of_facts response) + | Ok (_, Disk.Command.Schema response) -> + return @@ Sexplib.Sexp.to_string (Protocol.sexp_of_schema response) + | _ -> failwith "Case not supported" (* in return @@ Xml.to_string (Protocol.facts_to_xml_light response) *) (* match *) (* Relation.write_and_retrieve () *) |
