Skip to main content

RedDBRuntime

Struct RedDBRuntime 

Source
pub struct RedDBRuntime { /* private fields */ }

Implementations§

Source§

impl RedDBRuntime

Source

pub fn execute_config_command( &self, raw_query: &str, cmd: &ConfigCommand, ) -> RedDBResult<RuntimeQueryResult>

Source

pub fn config_watch_events_since( &self, collection: &str, key: &str, since_lsn: u64, max_count: usize, ) -> Vec<KvWatchEvent>

Source

pub fn config_watch_events_since_prefix( &self, collection: &str, prefix: &str, since_lsn: u64, max_count: usize, ) -> Vec<KvWatchEvent>

Source§

impl RedDBRuntime

Source

pub fn in_memory() -> RedDBResult<Self>

Source

pub fn lock_manager(&self) -> Arc<LockManager>

Handle to the intent-lock manager for tests + introspection. Production code acquires via LockerGuard::new(rt.lock_manager()) rather than touching the manager directly.

Source

pub fn with_options(options: RedDBOptions) -> RedDBResult<Self>

Source

pub fn with_pool( options: RedDBOptions, pool_config: ConnectionPoolConfig, ) -> RedDBResult<Self>

Source

pub fn db(&self) -> Arc<RedDB>

Source

pub fn index_store_ref(&self) -> &IndexStore

Direct access to the runtime’s secondary-index store. Used by bulk-insert entry points (gRPC binary bulk, HTTP bulk, wire bulk) that need to push new rows through the per-index maintenance hook after store.bulk_insert returns.

Source

pub fn schema_vocabulary_lookup(&self, token: &str) -> Vec<VocabHit>

Lookup token in the schema-vocabulary reverse index. Returns an owned Vec<VocabHit> because the underlying read lock cannot be borrowed across the call boundary; the slice from SchemaVocabulary::lookup is cloned per hit.

Source

pub fn set_auth_store(&self, store: Arc<AuthStore>)

Inject an AuthStore into the runtime. Called by server boot after the vault has been bootstrapped, so that Value::Secret auto-encrypt/decrypt can reach the vault AES key.

Source

pub fn vault_kv_get(&self, key: &str) -> Option<String>

Read a vault KV secret from the configured AuthStore, if present.

Source

pub fn vault_kv_try_set(&self, key: String, value: String) -> RedDBResult<()>

Write a vault KV secret and fail if the encrypted vault write is unavailable or cannot be made durable.

Source

pub fn set_oauth_validator(&self, validator: Option<Arc<OAuthValidator>>)

Inject an OAuthValidator into the runtime. When set, HTTP and wire transports try OAuth JWT validation before falling back to the local AuthStore lookup. Pass None to disable.

Source

pub fn oauth_validator(&self) -> Option<Arc<OAuthValidator>>

Returns a clone of the configured OAuthValidator Arc, if any. Hot path: called per HTTP request when an Authorization header is present, so we hand back a cheap Arc clone.

Source

pub fn check_write(&self, kind: WriteKind) -> RedDBResult<()>

Public-mutation gate snapshot (PLAN.md W1).

Surfaces that accept untrusted client requests (SQL DML/DDL, gRPC mutating RPCs, HTTP/native wire mutations, admin maintenance, serverless lifecycle) call check_write before dispatching to storage. Returns RedDBError::ReadOnly on any instance running as a replica or with options.read_only = true. The replica internal logical-WAL apply path reaches into the store directly and never calls this method, so legitimate replica catch-up still works.

Source

pub fn write_gate(&self) -> &WriteGate

Read-only handle to the gate, useful for transports that want to surface the policy in health/status output without taking on a dependency on the concrete enum.

Source

pub fn lifecycle(&self) -> &Lifecycle

Process lifecycle handle (PLAN.md Phase 1). Health probes, admin/shutdown, and signal handlers consult this single state machine.

Source

pub fn resource_limits(&self) -> &ResourceLimits

Operator-imposed resource limits (PLAN.md Phase 4.1).

Source

pub fn audit_log(&self) -> &AuditLogger

Append-only audit log for admin mutations (PLAN.md Phase 6.5).

Source

pub fn audit_log_arc(&self) -> Arc<AuditLogger>

Shared Arc to the audit logger — used by collaborators (the lease lifecycle, future request-context plumbing) that need to keep the logger alive past the runtime’s stack frame.

Source

pub fn write_gate_arc(&self) -> Arc<WriteGate>

Shared Arc to the write gate. Same rationale as audit_log_arc: collaborators (lease lifecycle, refresh thread) need a clone-cheap handle they can move into a background thread.

Source

pub fn lease_lifecycle(&self) -> Option<&Arc<LeaseLifecycle>>

Serverless writer-lease state machine. None when the operator did not opt into lease fencing (RED_LEASE_REQUIRED unset).

Source

pub fn set_lease_lifecycle( &self, lifecycle: Arc<LeaseLifecycle>, ) -> Result<(), Arc<LeaseLifecycle>>

Install the lease lifecycle. Idempotent; subsequent calls return the previously stored value untouched.

Source

pub fn check_batch_size(&self, requested: usize) -> RedDBResult<()>

Reject the call when the requested batch size exceeds RED_MAX_BATCH_SIZE. Returns RedDBError::QuotaExceeded shaped so the HTTP layer can map it to 413 Payload Too Large (PLAN.md Phase 4.1).

Source

pub fn check_db_size(&self) -> RedDBResult<()>

Reject the call when the local DB file exceeds RED_MAX_DB_SIZE_BYTES. Reads file metadata once per call — the cost is a single stat() syscall, negligible against the I/O the caller is about to do. Returns QuotaExceeded shaped for HTTP 507 Insufficient Storage.

Source

pub fn graceful_shutdown( &self, backup_on_shutdown: bool, ) -> RedDBResult<ShutdownReport>

Graceful shutdown coordinator (PLAN.md Phase 1.1).

Steps, in order, all idempotent across re-entrant calls:

  1. Move lifecycle into ShuttingDown (concurrent callers observe Stopped after first finishes).
  2. Flush WAL + run final checkpoint via db.flush() so every acked write is durable on disk.
  3. If backup_on_shutdown == true and a remote backend is configured, run a synchronous trigger_backup() so the remote head reflects the final state.
  4. Stamp the report and move to Stopped. Subsequent calls return the cached report without re-running anything.

On any error, the runtime is still marked Stopped so the process can exit; the caller logs the error context but does not retry the same shutdown — the operator can inspect the report fields to see which step failed.

Source

pub fn cdc_emit( &self, operation: ChangeOperation, collection: &str, entity_id: u64, entity_kind: &str, ) -> u64

Source

pub fn cdc_poll(&self, since_lsn: u64, max_count: usize) -> Vec<ChangeEvent>

Poll CDC events since a given LSN.

Source

pub fn cdc_current_lsn(&self) -> u64

PLAN.md Phase 11.4 — current CDC LSN. Public mutation surfaces (HTTP query, gRPC entity ops) call this immediately after a successful write to feed enforce_commit_policy.

Source

pub fn kv_watch_events_since( &self, collection: &str, key: &str, since_lsn: u64, max_count: usize, ) -> Vec<KvWatchEvent>

Source

pub fn kv_watch_events_since_prefix( &self, collection: &str, prefix: &str, since_lsn: u64, max_count: usize, ) -> Vec<KvWatchEvent>

Source

pub fn backup_status(&self) -> BackupStatus

Get backup scheduler status.

Source

pub fn result_blob_cache(&self) -> &BlobCache

Borrow the runtime’s result Blob Cache.

Wired for the /admin/blob_cache/sweep and /admin/blob_cache/flush_namespace HTTP handlers (issue #148 follow-up): both delegate to crate::storage::cache::sweeper::BlobCacheSweeper, which takes a &BlobCache. Also used by trigger_backup when red.config.backup.include_blob_cache=true to locate the L2 directory for archival.

Source

pub fn primary_replica_snapshots(&self) -> Vec<ReplicaState>

PLAN.md Phase 11.4 — owned snapshot of every registered replica’s state on this primary. Returns empty vec on non-primary instances or when no replicas are registered yet.

Source

pub fn commit_policy(&self) -> CommitPolicy

PLAN.md Phase 11.4 — active commit policy. Reads RED_PRIMARY_COMMIT_POLICY once at runtime construction; future env reloads will need a reload endpoint. Default is Local — current behavior, no replica blocking.

Source

pub fn replica_apply_error_counts(&self) -> [(ApplyErrorKind, u64); 4]

PLAN.md Phase 11.5 — accessor for replica-side apply error counters (gap / divergence / apply / decode). Returned snapshot is consistent across the four counters; the labels match reddb_replica_apply_errors_total{kind}.

Source

pub fn quota_bucket(&self) -> &QuotaBucket

PLAN.md Phase 4.4 — per-caller quota bucket. Always returned; is_configured() lets callers short-circuit.

Source

pub fn commit_waiter_snapshot(&self) -> Vec<(String, u64)>

PLAN.md Phase 11.4 — observability snapshot of every replica’s durable LSN as known to the commit waiter. Empty vec on non-primary instances or when no replica has acked.

Source

pub fn commit_waiter_metrics_snapshot(&self) -> (u64, u64, u64, u64)

PLAN.md Phase 11.4 — (reached, timed_out, not_required, last_micros) counters for /metrics. Always-zero on non-primary instances.

Source

pub fn await_replica_acks( &self, target_lsn: u64, count: u32, timeout: Duration, ) -> AwaitOutcome

PLAN.md Phase 11.4 — block until at least count replicas have durably applied through target_lsn, or timeout elapses. Returns the AwaitOutcome so the caller can decide whether to surface a timeout error to the client or continue (the policy mapping lives in the commit dispatcher).

Foundation only — the write commit path doesn’t yet call this. Wiring it is a per-surface task gated on the operator flipping RED_PRIMARY_COMMIT_POLICY away from local.

Source

pub fn enforce_commit_policy(&self, post_lsn: u64) -> RedDBResult<AwaitOutcome>

PLAN.md Phase 11.4 — enforce the configured commit policy against post_lsn (the LSN of the just-completed write). Returns Ok(AwaitOutcome) on every successful enforcement (including Reached and TimedOut when fail-on-timeout is off). Returns Err(ReadOnly) only when:

  • policy is AckN(n) with n > 0
  • the wait timed out
  • RED_COMMIT_FAIL_ON_TIMEOUT=true is set

The HTTP / gRPC / wire surfaces map the error to 504 / wire backoff. Default behaviour (env unset) logs warn and returns success — matches PLAN.md “default v1 stays local” semantics while still letting the operator opt into hard-blocking.

Source

pub fn encryption_at_rest_status(&self) -> (&'static str, Option<String>)

PLAN.md Phase 6.3 — whether at-rest encryption is configured. Reads RED_ENCRYPTION_KEY / RED_ENCRYPTION_KEY_FILE lazily; returns ("enabled", None) when a key is loadable, ("error", Some(msg)) when the operator set the env but it doesn’t parse, and ("disabled", None) when no key is configured. The pager hookup is deferred — this accessor surfaces the operator’s intent for /admin/status without yet using the key in writes.

Source

pub fn replica_apply_health(&self) -> Option<String>

PLAN.md Phase 11.5 — current replica apply health label (ok, gap, divergence, apply_error, connecting, stalled_gap). Read from the persisted red.replication.state config key updated by the replica loop. Returns None on non-replica instances or when no apply has run yet.

Source

pub fn wal_archive_progress(&self) -> (u64, u64)

Current local LSN paired with the LSN of the most recently archived WAL segment. The difference is the replication / archive lag operators alert on (PLAN.md Phase 5.1). Returns (0, 0) when neither replication nor archiving is configured.

Source

pub fn trigger_backup(&self) -> RedDBResult<BackupResult>

Trigger an immediate backup.

Source

pub fn acquire(&self) -> RedDBResult<RuntimeConnection>

Source

pub fn checkpoint(&self) -> RedDBResult<()>

Source

pub fn run_maintenance(&self) -> RedDBResult<()>

Source

pub fn scan_collection( &self, collection: &str, cursor: Option<ScanCursor>, limit: usize, ) -> RedDBResult<ScanPage>

Source

pub fn catalog(&self) -> CatalogModelSnapshot

Source

pub fn catalog_consistency_report(&self) -> CatalogConsistencyReport

Source

pub fn catalog_attention_summary(&self) -> CatalogAttentionSummary

Source

pub fn collection_attention(&self) -> Vec<CollectionDescriptor>

Source

pub fn index_attention(&self) -> Vec<CatalogIndexStatus>

Source

pub fn graph_projection_attention(&self) -> Vec<CatalogGraphProjectionStatus>

Source

pub fn analytics_job_attention(&self) -> Vec<CatalogAnalyticsJobStatus>

Source

pub fn stats(&self) -> RuntimeStats

Source

pub fn execute_query_with_scope( &self, query: &str, scope: ScopeOverride, ) -> RedDBResult<RuntimeQueryResult>

Execute a query under a typed scope override without embedding the tenant / user / role values into the SQL string. Use this from transport middleware (HTTP / gRPC / worker loops) where the scope is resolved from auth claims and the SQL is a parameterised template — avoids the string-concat injection risk of building WITHIN TENANT '<id>' … manually, and is drop-in compatible with prepared statements that didn’t know about tenancy.

Precedence matches the WITHIN clause: the passed scope overrides SET LOCAL TENANT, which overrides SET TENANT. The override is pushed on the thread-local scope stack for the duration of the call and popped on return — pool-shared connections cannot leak it across requests.

Source

pub fn execute_query(&self, query: &str) -> RedDBResult<RuntimeQueryResult>

Issue #205 — single lifecycle exit for slow-query logging.

execute_query_inner does the real work; this wrapper times it and, if elapsed exceeds the configured threshold, hands the triple (QueryKind, elapsed_ms, sql_redacted, scope) to the SlowQueryLogger. The threshold + sample_pct were captured at SlowQueryLogger construction (runtime startup), so the per-call cost on below-threshold paths is one relaxed atomic load.

Source

pub fn result_cache_shadow_divergences(&self) -> u64

Source

pub fn invalidate_result_cache(&self)

Invalidate the result cache (call after any write operation). Full clear — use for DDL (DROP TABLE, schema changes) or when table is unknown.

Source

pub fn ddl_epoch(&self) -> u64

Read the monotonic DDL epoch counter. Bumped by every invalidate_plan_cache call so prepared-statement holders can detect schema drift between PREPARE and EXECUTE.

Source

pub fn register_tenant_table(&self, table: &str, column: &str)

Register a table as tenant-scoped (Phase 2.5.4). Installs the in-memory column mapping, the implicit RLS policy, and enables row-level security on the table. Idempotent — re-registering the same (table, column) replaces the prior auto-policy.

Source

pub fn tenant_column(&self, table: &str) -> Option<String>

Retrieve the tenant column for a table, if any (Phase 2.5.4). Used by the INSERT auto-fill path to know which column to populate with current_tenant() when the user didn’t name it.

Source

pub fn unregister_tenant_table(&self, table: &str)

Remove a table’s tenant registration (Phase 2.5.4). Called by DROP TABLE / ALTER TABLE DISABLE TENANCY. Removes the auto-policy but leaves any user-installed explicit policies intact.

Source

pub fn current_snapshot(&self) -> Snapshot

Return the snapshot the current connection should use for visibility checks (Phase 2.3 PG parity).

  • If the connection is inside a BEGIN-wrapped transaction, reuse the snapshot stored in its TxnContext.
  • Otherwise (autocommit), capture a fresh snapshot tied to an implicit xid=0 — the read path treats pre-MVCC rows as always visible so this degrades to “see everything committed”.
Source

pub fn current_xid(&self) -> Option<Xid>

Xid of the current connection’s active transaction, or None when running outside a BEGIN/COMMIT block. Write paths call this to decide whether to stamp xmin/xmax on tuples. Phase 2.3.2e: when a savepoint is open, writer_xid returns the sub-xid so new writes can be selectively rolled back. Otherwise the parent txn’s xid is returned, matching pre-savepoint behaviour. Callers that need the enclosing transaction xid (e.g. VACUUM min-active calculations) should read ctx.xid directly.

Source

pub fn snapshot_manager(&self) -> Arc<SnapshotManager>

Access the shared SnapshotManager — useful for VACUUM to compute the oldest-active xid when reclaiming dead tuples.

Source

pub fn current_txn_own_xids(&self) -> HashSet<Xid>

Own-tx xids (parent + open savepoints) for the current connection. Transports + tests that build a SnapshotContext manually (outside the execute_query scope) need this set so the writer’s own uncommitted tuples stay visible to self.

Source

pub fn foreign_tables(&self) -> Arc<ForeignTableRegistry>

Access the shared ForeignTableRegistry (Phase 3.2 PG parity).

Callers use this to check whether a table name is a registered foreign table (registry.is_foreign_table(name)) and, if so, to scan it (registry.scan(name)). The read-path rewriter consults this before dispatching into native-collection lookup.

Source

pub fn is_rls_enabled(&self, table: &str) -> bool

Is Row-Level Security enabled for this table? (Phase 2.5 PG parity)

Source

pub fn matching_rls_policies( &self, table: &str, role: Option<&str>, action: PolicyAction, ) -> Vec<Filter>

Collect the USING predicates that apply to this (table, role, action).

Returned filters should be OR-combined (a row passes RLS when any matching policy accepts it) and then AND-ed into the query’s WHERE. When the table has RLS disabled this returns an empty Vec — callers can fast-path back to the unfiltered read.

Source

pub fn matching_rls_policies_for_kind( &self, table: &str, role: Option<&str>, action: PolicyAction, kind: PolicyTargetKind, ) -> Vec<Filter>

Kind-aware variant used by cross-model scans (Phase 2.5.5).

Graph scans request Nodes / Edges, vector ANN requests Vectors, queue consumers request Messages, and timeseries range scans request Points. Policies tagged with a different kind are skipped so a graph-scoped policy doesn’t accidentally gate a table SELECT on the same collection.

Source§

impl RedDBRuntime

Source

pub fn execute_create_table( &self, raw_query: &str, query: &CreateTableQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute CREATE TABLE

Creates a new collection in the store. Column definitions are recorded for introspection but do not enforce rigid schema constraints.

Source

pub fn execute_drop_table( &self, raw_query: &str, query: &DropTableQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute DROP TABLE

Drops the collection and all its data from the store.

Source

pub fn execute_drop_graph( &self, raw_query: &str, query: &DropGraphQuery, ) -> RedDBResult<RuntimeQueryResult>

Source

pub fn execute_drop_vector( &self, raw_query: &str, query: &DropVectorQuery, ) -> RedDBResult<RuntimeQueryResult>

Source

pub fn execute_drop_document( &self, raw_query: &str, query: &DropDocumentQuery, ) -> RedDBResult<RuntimeQueryResult>

Source

pub fn execute_drop_kv( &self, raw_query: &str, query: &DropKvQuery, ) -> RedDBResult<RuntimeQueryResult>

Source

pub fn execute_drop_collection( &self, raw_query: &str, query: &DropCollectionQuery, ) -> RedDBResult<RuntimeQueryResult>

Source

pub fn execute_alter_table( &self, raw_query: &str, query: &AlterTableQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute ALTER TABLE

In RedDB’s schema-on-read model, ALTER TABLE operations are advisory. ADD COLUMN records the schema intent, DROP COLUMN removes it, and RENAME COLUMN is a metadata rename. Existing data is not rewritten.

Source

pub fn execute_explain_alter( &self, raw_query: &str, query: &ExplainAlterQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute EXPLAIN ALTER FOR CREATE TABLE

Pure read: computes the schema diff between the target table’s current CollectionContract and the embedded CREATE TABLE body, and returns it as SQL ALTER TABLE text (default) or structured JSON. Never mutates storage.

Source

pub fn execute_create_index( &self, raw_query: &str, query: &CreateIndexQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute CREATE INDEX

Registers a new index on a collection, builds it from existing data, and makes it available to the query executor for O(1) lookups.

Source

pub fn execute_drop_index( &self, raw_query: &str, query: &DropIndexQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute DROP INDEX

Removes an index from a collection.

Source

pub fn execute_truncate( &self, raw_query: &str, query: &TruncateQuery, ) -> RedDBResult<RuntimeQueryResult>

Source§

impl RedDBRuntime

Source

pub fn execute_insert( &self, raw_query: &str, query: &InsertQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute INSERT INTO table [entity_type] (cols) VALUES (vals), …

Each row in query.values is zipped with query.columns to produce a set of named fields, which is then dispatched based on entity_type.

Source

pub fn execute_update( &self, raw_query: &str, query: &UpdateQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute UPDATE table SET col=val, … WHERE filter

Scans the target collection, evaluates the WHERE filter against each record, and patches every matching entity.

Source

pub fn execute_delete( &self, raw_query: &str, query: &DeleteQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute DELETE FROM table WHERE filter

Source§

impl RedDBRuntime

Source

pub fn ec_add( &self, collection: &str, field: &str, target_id: u64, value: f64, source: Option<&str>, ) -> RedDBResult<u64>

Source

pub fn ec_sub( &self, collection: &str, field: &str, target_id: u64, value: f64, source: Option<&str>, ) -> RedDBResult<u64>

Source

pub fn ec_set( &self, collection: &str, field: &str, target_id: u64, value: f64, source: Option<&str>, ) -> RedDBResult<u64>

Source

pub fn ec_consolidate( &self, collection: &str, field: &str, target_id: Option<u64>, ) -> RedDBResult<ConsolidationResult>

Source

pub fn ec_status( &self, collection: &str, field: &str, target_id: u64, ) -> EcStatus

Source

pub fn ec_register_field(&self, config: EcFieldConfig)

Source

pub fn ec_global_status(&self) -> Vec<EcStatus>

Source

pub fn ec_shutdown(&self) -> RedDBResult<u64>

Graceful EC shutdown: consolidate all pending, stop worker, flush. Call during serverless reclaim or application shutdown.

Source§

impl RedDBRuntime

Source§

impl RedDBRuntime

Source

pub fn graph_neighborhood( &self, node: &str, direction: RuntimeGraphDirection, max_depth: usize, edge_labels: Option<Vec<String>>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphNeighborhoodResult>

Source

pub fn graph_traverse( &self, source: &str, direction: RuntimeGraphDirection, max_depth: usize, strategy: RuntimeGraphTraversalStrategy, edge_labels: Option<Vec<String>>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphTraversalResult>

Source

pub fn graph_shortest_path( &self, source: &str, target: &str, direction: RuntimeGraphDirection, algorithm: RuntimeGraphPathAlgorithm, edge_labels: Option<Vec<String>>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphPathResult>

Source

pub fn graph_components( &self, mode: RuntimeGraphComponentsMode, min_size: usize, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphComponentsResult>

Source

pub fn graph_centrality( &self, algorithm: RuntimeGraphCentralityAlgorithm, top_k: usize, normalize: bool, max_iterations: Option<usize>, epsilon: Option<f64>, alpha: Option<f64>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphCentralityResult>

Source

pub fn graph_communities( &self, algorithm: RuntimeGraphCommunityAlgorithm, min_size: usize, max_iterations: Option<usize>, resolution: Option<f64>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphCommunityResult>

Source

pub fn graph_clustering( &self, top_k: usize, include_triangles: bool, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphClusteringResult>

Source

pub fn graph_personalized_pagerank( &self, seeds: Vec<String>, top_k: usize, alpha: Option<f64>, epsilon: Option<f64>, max_iterations: Option<usize>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphCentralityResult>

Source

pub fn graph_hits( &self, top_k: usize, epsilon: Option<f64>, max_iterations: Option<usize>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphHitsResult>

Source

pub fn graph_cycles( &self, max_length: usize, max_cycles: usize, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphCyclesResult>

Source

pub fn graph_topological_sort( &self, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphTopologicalSortResult>

Source

pub fn graph_properties( &self, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphPropertiesResult>

Source§

impl RedDBRuntime

Source

pub fn execute_graph_command( &self, raw_query: &str, cmd: &GraphCommand, ) -> RedDBResult<RuntimeQueryResult>

Execute a GRAPH analytics command.

Source

pub fn execute_search_command( &self, raw_query: &str, cmd: &SearchCommand, ) -> RedDBResult<RuntimeQueryResult>

Execute a SEARCH command.

Source§

impl RedDBRuntime

Source

pub fn execute_kv_command( &self, raw_query: &str, cmd: &KvCommand, ) -> RedDBResult<RuntimeQueryResult>

Dispatch a KV PUT / GET / DELETE command.

Source

pub fn vault_watch_events_since( &self, collection: &str, key: &str, since_lsn: u64, max_count: usize, ) -> Vec<KvWatchEvent>

Source

pub fn vault_watch_events_since_prefix( &self, collection: &str, prefix: &str, since_lsn: u64, max_count: usize, ) -> Vec<KvWatchEvent>

Source§

impl RedDBRuntime

Source

pub fn execute_create_migration( &self, raw_query: &str, q: &CreateMigrationQuery, ) -> RedDBResult<RuntimeQueryResult>

CREATE MIGRATION — register a migration definition with status=pending.

Source

pub fn execute_apply_migration( &self, raw_query: &str, q: &ApplyMigrationQuery, ) -> RedDBResult<RuntimeQueryResult>

APPLY MIGRATION name [FOR TENANT id] | APPLY MIGRATION * [FOR TENANT id]

Source

pub fn execute_rollback_migration( &self, raw_query: &str, q: &RollbackMigrationQuery, ) -> RedDBResult<RuntimeQueryResult>

ROLLBACK MIGRATION name

Source

pub fn execute_explain_migration( &self, raw_query: &str, q: &ExplainMigrationQuery, ) -> RedDBResult<RuntimeQueryResult>

EXPLAIN MIGRATION name

Source§

impl RedDBRuntime

Source

pub fn snapshots(&self) -> RedDBResult<Vec<SnapshotDescriptor>>

Source

pub fn create_snapshot(&self) -> RedDBResult<SnapshotDescriptor>

Source

pub fn exports(&self) -> RedDBResult<Vec<ExportDescriptor>>

Source

pub fn native_header(&self) -> RedDBResult<PhysicalFileHeader>

Source

pub fn native_collection_roots(&self) -> RedDBResult<BTreeMap<String, u64>>

Source

pub fn native_manifest_summary(&self) -> RedDBResult<NativeManifestSummary>

Source

pub fn native_registry_summary(&self) -> RedDBResult<NativeRegistrySummary>

Source

pub fn native_recovery_summary(&self) -> RedDBResult<NativeRecoverySummary>

Source

pub fn native_catalog_summary(&self) -> RedDBResult<NativeCatalogSummary>

Source

pub fn native_physical_state(&self) -> RedDBResult<NativePhysicalState>

Source

pub fn native_vector_artifact_pages( &self, ) -> RedDBResult<Vec<NativeVectorArtifactPageSummary>>

Source

pub fn inspect_native_vector_artifact( &self, collection: &str, artifact_kind: Option<&str>, ) -> RedDBResult<NativeVectorArtifactInspection>

Source

pub fn warmup_native_vector_artifact( &self, collection: &str, artifact_kind: Option<&str>, ) -> RedDBResult<NativeVectorArtifactInspection>

Source

pub fn inspect_native_vector_artifacts( &self, ) -> RedDBResult<NativeVectorArtifactBatchInspection>

Source

pub fn warmup_native_vector_artifacts( &self, ) -> RedDBResult<NativeVectorArtifactBatchInspection>

Source

pub fn native_header_repair_policy(&self) -> RedDBResult<String>

Source

pub fn repair_native_header_from_metadata(&self) -> RedDBResult<String>

Source

pub fn rebuild_physical_metadata_from_native_state(&self) -> RedDBResult<bool>

Source

pub fn repair_native_physical_state_from_metadata(&self) -> RedDBResult<bool>

Source

pub fn native_metadata_state_summary( &self, ) -> RedDBResult<NativeMetadataStateSummary>

Source

pub fn physical_authority_status(&self) -> PhysicalAuthorityStatus

Source

pub fn readiness_for_query(&self) -> bool

Source

pub fn readiness_for_query_serverless(&self) -> bool

Source

pub fn readiness_for_write(&self) -> bool

Source

pub fn readiness_for_write_serverless(&self) -> bool

Source

pub fn readiness_for_repair(&self) -> bool

Source

pub fn readiness_for_repair_serverless(&self) -> bool

Source

pub fn manifest_events(&self) -> RedDBResult<Vec<ManifestEvent>>

Source

pub fn manifest_events_filtered( &self, collection: Option<&str>, kind: Option<&str>, since_snapshot: Option<u64>, ) -> RedDBResult<Vec<ManifestEvent>>

Source

pub fn collection_roots(&self) -> RedDBResult<BTreeMap<String, u64>>

Source§

impl RedDBRuntime

Source

pub fn create_export( &self, name: impl Into<String>, ) -> RedDBResult<ExportDescriptor>

Source

pub fn graph_projections(&self) -> RedDBResult<Vec<PhysicalGraphProjection>>

Source

pub fn operational_graph_projections(&self) -> Vec<PhysicalGraphProjection>

Source

pub fn graph_projection_named( &self, name: &str, ) -> RedDBResult<RuntimeGraphProjection>

Source

pub fn save_graph_projection( &self, name: impl Into<String>, projection: RuntimeGraphProjection, source: Option<String>, ) -> RedDBResult<PhysicalGraphProjection>

Source

pub fn materialize_graph_projection( &self, name: &str, ) -> RedDBResult<PhysicalGraphProjection>

Source

pub fn mark_graph_projection_materializing( &self, name: &str, ) -> RedDBResult<PhysicalGraphProjection>

Source

pub fn fail_graph_projection( &self, name: &str, ) -> RedDBResult<PhysicalGraphProjection>

Source

pub fn mark_graph_projection_stale( &self, name: &str, ) -> RedDBResult<PhysicalGraphProjection>

Source

pub fn analytics_jobs(&self) -> RedDBResult<Vec<PhysicalAnalyticsJob>>

Source

pub fn operational_analytics_jobs(&self) -> Vec<PhysicalAnalyticsJob>

Source

pub fn save_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source

pub fn start_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source

pub fn queue_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source

pub fn fail_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source

pub fn mark_analytics_job_stale( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source

pub fn complete_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source

pub fn record_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source

pub fn resolve_graph_projection( &self, projection_name: Option<&str>, inline: Option<RuntimeGraphProjection>, ) -> RedDBResult<Option<RuntimeGraphProjection>>

Source

pub fn apply_retention_policy(&self) -> RedDBResult<()>

Source

pub fn indexes(&self) -> Vec<PhysicalIndexState>

Source

pub fn declared_indexes(&self) -> Vec<PhysicalIndexState>

Source

pub fn declared_indexes_for_collection( &self, collection: &str, ) -> Vec<PhysicalIndexState>

Source

pub fn index_statuses(&self) -> Vec<CatalogIndexStatus>

Source

pub fn graph_projection_statuses(&self) -> Vec<CatalogGraphProjectionStatus>

Source

pub fn analytics_job_statuses(&self) -> Vec<CatalogAnalyticsJobStatus>

Source

pub fn indexes_for_collection( &self, collection: &str, ) -> Vec<PhysicalIndexState>

Source

pub fn set_index_enabled( &self, name: &str, enabled: bool, ) -> RedDBResult<PhysicalIndexState>

Source

pub fn mark_index_building(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source

pub fn fail_index(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source

pub fn mark_index_stale(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source

pub fn mark_index_ready(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source

pub fn warmup_index_with_lifecycle( &self, name: &str, ) -> RedDBResult<PhysicalIndexState>

Source

pub fn warmup_index(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source

pub fn rebuild_indexes( &self, collection: Option<&str>, ) -> RedDBResult<Vec<PhysicalIndexState>>

Source

pub fn rebuild_indexes_with_lifecycle( &self, collection: Option<&str>, ) -> RedDBResult<Vec<PhysicalIndexState>>

Source§

impl RedDBRuntime

Source§

impl RedDBRuntime

Source§

impl RedDBRuntime

Source

pub fn explain_query(&self, query: &str) -> RedDBResult<RuntimeQueryExplain>

Source

pub fn search_similar( &self, collection: &str, vector: &[f32], k: usize, min_score: f32, ) -> RedDBResult<Vec<SimilarResult>>

Source

pub fn search_ivf( &self, collection: &str, vector: &[f32], k: usize, n_lists: usize, n_probes: Option<usize>, ) -> RedDBResult<RuntimeIvfSearchResult>

Source

pub fn search_hybrid( &self, vector: Option<Vec<f32>>, query: Option<String>, k: Option<usize>, collections: Option<Vec<String>>, entity_types: Option<Vec<String>>, capabilities: Option<Vec<String>>, graph_pattern: Option<RuntimeGraphPattern>, filters: Vec<RuntimeFilter>, weights: Option<RuntimeQueryWeights>, min_score: Option<f32>, limit: Option<usize>, ) -> RedDBResult<DslQueryResult>

Source

pub fn search_multimodal( &self, query: String, collections: Option<Vec<String>>, entity_types: Option<Vec<String>>, capabilities: Option<Vec<String>>, limit: Option<usize>, ) -> RedDBResult<DslQueryResult>

Source

pub fn search_index( &self, index: String, value: String, exact: bool, collections: Option<Vec<String>>, entity_types: Option<Vec<String>>, capabilities: Option<Vec<String>>, limit: Option<usize>, ) -> RedDBResult<DslQueryResult>

Source

pub fn search_text( &self, query: String, collections: Option<Vec<String>>, entity_types: Option<Vec<String>>, capabilities: Option<Vec<String>>, fields: Option<Vec<String>>, limit: Option<usize>, fuzzy: bool, ) -> RedDBResult<DslQueryResult>

Source

pub fn search_context( &self, input: SearchContextInput, ) -> RedDBResult<ContextSearchResult>

Source

pub fn execute_ask( &self, raw_query: &str, ask: &AskQuery, ) -> RedDBResult<RuntimeQueryResult>

Execute an ASK query: AskPipeline funnel + LLM synthesis.

Issue #121: replaces the single broad search_context call with the four-stage AskPipeline::execute funnel (extract_tokensmatch_schemavector_search_scopedfilter_values). Prompt rendering goes through crate::runtime::ai::prompt_template::PromptTemplate so the caller question, schema-vocabulary candidates, and Stage 4 rows are slot-typed (issue #122 follow-up): injection detection runs on tenant-derived content, secrets are redacted before reaching the LLM, and the rendered messages can be peeled per provider tier downstream when richer drivers land.

Source§

impl RedDBRuntime

Source§

impl RedDBRuntime

Source

pub fn execute_create_tree( &self, raw_query: &str, query: &CreateTreeQuery, ) -> RedDBResult<RuntimeQueryResult>

Source

pub fn execute_drop_tree( &self, raw_query: &str, query: &DropTreeQuery, ) -> RedDBResult<RuntimeQueryResult>

Source

pub fn execute_tree_command( &self, raw_query: &str, command: &TreeCommand, ) -> RedDBResult<RuntimeQueryResult>

Source§

impl RedDBRuntime

Source

pub fn vcs_commit(&self, input: CreateCommitInput) -> RedDBResult<Commit>

Source

pub fn vcs_branch_create(&self, input: CreateBranchInput) -> RedDBResult<Ref>

Source

pub fn vcs_branch_delete(&self, name: &str) -> RedDBResult<()>

Source

pub fn vcs_tag_create(&self, input: CreateTagInput) -> RedDBResult<Ref>

Source

pub fn vcs_list_refs(&self, prefix: Option<&str>) -> RedDBResult<Vec<Ref>>

Source

pub fn vcs_checkout(&self, input: CheckoutInput) -> RedDBResult<Ref>

Source

pub fn vcs_merge(&self, input: MergeInput) -> RedDBResult<MergeOutcome>

Source

pub fn vcs_cherry_pick( &self, connection_id: u64, commit: &str, author: Author, ) -> RedDBResult<MergeOutcome>

Source

pub fn vcs_revert( &self, connection_id: u64, commit: &str, author: Author, ) -> RedDBResult<Commit>

Source

pub fn vcs_reset(&self, input: ResetInput) -> RedDBResult<()>

Source

pub fn vcs_log(&self, input: LogInput) -> RedDBResult<Vec<Commit>>

Source

pub fn vcs_diff(&self, input: DiffInput) -> RedDBResult<Diff>

Source

pub fn vcs_status(&self, input: StatusInput) -> RedDBResult<Status>

Source

pub fn vcs_lca(&self, a: &str, b: &str) -> RedDBResult<Option<CommitHash>>

Source

pub fn vcs_conflicts_list( &self, merge_state_id: &str, ) -> RedDBResult<Vec<Conflict>>

Source

pub fn vcs_conflict_resolve( &self, conflict_id: &str, _resolved: JsonValue, ) -> RedDBResult<()>

Source

pub fn vcs_resolve_as_of(&self, spec: AsOfSpec) -> RedDBResult<Xid>

Source

pub fn vcs_set_versioned( &self, collection: &str, enabled: bool, ) -> RedDBResult<()>

Source

pub fn vcs_list_versioned(&self) -> RedDBResult<Vec<String>>

Source

pub fn vcs_is_versioned(&self, collection: &str) -> RedDBResult<bool>

Source

pub fn vcs_resolve_commitish(&self, spec: &str) -> RedDBResult<CommitHash>

Trait Implementations§

Source§

impl Clone for RedDBRuntime

Source§

fn clone(&self) -> RedDBRuntime

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl HealthProvider for RedDBRuntime

Source§

impl RuntimeAdminPort for RedDBRuntime

Source§

fn set_index_enabled( &self, name: &str, enabled: bool, ) -> RedDBResult<PhysicalIndexState>

Source§

fn mark_index_building(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source§

fn fail_index(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source§

fn mark_index_stale(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source§

fn mark_index_ready(&self, name: &str) -> RedDBResult<PhysicalIndexState>

Source§

fn warmup_index_with_lifecycle( &self, name: &str, ) -> RedDBResult<PhysicalIndexState>

Source§

fn rebuild_indexes_with_lifecycle( &self, collection: Option<&str>, ) -> RedDBResult<Vec<PhysicalIndexState>>

Source§

fn save_graph_projection( &self, name: impl Into<String>, projection: RuntimeGraphProjection, source: Option<String>, ) -> RedDBResult<PhysicalGraphProjection>

Source§

fn mark_graph_projection_materializing( &self, name: &str, ) -> RedDBResult<PhysicalGraphProjection>

Source§

fn materialize_graph_projection( &self, name: &str, ) -> RedDBResult<PhysicalGraphProjection>

Source§

fn fail_graph_projection( &self, name: &str, ) -> RedDBResult<PhysicalGraphProjection>

Source§

fn mark_graph_projection_stale( &self, name: &str, ) -> RedDBResult<PhysicalGraphProjection>

Source§

fn save_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source§

fn start_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source§

fn queue_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source§

fn fail_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source§

fn mark_analytics_job_stale( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source§

fn complete_analytics_job( &self, kind: impl Into<String>, projection_name: Option<String>, metadata: BTreeMap<String, String>, ) -> RedDBResult<PhysicalAnalyticsJob>

Source§

impl RuntimeCatalogPort for RedDBRuntime

Source§

impl RuntimeEntityPort for RedDBRuntime

Source§

fn create_row(&self, input: CreateRowInput) -> RedDBResult<CreateEntityOutput>

Source§

fn create_rows_batch( &self, input: CreateRowsBatchInput, ) -> RedDBResult<Vec<CreateEntityOutput>>

Source§

fn create_rows_batch_prevalidated_columnar( &self, collection: String, column_names: Arc<Vec<String>>, rows: Vec<Vec<Value>>, ) -> RedDBResult<usize>

Columnar pre-validated bulk insert — the wire handler decoded straight into Vec<Vec<Value>> + a shared column- name vector, no per-cell (String, Value) tuples allocated. Avoids ~N×ncols String clones vs the tuple path. The schema is shared across every row as a single Arc<Vec<String>>.
Source§

fn create_rows_batch_columnar( &self, collection: String, column_names: Arc<Vec<String>>, rows: Vec<Vec<Value>>, ) -> RedDBResult<usize>

Columnar bulk insert with full contract validation — wire handler shape (one Arc<Vec<String>> schema shared across every row, Vec<Vec<Value>> row payload). Equivalent to create_rows_batch semantically but skips the per-row (String, Value) tuple materialisation in the wire decoder. When the collection has no contract (or no declared columns) fast-paths to create_rows_batch_prevalidated_columnar; otherwise falls back to the tuple path so contract normalisation can run.
Source§

fn create_rows_batch_prevalidated( &self, input: CreateRowsBatchInput, ) -> RedDBResult<usize>

Pre-validated bulk insert — caller has already checked column types and uniqueness. Server skips normalize_row_fields_for_contract, enforce_row_uniqueness, and enforce_row_batch_uniqueness. Returns the row count. Used by MSG_BULK_INSERT_PREVALIDATED.
Source§

fn create_node(&self, input: CreateNodeInput) -> RedDBResult<CreateEntityOutput>

Source§

fn create_edge(&self, input: CreateEdgeInput) -> RedDBResult<CreateEntityOutput>

Source§

fn create_vector( &self, input: CreateVectorInput, ) -> RedDBResult<CreateEntityOutput>

Source§

fn create_document( &self, input: CreateDocumentInput, ) -> RedDBResult<CreateEntityOutput>

Source§

fn create_kv(&self, input: CreateKvInput) -> RedDBResult<CreateEntityOutput>

Source§

fn create_timeseries_point( &self, input: CreateTimeSeriesPointInput, ) -> RedDBResult<CreateEntityOutput>

Source§

fn get_kv( &self, collection: &str, key: &str, ) -> RedDBResult<Option<(Value, EntityId)>>

Source§

fn delete_kv(&self, collection: &str, key: &str) -> RedDBResult<bool>

Source§

fn patch_entity( &self, input: PatchEntityInput, ) -> RedDBResult<CreateEntityOutput>

Source§

fn delete_entity( &self, input: DeleteEntityInput, ) -> RedDBResult<DeleteEntityOutput>

Source§

impl RuntimeGraphPort for RedDBRuntime

Source§

fn resolve_graph_projection( &self, name: Option<&str>, inline: Option<RuntimeGraphProjection>, ) -> RedDBResult<Option<RuntimeGraphProjection>>

Source§

fn graph_neighborhood( &self, node: &str, direction: RuntimeGraphDirection, max_depth: usize, edge_labels: Option<Vec<String>>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphNeighborhoodResult>

Source§

fn graph_traverse( &self, source: &str, direction: RuntimeGraphDirection, max_depth: usize, strategy: RuntimeGraphTraversalStrategy, edge_labels: Option<Vec<String>>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphTraversalResult>

Source§

fn graph_shortest_path( &self, source: &str, target: &str, direction: RuntimeGraphDirection, algorithm: RuntimeGraphPathAlgorithm, edge_labels: Option<Vec<String>>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphPathResult>

Source§

fn graph_components( &self, mode: RuntimeGraphComponentsMode, min_size: usize, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphComponentsResult>

Source§

fn graph_centrality( &self, algorithm: RuntimeGraphCentralityAlgorithm, top_k: usize, normalize: bool, max_iterations: Option<usize>, epsilon: Option<f64>, alpha: Option<f64>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphCentralityResult>

Source§

fn graph_communities( &self, algorithm: RuntimeGraphCommunityAlgorithm, min_size: usize, max_iterations: Option<usize>, resolution: Option<f64>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphCommunityResult>

Source§

fn graph_clustering( &self, top_k: usize, include_triangles: bool, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphClusteringResult>

Source§

fn graph_personalized_pagerank( &self, seeds: Vec<String>, top_k: usize, alpha: Option<f64>, epsilon: Option<f64>, max_iterations: Option<usize>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphCentralityResult>

Source§

fn graph_hits( &self, top_k: usize, epsilon: Option<f64>, max_iterations: Option<usize>, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphHitsResult>

Source§

fn graph_cycles( &self, max_length: usize, max_cycles: usize, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphCyclesResult>

Source§

fn graph_topological_sort( &self, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphTopologicalSortResult>

Source§

fn graph_properties( &self, projection: Option<RuntimeGraphProjection>, ) -> RedDBResult<RuntimeGraphPropertiesResult>

Source§

impl RuntimeNativePort for RedDBRuntime

Source§

fn health_report(&self) -> HealthReport

Source§

fn collection_roots(&self) -> RedDBResult<BTreeMap<String, u64>>

Source§

fn snapshots(&self) -> RedDBResult<Vec<SnapshotDescriptor>>

Source§

fn exports(&self) -> RedDBResult<Vec<ExportDescriptor>>

Source§

fn physical_metadata(&self) -> RedDBResult<PhysicalMetadataFile>

Source§

fn manifest_events_filtered( &self, collection: Option<&str>, kind: Option<&str>, since_snapshot: Option<u64>, ) -> RedDBResult<Vec<ManifestEvent>>

Source§

fn create_snapshot(&self) -> RedDBResult<SnapshotDescriptor>

Source§

fn create_export(&self, name: String) -> RedDBResult<ExportDescriptor>

Source§

fn checkpoint(&self) -> RedDBResult<()>

Source§

fn apply_retention_policy(&self) -> RedDBResult<()>

Source§

fn run_maintenance(&self) -> RedDBResult<()>

Source§

fn native_header(&self) -> RedDBResult<PhysicalFileHeader>

Source§

fn native_collection_roots(&self) -> RedDBResult<BTreeMap<String, u64>>

Source§

fn native_manifest_summary(&self) -> RedDBResult<NativeManifestSummary>

Source§

fn native_registry_summary(&self) -> RedDBResult<NativeRegistrySummary>

Source§

fn native_recovery_summary(&self) -> RedDBResult<NativeRecoverySummary>

Source§

fn native_catalog_summary(&self) -> RedDBResult<NativeCatalogSummary>

Source§

fn native_physical_state(&self) -> RedDBResult<NativePhysicalState>

Source§

fn native_vector_artifact_pages( &self, ) -> RedDBResult<Vec<NativeVectorArtifactPageSummary>>

Source§

fn inspect_native_vector_artifact( &self, collection: &str, artifact_kind: Option<&str>, ) -> RedDBResult<NativeVectorArtifactInspection>

Source§

fn warmup_native_vector_artifact( &self, collection: &str, artifact_kind: Option<&str>, ) -> RedDBResult<NativeVectorArtifactInspection>

Source§

fn inspect_native_vector_artifacts( &self, ) -> RedDBResult<NativeVectorArtifactBatchInspection>

Source§

fn warmup_native_vector_artifacts( &self, ) -> RedDBResult<NativeVectorArtifactBatchInspection>

Source§

fn native_header_repair_policy(&self) -> RedDBResult<String>

Source§

fn repair_native_header_from_metadata(&self) -> RedDBResult<String>

Source§

fn rebuild_physical_metadata_from_native_state(&self) -> RedDBResult<bool>

Source§

fn repair_native_physical_state_from_metadata(&self) -> RedDBResult<bool>

Source§

fn native_metadata_state_summary( &self, ) -> RedDBResult<NativeMetadataStateSummary>

Source§

fn physical_authority_status(&self) -> PhysicalAuthorityStatus

Source§

fn readiness_for_query(&self) -> bool

Source§

fn readiness_for_query_serverless(&self) -> bool

Source§

fn readiness_for_write(&self) -> bool

Source§

fn readiness_for_write_serverless(&self) -> bool

Source§

fn readiness_for_repair(&self) -> bool

Source§

fn readiness_for_repair_serverless(&self) -> bool

Source§

impl RuntimeQueryPort for RedDBRuntime

Source§

fn execute_query(&self, query: &str) -> RedDBResult<RuntimeQueryResult>

Source§

fn explain_query(&self, query: &str) -> RedDBResult<RuntimeQueryExplain>

Source§

fn scan_collection( &self, collection: &str, cursor: Option<ScanCursor>, limit: usize, ) -> RedDBResult<ScanPage>

Source§

fn search_similar( &self, collection: &str, vector: &[f32], k: usize, min_score: f32, ) -> RedDBResult<Vec<SimilarResult>>

Source§

fn search_ivf( &self, collection: &str, vector: &[f32], k: usize, n_lists: usize, n_probes: Option<usize>, ) -> RedDBResult<RuntimeIvfSearchResult>

Source§

fn search_hybrid( &self, vector: Option<Vec<f32>>, query: Option<String>, k: Option<usize>, collections: Option<Vec<String>>, entity_types: Option<Vec<String>>, capabilities: Option<Vec<String>>, graph_pattern: Option<RuntimeGraphPattern>, filters: Vec<RuntimeFilter>, weights: Option<RuntimeQueryWeights>, min_score: Option<f32>, limit: Option<usize>, ) -> RedDBResult<DslQueryResult>

Source§

fn search_text( &self, query: String, collections: Option<Vec<String>>, entity_types: Option<Vec<String>>, capabilities: Option<Vec<String>>, fields: Option<Vec<String>>, limit: Option<usize>, fuzzy: bool, ) -> RedDBResult<DslQueryResult>

Source§

fn search_multimodal( &self, query: String, collections: Option<Vec<String>>, entity_types: Option<Vec<String>>, capabilities: Option<Vec<String>>, limit: Option<usize>, ) -> RedDBResult<DslQueryResult>

Source§

fn search_index( &self, index: String, value: String, exact: bool, collections: Option<Vec<String>>, entity_types: Option<Vec<String>>, capabilities: Option<Vec<String>>, limit: Option<usize>, ) -> RedDBResult<DslQueryResult>

Source§

fn search_context( &self, input: SearchContextInput, ) -> RedDBResult<ContextSearchResult>

Source§

fn resolve_semantic_api_key(&self, provider: &AiProvider) -> RedDBResult<String>

Source§

impl RuntimeSchemaPort for RedDBRuntime

Source§

impl RuntimeTreePort for RedDBRuntime

Source§

impl RuntimeVcsPort for RedDBRuntime

Source§

fn vcs_commit(&self, input: CreateCommitInput) -> RedDBResult<Commit>

Source§

fn vcs_branch_create(&self, input: CreateBranchInput) -> RedDBResult<Ref>

Source§

fn vcs_branch_delete(&self, name: &str) -> RedDBResult<()>

Source§

fn vcs_tag_create(&self, input: CreateTagInput) -> RedDBResult<Ref>

Source§

fn vcs_list_refs(&self, prefix: Option<&str>) -> RedDBResult<Vec<Ref>>

Source§

fn vcs_checkout(&self, input: CheckoutInput) -> RedDBResult<Ref>

Source§

fn vcs_merge(&self, input: MergeInput) -> RedDBResult<MergeOutcome>

Source§

fn vcs_cherry_pick( &self, connection_id: u64, commit: &str, author: Author, ) -> RedDBResult<MergeOutcome>

Source§

fn vcs_revert( &self, connection_id: u64, commit: &str, author: Author, ) -> RedDBResult<Commit>

Source§

fn vcs_reset(&self, input: ResetInput) -> RedDBResult<()>

Source§

fn vcs_log(&self, input: LogInput) -> RedDBResult<Vec<Commit>>

Source§

fn vcs_diff(&self, input: DiffInput) -> RedDBResult<Diff>

Source§

fn vcs_status(&self, input: StatusInput) -> RedDBResult<Status>

Source§

fn vcs_lca(&self, a: &str, b: &str) -> RedDBResult<Option<CommitHash>>

Source§

fn vcs_conflicts_list(&self, merge_state_id: &str) -> RedDBResult<Vec<Conflict>>

Source§

fn vcs_conflict_resolve( &self, conflict_id: &str, resolved: JsonValue, ) -> RedDBResult<()>

Source§

fn vcs_resolve_as_of(&self, spec: AsOfSpec) -> RedDBResult<Xid>

Source§

fn vcs_resolve_commitish(&self, spec: &str) -> RedDBResult<CommitHash>

Source§

fn vcs_set_versioned(&self, collection: &str, enabled: bool) -> RedDBResult<()>

Source§

fn vcs_list_versioned(&self) -> RedDBResult<Vec<String>>

Source§

fn vcs_is_versioned(&self, collection: &str) -> RedDBResult<bool>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> RuntimeEntityPortCtx for T

Source§

impl<T> RuntimeNativePortCtx for T

Source§

impl<T> RuntimeQueryPortCtx for T
where T: RuntimeQueryPort + ?Sized,

Source§

impl<T> RuntimeSchemaPortCtx for T

Source§

impl<T> RuntimeTreePortCtx for T
where T: RuntimeTreePort + ?Sized,

Source§

impl<T> RuntimeVcsPortCtx for T
where T: RuntimeVcsPort + ?Sized,

Source§

fn vcs_branch_delete_ctx( &self, ctx: &OperationContext, name: &str, ) -> RedDBResult<()>

Source§

fn vcs_reset_ctx( &self, ctx: &OperationContext, input: ResetInput, ) -> RedDBResult<()>

Source§

fn vcs_set_versioned_ctx( &self, ctx: &OperationContext, collection: &str, enabled: bool, ) -> RedDBResult<()>

Source§

fn vcs_conflict_resolve_ctx( &self, ctx: &OperationContext, conflict_id: &str, resolved: Value, ) -> RedDBResult<()>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more