diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-09 22:12:44 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-11 01:07:40 -0300 |
| commit | 0a9446795bd19a3017482f702df01ebaadadfd48 (patch) | |
| tree | b48fa97d07ad0b4c91517aa2d5739f43c17db51b /lib/protocols/Cursor.mli | |
| parent | 6ed1f50733d86d0da2adbde9e650f53f828f638e (diff) | |
| download | RNT-0a9446795bd19a3017482f702df01ebaadadfd48.tar.gz RNT-0a9446795bd19a3017482f702df01ebaadadfd48.zip | |
cursor and context
Diffstat (limited to '')
| -rw-r--r-- | lib/protocols/Cursor.mli | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/protocols/Cursor.mli b/lib/protocols/Cursor.mli new file mode 100644 index 0000000..08c7628 --- /dev/null +++ b/lib/protocols/Cursor.mli @@ -0,0 +1,21 @@ +type batch = + {tuples: Concepts.Tuple.t BatFingerTree.t; exhausted: bool} + +type t + +class type implementation = object + method fetch : int -> (batch, Concepts.Condition.condition) result +end + +val make : #implementation -> Handle.protocol +val from : Handle.t -> t Handle.interface option +val require : Handle.t -> (t Handle.interface, Concepts.Condition.condition) result +val fetch : t Handle.interface -> int -> (batch, Concepts.Condition.condition) result + +val next : t Handle.interface -> (Concepts.Tuple.t option, Concepts.Condition.condition) result + +val drain : + t Handle.interface -> + ?limit:int -> + unit -> + (Concepts.Tuple.t BatFingerTree.t, Concepts.Condition.condition) result |
