Skip to main content

Crate uqa_engine

Crate uqa_engine 

Source
Expand description

Top-level engine: a per-table DocumentStore + InvertedIndex pair, document mutation entry points, and a minimal search API for text-only round trips. Backed either by in-memory stores (Engine::new), the SQLite/SQLCipher constructors, or a swappable uqa_storage::PersistentStorageProvider; the operator pipeline is identical across backends.

§Public API surface

Construction:

Schema and table lifecycle:

Document mutation:

Querying:

Deep-model persistence:

Graph workspaces (used by the Cypher front-end and the graph_* SQL functions):

Result types (SQLResult, SQLParam) are re-exported from uqa-sql. Errors flow through EngineError, which wraps SQL and storage errors so callers only need to match one enum.

Modules§

functions
Register execution-owned extension contracts in the engine.
migration
Migration support for legacy UQA SQLite catalog directories.
operator_tree_bridge
Public Engine retrieval entry points and statement-boundary composition.
sql
SQL result formatting, type metadata and bounded cursors. SQL result formatting, PostgreSQL type metadata and bounded columnar cursors.

Structs§

AutomaticStatisticsStatus
Process-local health of the database’s automatic statistics worker. A failed refresh retains its durable pending state and is retried.
ColumnVector
A column vector preserves its position in the declared output schema.
ColumnarBatch
Column-oriented transfer batch. Physical operators may remain row-oriented internally; API consumers can process one bounded batch without retaining the complete result set or rebuilding columns themselves.
DiskANNMaintenanceCensus
Exact counts for the most recently completed index capture; later commits may already have changed its live corpus.
DiskANNMaintenanceStatus
Census progress is read-only. Evaluated writes increment pruning/rebuild counters only after confirmed completion.
DiskANNRebuildPolicy
Soft triggers for one index’s current uncovered documents or logical raw vector bytes. Neither limit is a write quota or a physical-retention limit.
Engine
Unified query engine composed from explicit storage, durable-catalog, session, extension, epoch, and query-runtime ownership domains.
FtsIndexStat
HybridSearchParams
Exact signed single-prior hybrid-search arguments. Keeps Engine::hybrid_search borrowing-friendly without an explosion of positional parameters.
NotificationSubscription
An idle listener independent of the query session that created it. Close every retained handle before replacing a database file.
NotificationSubscriptionError
A stable failure category with an original cause available only through explicit inspection.
NotificationSubscriptionOptions
Explicit limits for an owned listener. No deployment capacity is inferred from SQL work_mem.
NotificationSubscriptionPermit
One non-cloneable reservation against the original hub’s pending/live limit. Reserve before submitting registration to a runtime queue; dropping an unused permit releases capacity without provider I/O. A permit does not retain the Engine or register any channels.
RobustHybridSearchParams
Explicit robust-ranking variant of HybridSearchParams. This contract applies positive-evidence gating and confidence scaling rather than exact single-prior Bayesian evidence fusion.
SQLBatchError
An atomic batch failure with its original SQL error and, when known, zero-based member. Transaction begin, commit and rollback failures are not attributed to a member.
SQLCursor
Iterator over schema-ordered column batches backed by a work-mem-bounded SharedSpill. Dropping the cursor releases its temporary file. Positional conversion preserves separately-valued duplicate labels in ColumnarBatch.
SQLCursorSummary
Metadata known before a cursor is consumed.
SQLFunctionOptions
Execution properties declared for a Rust-backed SQL callback.
SQLNotice
A notice that a statement reports without failing, as PostgreSQL’s ereport sends one below ERROR: its level, SQLSTATE and primary message, and the detail and hint that clients receive as fields of their own.
SQLNotification
One committed SQL notification waiting for this session.
SQLNotificationOptions
Opt-in bounds for the SQL session’s own LISTEN queue. Overflow is terminal and explicit. Queue bytes include string capacities, queue slots and transient prepared batches.
SQLResult
SQLTableFunctionResult
Result shape returned by a registered SQL table function.
SQLTableFunctionStream
Pull-based result returned by a registered SQL table function.
SQLiteCompressionOptions
ScoredEntry
SequenceState
Mutable state of a single SQL sequence.
TextSearchProfile
Observable work counters for one text top-k execution.

Enums§

DatabaseFileFormat
On-disk format of a database file, detected from its header bytes.
DiskANNMaintenancePhase
EngineError
NoticeLevel
The level of a notice, as PostgreSQL names its message levels below ERROR, in increasing order of severity.
NotificationWait
A bounded wait ending with one value, elapsed receive time, or explicit closure.
SQLFunctionVolatility
IMMUTABLE / STABLE / VOLATILE marker.
SQLParam
Value bound to a $N placeholder.
SQLiteError
ScoringMode
Scoring strategy for a text retrieval leaf.
SequenceBound
ALTER SEQUENCE bound action, distinguishing omission from NO MINVALUE or NO MAXVALUE.
SequenceDataType
SequenceRestart
Physical restart action carried by ALTER SEQUENCE.
TextSearchAlgorithm
Algorithm that actually produced a text-search result.

Traits§

AsyncSQLEngine
Common asynchronous SQL interface implemented by embedded and HTTP engines.
SQLAggregateFunction
Factory for per-group SQL aggregate state.
SQLAggregateState
Per-group state for a registered SQL aggregate function.
SQLScalarFunction
Rust implementation of a scalar SQL function.
SQLTableFunction
Rust implementation of a SQL table function used in FROM.

Type Aliases§

EngineResult