aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-09-20 03:00:57 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-09-20 03:00:57 -0300
commit3184f85de1dac7071afcf9838dfc3f8609b20a5a (patch)
tree27dadf6e541dd1dceb1ae32ceacd23205f667eed /lib/protocols
parent2c7ff1f0f7d9c71a8f866bfc9e75c1ad6a5feaa3 (diff)
downloadRNT-3184f85de1dac7071afcf9838dfc3f8609b20a5a.tar.gz
RNT-3184f85de1dac7071afcf9838dfc3f8609b20a5a.zip
provenance
Diffstat (limited to 'lib/protocols')
-rw-r--r--lib/protocols/Schematics.ml4
-rw-r--r--lib/protocols/Schematics.mli12
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/protocols/Schematics.ml b/lib/protocols/Schematics.ml
index d2e50ad..49d8586 100644
--- a/lib/protocols/Schematics.ml
+++ b/lib/protocols/Schematics.ml
@@ -1,5 +1,7 @@
type multigroup_description = string BatMap.String.t
-type relation_description = string BatMap.String.t
+type origin = {source: string list; attribute: string}
+type attribute_description = {domain: string; provenance: origin list}
+type relation_description = attribute_description BatMap.String.t
type tuple_description = {relation: relation_description; attributes: string BatMap.String.t}
(* TODO: For now the description is completely detached from actual
diff --git a/lib/protocols/Schematics.mli b/lib/protocols/Schematics.mli
index dc8f320..fe81943 100644
--- a/lib/protocols/Schematics.mli
+++ b/lib/protocols/Schematics.mli
@@ -4,7 +4,17 @@ type t
types and domains. Later figure out a way to represent the links
without strings. *)
type multigroup_description = string BatMap.String.t
-type relation_description = string BatMap.String.t
+
+(** where an attribute comes from with the path relation and the
+ attribute it has. *)
+type origin = {source: string list; attribute: string}
+
+(** an attribute of a derived relation may be for several occurrences
+ at once, for example in a natural join. So its provenance is a
+ collection. *)
+type attribute_description = {domain: string; provenance: origin list}
+
+type relation_description = attribute_description BatMap.String.t
type tuple_description = {relation: relation_description; attributes: string BatMap.String.t}
type description =