From 013cbf09e4ea9871311bf52b6873c43fc9be5441 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Tue, 24 Mar 2026 17:51:03 -0300 Subject: Session with stream control sublanguage (#55) SCL adds cursor-based streaming to Sakura so clients can consume DRL query results incrementally in bounded batches rather than all at once. Three statements: Begin, Fetch, and Close. `open`, `advance`, and `release` cursors backed by a session registry that suspends the generator between calls. SCL is just an optional consumption layer above the existing algebra. --- lib/scl/ast.ml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lib/scl/ast.ml (limited to 'lib/scl/ast.ml') diff --git a/lib/scl/ast.ml b/lib/scl/ast.ml new file mode 100644 index 0000000..043f544 --- /dev/null +++ b/lib/scl/ast.ml @@ -0,0 +1,7 @@ +open Sexplib.Std + +type statement = + | Begin of { query : Drl.Ast.query; limit : int option } + | Fetch of { cursor : string; limit : int option } + | Close of { cursor : string } +[@@deriving sexp] -- cgit v1.2.3