aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tuple.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-03-09 21:48:51 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-03-09 21:48:51 -0300
commitc642042536362bba0d3ee0ebf6a6c33a888a0ff5 (patch)
treee2684a2758190ab67483156876e35824fc76e708 /lib/tuple.ml
parentcce3bfba31b32c13ea116a214306d96fe1eb27eb (diff)
downloadSakura-c642042536362bba0d3ee0ebf6a6c33a888a0ff5.tar.gz
Sakura-c642042536362bba0d3ee0ebf6a6c33a888a0ff5.zip
defenestrate json
Diffstat (limited to '')
-rw-r--r--lib/tuple.ml17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/tuple.ml b/lib/tuple.ml
index 3c11fba..11fc508 100644
--- a/lib/tuple.ml
+++ b/lib/tuple.ml
@@ -1,18 +1,25 @@
-module AttributeMap = Map.Make(String)
+module AttributeMap = struct
+ include Map.Make(String)
+ let sexp_of_t sexp_of_v m =
+ Sexplib.Sexp.List
+ (List.map (fun (k, v) -> Sexplib.Sexp.List [Sexplib.Sexp.Atom k; sexp_of_v v])
+ (bindings m))
+end
type non_materialized = {
hash : Conventions.Hash.t;
relation : Conventions.Name.t;
attributes : Attribute.referenced AttributeMap.t;
-}
+} [@@deriving sexp_of]
type materialized = {
relation: Conventions.Name.t;
- attributes: Attribute.materialized AttributeMap.t
-}
+ attributes: Attribute.materialized AttributeMap.t;
+} [@@deriving sexp_of]
-type t =
+type t =
| Materialized of materialized
| NonMaterialized of non_materialized
+[@@deriving sexp_of]
let make_materialized ~relation ~attributes = Materialized { relation; attributes }