diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-03-07 20:47:16 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-03-07 20:47:16 -0300 |
| commit | 54015bfbe98cfd850e1a6c142d8f514a9f48ddd9 (patch) | |
| tree | af7b4f44e39a1057ea3a69e638f87f6727f47f01 /lib/drl/ast.ml | |
| parent | cde2893e3edf916c03c834eef7af9023258a34fb (diff) | |
| download | Sakura-54015bfbe98cfd850e1a6c142d8f514a9f48ddd9.tar.gz Sakura-54015bfbe98cfd850e1a6c142d8f514a9f48ddd9.zip | |
wip: drl executor
Diffstat (limited to 'lib/drl/ast.ml')
| -rw-r--r-- | lib/drl/ast.ml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/drl/ast.ml b/lib/drl/ast.ml new file mode 100644 index 0000000..f94965d --- /dev/null +++ b/lib/drl/ast.ml @@ -0,0 +1,25 @@ +open Sexplib.Std + +(** Literal values for Const nodes *) +type value = + | Int of int + | Float of float + | Str of string + | Bool of bool +[@@deriving sexp] + +type direction = Asc | Desc +[@@deriving sexp] + +type query = + | Base of string (** base relation by name *) + | Const of (string * value) list (** constant single-tuple relation *) + | Select of query * query (** σ semijoin: (filter, source) *) + | Join of string list * query * query (** ⋈ natural equijoin on named attrs *) + | Cartesian of query * query (** × Cartesian product *) + | Project of string list * query (** π restrict columns *) + | Rename of (string * string) list * query (** ρ rename (old,new) pairs *) + | Union of query * query (** ∪ — compatible schemas assumed *) + | Diff of query * query (** − *) + | Take of int * query (** τ *) +[@@deriving sexp] |
