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/sublanguage.ml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/sublanguage.ml') diff --git a/lib/sublanguage.ml b/lib/sublanguage.ml index 3df91f1..d92358e 100644 --- a/lib/sublanguage.ml +++ b/lib/sublanguage.ml @@ -14,9 +14,16 @@ (Turing-complete; breaks the termination guarantee of DRL) - ACL -> a functor restriction: narrows the admissible natural transformations based on authorization context *) +type cursor_result = { + cursor_id : string; + rows : Tuple.materialized list; + has_more : bool; +} + type result = | Query of Relation.t | Transition of Management.Database.t * string + | Cursor of cursor_result module type S = sig type storage -- cgit v1.2.3