72NT_API
int rnt_init(
const char* driver,
const char* storage_path);
86NT_API
int rnt_firewall(
const char* auth_method,
char** claims_out);
106NT_API
int rnt_session_open(
void* connection_context,
char** session_hash_out);
138 const char* target_hash);
222 int cardinality,
const char* generator_identity,
223 const char* schema_kv,
const char* dependencies,
394NT_API
int rnt_link_tuple(
const char* relation_path,
const char* kv_attrs,
char** hash_out);
408NT_API
int rnt_unlink_tuple(
const char* relation_path,
const char* tuple_hash);
487 const char* relation_path;
563 nt::Operation operation;
Defines symbol visibility for the Relational NT public API.
NT_API rnt_cursor_t rnt_vm_execute_plan(rnt_plan_t plan)
Executes a plan tree and returns a streaming VM cursor.
Definition RNT_C_API.cpp:1251
NT_API void rnt_free_bytes(uint8_t *p)
Releases a byte buffer allocated by the API.
Definition RNT_C_API.cpp:1218
NT_API rnt_handle_t rnt_open_handle(const char *path, const char *claims)
Opens a handle to the object at the given slash-separated path.
Definition RNT_C_API.cpp:926
NT_API int rnt_init(const char *driver, const char *storage_path)
Initializes the RNT runtime with the selected storage backend.
Definition RNT_C_API.cpp:674
int(* rnt_generator_fn)(void *ctx, const char *args, size_t offset, size_t limit, rnt_tuple_sink_t sink)
Tuple-producing callback backing an ephemeral relation.
Definition RNT_C_API.h:169
NT_API int rnt_register_relation(const char *path)
Registers a RELATION object at the given path.
Definition RNT_C_API.cpp:985
NT_API int rnt_clear_relation(const char *relation_path)
Resets a relation's Merkle root to the empty-tree state.
Definition RNT_C_API.cpp:1136
NT_API int rnt_drop_ephemeral_relation(const char *session_hash, const char *name)
Drops a named ephemeral relation, releasing its session-ownership pin.
Definition RNT_C_API.cpp:914
void * rnt_tuple_sink_t
Opaque sink passed to a generator callback.
Definition RNT_C_API.h:150
NT_API int rnt_vm_cursor_close(rnt_cursor_t vm_cursor)
Closes a VM cursor, releases all plan nodes, cursors, and handles.
Definition RNT_C_API.cpp:1271
NT_API int rnt_relation_root(const char *relation_path, char **root_hash_out)
Returns the current Merkle root hash for a relation.
Definition RNT_C_API.cpp:1153
void * rnt_plan_t
Opaque plan node tree, built via rnt_plan_assemble calls.
Definition RNT_C_API.h:478
NT_API int rnt_branch_advance(const char *branch_path, const char *new_hash)
Atomically advances a branch to point at a new branch-tree root.
Definition RNT_C_API.cpp:957
NT_API rnt_cursor_t rnt_cursor_open(rnt_handle_t handle)
Opens a cursor on the relation referenced by handle.
Definition RNT_C_API.cpp:1180
NT_API int rnt_branch_target(rnt_handle_t handle, char **target_hash_out)
Reads the current branch-tree root hash from a BRANCH object.
Definition RNT_C_API.cpp:939
NT_API int rnt_sink_emit(rnt_tuple_sink_t sink, const char *tuple_kv)
Emits one tuple from inside a generator callback.
Definition RNT_C_API.cpp:837
NT_API int rnt_register_branch(const char *path, const char *target_hash)
Registers a BRANCH object at the given path pointing at a branch-tree root.
Definition RNT_C_API.cpp:1011
NT_API int rnt_register_ephemeral_relation(const char *session_hash, int named, const char *name, rnt_generator_fn generator, void *generator_ctx, int cardinality, const char *generator_identity, const char *schema_kv, const char *dependencies, char **path_out)
Registers an ephemeral relation owned by a session.
Definition RNT_C_API.cpp:845
NT_API int rnt_session_open(void *connection_context, char **session_hash_out)
Opens a session and registers it at /system/sessions/<hash>.
Definition RNT_C_API.cpp:715
void * rnt_cursor_t
Opaque cursor over a relation, driven by the VM or used directly.
Definition RNT_C_API.h:49
NT_API int rnt_session_close(const char *session_hash)
Closes a session, unregistering it from /system/sessions/<hash>.
Definition RNT_C_API.cpp:737
NT_API int rnt_list_snapshot_relations(const char *snapshot_hash, char **out)
Lists all relations stored in a specific snapshot.
Definition RNT_C_API.cpp:1067
NT_API void rnt_free_string(char *s)
Releases a string allocated by the API.
Definition RNT_C_API.cpp:1215
NT_API void rnt_plan_free(rnt_plan_t plan)
Releases a plan that was built but not yet executed.
Definition RNT_C_API.cpp:1247
NT_API int rnt_list_branch_multigroups(const char *branch_path, char **out)
Lists all multigroups bound to a branch.
Definition RNT_C_API.cpp:1053
NT_API int rnt_cursor_next(rnt_cursor_t cursor, char **tuple_out)
Advances the cursor and returns the next tuple as a kv string.
Definition RNT_C_API.cpp:1195
NT_API int rnt_vm_cursor_next(rnt_cursor_t vm_cursor, char **tuple_out)
Advances a VM cursor and returns the next merged tuple as a kv string.
Definition RNT_C_API.cpp:1258
NT_API int rnt_firewall(const char *auth_method, char **claims_out)
Runs PermissionsManager::Firewall for a connection.
Definition RNT_C_API.cpp:709
NT_API int rnt_unlink_tuple(const char *relation_path, const char *tuple_hash)
Removes a tuple from the relation's Merkle tree and tuple store.
Definition RNT_C_API.cpp:1115
NT_API rnt_plan_t rnt_plan_assemble(PlanAction action)
Builds one plan node from action and returns the resulting subtree.
Definition RNT_C_API.cpp:1226
NT_API int rnt_close_handle(rnt_handle_t handle)
Closes a handle, running HandlerManager::Close and Unmonitor.
Definition RNT_C_API.cpp:932
NT_API int rnt_cursor_close(rnt_cursor_t cursor)
Closes a cursor and releases its resources.
Definition RNT_C_API.cpp:1208
NT_API int rnt_list_relations(const char *branch_mg_path, char **out)
Lists all relations of a specific multigroup under a branch.
Definition RNT_C_API.cpp:1033
void * rnt_handle_t
Opaque handle to a registry object opened through HandlerManager.
Definition RNT_C_API.h:46
NT_API int rnt_link_tuple(const char *relation_path, const char *kv_attrs, char **hash_out)
Stores a tuple and links it to the relation at the given path.
Definition RNT_C_API.cpp:1086
NT_API int rnt_session_set_branch(const char *session_hash, const char *branch_name, const char *target_hash)
Sets a per-session override for a branch.
Definition RNT_C_API.cpp:762
Declares the logic execution boundary for relational and higher-order workloads.
A single plan-construction request.
Definition RNT_C_API.h:562
JOIN context: nested-loop join of two child plans.
Definition RNT_C_API.h:496
MATERIALIZE context: caches source on its first scan, then replays the cache on later scans without t...
Definition RNT_C_API.h:534
PROJECT context: keeps only the named attributes of source.
Definition RNT_C_API.h:519
RENAME context: returns source, with the keys of pairs the values of it.
Definition RNT_C_API.h:545
SCAN context: reads all tuples from a stored relation.
Definition RNT_C_API.h:486
TAKE context: passes at most limit tuples from source, then stops.
Definition RNT_C_API.h:507
UNION context.
Definition RNT_C_API.h:552