aboutsummaryrefslogtreecommitdiffstats
path: root/lib/schema.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/schema.ml')
-rw-r--r--lib/schema.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/schema.ml b/lib/schema.ml
index 81632b4..b041803 100644
--- a/lib/schema.ml
+++ b/lib/schema.ml
@@ -31,6 +31,7 @@ module Protocol = struct
| None -> Error "Failed to parse relation"
end
+(*
let test_schema_write_and_retrieve() =
let open Disk in
let open Data_encoding in
@@ -43,13 +44,14 @@ let test_schema_write_and_retrieve() =
@@ Binary.to_bytes Protocol.relation_encoding relation
in
let command_write: Command.t =
- {kind = Command.WRITE; timestamp = 10.0; hash = ""; content = Bytes.to_string user_relation; filename = "user"; references = []} in
- let+ ((stream, locations), Command.ComputedHash handle) = Command.commit_and_perform stream locations command_write in
+ {kind = Command.WRITE; timestamp = 10.0; hash = ""; content = Bytes.to_string user_relation; filename = "user"} in
+ let+ ((stream, locations), Command.ComputedHash handle) = Command.commit_and_perform stream locations Executor.StringMap.empty command_write in
let command_read: Command.t =
- {kind = Command.READ; timestamp = 10.0; hash = handle; content = ""; filename = "schema~user"; references = []} in
- let+ ((stream, locations), Command.Read content) = Command.commit_and_perform stream locations command_read in
+ {kind = Command.READ; timestamp = 10.0; hash = handle; content = ""; filename = "schema~user"} in
+ let+ ((stream, locations), Command.Read content) = Command.commit_and_perform stream locations Executor.StringMap.empty command_read in
let+ user_relation =
Result.map_error (fun _ -> "Failed to deserialize relation from binary format.")
@@ Binary.of_bytes Protocol.relation_encoding (Bytes.concat Bytes.empty content) in
Ok (stream, locations, user_relation)
[@@warning "-8"] (* Suppress pattern match incomplete warnings *)
+*) \ No newline at end of file