diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2025-06-29 01:33:13 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2025-06-29 01:33:13 -0300 |
| commit | 998cf183c45e604430b4a80425bd2332fb30cfe1 (patch) | |
| tree | caa8ffbd2cd14867dbb0b0e875822520b5d202a0 /lib/server.ml | |
| parent | 592cc506c055996e99ace34fa4a0767f5ada63b7 (diff) | |
| download | Sakura-998cf183c45e604430b4a80425bd2332fb30cfe1.tar.gz Sakura-998cf183c45e604430b4a80425bd2332fb30cfe1.zip | |
base serialization and command reorganization
Diffstat (limited to 'lib/server.ml')
| -rw-r--r-- | lib/server.ml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/server.ml b/lib/server.ml index 4a99b29..4af94fb 100644 --- a/lib/server.ml +++ b/lib/server.ml @@ -25,9 +25,16 @@ let client_read sock maxlen = let acc = acc ^ Bytes.to_string (Bytes.sub str 0 recvlen) in if recvlen <= maxlen then Lwt.return acc else _read sock acc in - _read sock String.empty >>= fun _ -> - match Relation.write_and_retrieve () with - | Ok (last_commit, locations) -> + _read sock String.empty >>= fun x -> + print_string "RECEIVED: "; + print_endline x; + let command = Protocol.command_of_sexp (Sexplib0.Sexp_conv.sexp_of_string x) in + match + (* Relation.write_and_retrieve () *) + command + with + | Disk.Command.SequentialRead {relation} + (* | Ok (last_commit, locations) -> *) (* let (first_names, last_names) = (Planner.Scan.execute last_commit locations "user/first-name", Planner.Scan.execute last_commit locations "user/last-name") in *) (* let tuples = Planner.Join.execute first_names last_names locations in *) let fname, lname = List.split [] in |
