aboutsummaryrefslogtreecommitdiffstats
path: root/lib/relation.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2025-05-02 20:39:28 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2025-05-02 20:39:28 -0300
commit916503f64678272331a05d1a8218820d9d3bfa60 (patch)
treecc3d8aa136516391fd50a9fa0ed6580b6946b1c7 /lib/relation.ml
parent79e7dfb46d166ba8906cde9b418b62b7ec3453e2 (diff)
downloadSakura-916503f64678272331a05d1a8218820d9d3bfa60.tar.gz
Sakura-916503f64678272331a05d1a8218820d9d3bfa60.zip
type reconstruction
Diffstat (limited to 'lib/relation.ml')
-rw-r--r--lib/relation.ml9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/relation.ml b/lib/relation.ml
index 83f1c6a..02dcc44 100644
--- a/lib/relation.ml
+++ b/lib/relation.ml
@@ -1,11 +1,11 @@
-let print_references references =
+let print_references (references: (string * Disk.Executor.relational_type) list Disk.Executor.IntMap.t Disk.Executor.StringMap.t) =
Disk.Executor.StringMap.iter
(fun k v ->
print_endline ("→ " ^ k ^ ": ");
Disk.Executor.IntMap.iter
(fun k v ->
print_endline (" ↳ " ^ Int64.to_string k);
- List.iter (fun v -> print_endline (" → " ^ v)) v)
+ List.iter (fun (v, type') -> print_endline (" → " ^ v ^ "[" ^ Disk.Executor.show_relational_type type' ^ "]")) v)
v;
print_newline ())
references
@@ -49,6 +49,7 @@ let write_and_retrieve () =
content = "Daisy";
entity_id = Some 0L;
filename = "user/first-name";
+ type' = Executor.Text;
}
in
let+ (commit, locations), Command.ComputedHash handle11 =
@@ -62,6 +63,7 @@ let write_and_retrieve () =
content = "Blossom";
entity_id = Some 0L;
filename = "user/last-name";
+ type' = Executor.Text;
}
in
let+ (commit, locations), Command.ComputedHash handle12 =
@@ -75,6 +77,7 @@ let write_and_retrieve () =
content = "Saint James St.";
entity_id = Some 0L;
filename = "address/street";
+ type' = Executor.Text;
}
in
let+ (commit, locations), Command.ComputedHash handle12 =
@@ -88,6 +91,7 @@ let write_and_retrieve () =
content = "41";
entity_id = Some 0L;
filename = "address/number";
+ type' = Executor.Text;
}
in
let+ (commit, locations), Command.ComputedHash handle12 =
@@ -101,6 +105,7 @@ let write_and_retrieve () =
content = "0";
entity_id = Some 0L;
filename = "user/address";
+ type' = Executor.Relation "address";
}
in
let+ (commit, locations), Command.ComputedHash handle12 =