aboutsummaryrefslogtreecommitdiffstats
path: root/src/CursorManager.cpp
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-06-22 21:58:54 -0300
committerGitHub <noreply@github.com>2026-06-22 21:58:54 -0300
commit663586b8d07c979218ceff79576bb549ee1973c5 (patch)
tree8a7dabebe05d0c1ac7a509e8dcf6762364c0c095 /src/CursorManager.cpp
parent9f0e1c642680c69e10eb1760be07984f9ecc6d39 (diff)
downloadRNT-663586b8d07c979218ceff79576bb549ee1973c5.tar.gz
RNT-663586b8d07c979218ceff79576bb549ee1973c5.zip
Ephemeral relationsmaster-old
Diffstat (limited to 'src/CursorManager.cpp')
-rw-r--r--src/CursorManager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/CursorManager.cpp b/src/CursorManager.cpp
index 0d71b1c..23f826f 100644
--- a/src/CursorManager.cpp
+++ b/src/CursorManager.cpp
@@ -61,17 +61,18 @@ namespace nt {
};
if (label == EPHEMERAL_RELATION) {
- // Cursor is created exhausted — the JOIN operator writes args and
- // resets the state before the first probe. The generator is copied
- // off the registry-owned ephemeral_object_type so Next() never has
- // to dereference the handle again.
+ // Cursor opens ready for a standalone scan (no bound args, offset
+ // zero) so a named ephemeral can be drained like a stored relation.
+ // A JOIN probe overwrites this state anyway: the operator writes
+ // args and resets the cursor before the first probe. The generator
+ // is copied off the registry-owned ephemeral_object_type so Next()
+ // never has to dereference the handle again.
auto* etype = static_cast<ObjectManager::ephemeral_object_type*>(
handle->object->head->type.get());
auto* c = new cursor();
c->is_ephemeral = true;
c->generator = etype->generator;
- c->exhausted = true;
pin_snapshot(c);
return c;
}