diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-05-10 00:45:21 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-05-10 00:45:21 -0300 |
| commit | 5ee324f03f8a7e6f09dad7b8580a2d32172694f8 (patch) | |
| tree | f368aa2ef1e17720fc6167095219a28e7c37ae59 /src | |
| parent | ce0566f9b6f8332d4ea85746f449c623097e330f (diff) | |
| download | RNT-5ee324f03f8a7e6f09dad7b8580a2d32172694f8.tar.gz RNT-5ee324f03f8a7e6f09dad7b8580a2d32172694f8.zip | |
change workflow
Diffstat (limited to '')
| -rw-r--r-- | src/RelationalNT.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/RelationalNT.cpp b/src/RelationalNT.cpp index 66752ef..8661ffa 100644 --- a/src/RelationalNT.cpp +++ b/src/RelationalNT.cpp @@ -30,33 +30,33 @@ int main() const nt::NT runtime; std::cout << "RNT running: " << (runtime.IsRunning() ? "yes" : "no") << '\n'; - // --- Mock: register RelationX in the object registry --- + // --- Mock: register user in the object registry --- nt::ObjectManager objects; - auto type = std::make_unique<nt::ObjectManager::object_type>(); + std::unique_ptr<nt::ObjectManager::object_type> type = std::make_unique<nt::ObjectManager::object_type>(); type->label = RELATION; type->disposable = false; type->methods = { OPEN, CLOSE }; - objects.Register({ "RelationX" }, std::make_unique<nt::ObjectManager::Relation>(), std::move(type)); + objects.Register({ "multigroups", "sakura", "relations", "user" }, std::make_unique<nt::ObjectManager::Relation>(), std::move(type)); // --- Mock: populate the cursor store with three tuples --- nt::CursorManager cursors; - cursors.MockInsert({ "RelationX" }, { { "name", "Alice" }, { "age", "30" } }); - cursors.MockInsert({ "RelationX" }, { { "name", "Bob" }, { "age", "25" } }); - cursors.MockInsert({ "RelationX" }, { { "name", "Carol" }, { "age", "35" } }); + cursors.MockInsert({ "multigroups", "sakura", "relations", "user" }, { { "name", "Alice" }, { "age", "30" } }); + cursors.MockInsert({ "multigroups", "sakura", "relations", "user" }, { { "name", "Bob" }, { "age", "25" } }); + cursors.MockInsert({ "multigroups", "sakura", "relations", "user"}, {{"name", "Carol"}, {"age", "35"}}); - // --- Open a handle on RelationX through the full manager pipeline --- + // --- Open a handle on user through the full manager pipeline --- nt::PermissionsManager permissions; nt::IdentityManager identities; nt::LifecycleManager lifecycles; nt::HandlerManager handler(objects, permissions, identities, lifecycles); int connection = 1; // dummy connection context - nt::HandlerManager::handle* handle = handler.Open({ "RelationX" }, &connection); + nt::HandlerManager::handle* handle = handler.Open({ "multigroups", "sakura", "relations", "user" }, &connection); if (handle == nullptr) { - std::cout << "Failed to open handle for RelationX\n"; + std::cout << "Failed to open handle for user\n"; return 1; } @@ -64,7 +64,7 @@ int main() nt::CursorManager::cursor* cursor = cursors.Open(handle); if (cursor == nullptr) { - std::cout << "Failed to open cursor for RelationX\n"; + std::cout << "Failed to open cursor for user\n"; handler.Close(handle); return 1; } @@ -75,7 +75,7 @@ int main() plan.scan_cursor = cursor; nt::VM vm(cursors); - std::cout << "Tuples in RelationX:\n"; + std::cout << "Tuples in user:\n"; while (nt::Tuple* t = vm.Next(&plan)) { std::cout << " "; |
