diff options
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 |
