Skip to main content

Engine

Struct Engine 

Source
pub struct Engine { /* private fields */ }
Expand description

Unified query engine composed from explicit storage, durable-catalog, session, extension, epoch, and query-runtime ownership domains.

Implementations§

Source§

impl Engine

Source

pub fn sql_simple_query( &self, query: &str, params: &[SQLParam], consume: impl FnMut(&SQLResult) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Execute a simple-query message, delivering each statement’s result in order. The whole message is parsed before execution, and implicit transaction segments retain the same boundaries as Engine::sql. The final result is delivered only after its implicit transaction has committed. Earlier results may have been delivered when a later statement fails; such failure still rolls back its implicit segment. An empty message delivers one result with no command completion.

Source

pub fn sql( &self, query: &str, params: &[SQLParam], ) -> Result<SQLResult, SQLError>

Execute a complete SQL message and return its final result. Multiple statements retain their native implicit transaction segments and explicit transaction boundaries; an empty message returns an empty result without a command tag.

Source

pub fn sql_cursor( &self, query: &str, params: &[SQLParam], ) -> Result<SQLCursor, SQLError>

Execute one read query into a bounded spill and return a columnar batch cursor. Unlike Engine::sql, this path never retains the complete result as Vec<ResultRow> in memory. The statement finishes and its snapshot is committed before the cursor is returned.

Source

pub fn sql_columnar( &self, query: &str, params: &[SQLParam], consume: impl FnMut(ColumnarBatch) -> Result<(), SQLError>, ) -> Result<SQLCursorSummary, SQLError>

Consume the bounded cursor synchronously without retaining batches.

Source§

impl Engine

Source

pub fn register_named_analyzer( &self, name: &str, config_json: &str, ) -> Result<(), String>

Source

pub fn analyze_text(&self, name: &str, input: &str) -> Result<Value, String>

Analyze one input with a resolved revision and return the SQL diagnostic object.

Source

pub fn drop_named_analyzer(&self, name: &str) -> Result<bool, String>

Source

pub fn list_named_analyzers(&self) -> Result<Vec<String>, String>

Source

pub fn set_table_field_analyzer( &self, table: &str, field: &str, analyzer_name: &str, phase: &str, ) -> Result<(), String>

Source

pub fn table_field_analyzer( &self, table: &str, field: &str, ) -> Result<Option<(String, String)>, String>

Source

pub fn create_analyzer( &self, name: &str, config_json: &str, ) -> Result<(), String>

compatibility alias for Engine::register_named_analyzer.

Source

pub fn drop_analyzer(&self, name: &str) -> Result<bool, String>

compatibility alias for Engine::drop_named_analyzer.

Source

pub fn set_table_analyzer( &self, table: &str, field: &str, analyzer_name: &str, phase: &str, ) -> Result<(), String>

compatibility alias for Engine::set_table_field_analyzer.

Source

pub fn get_table_analyzer( &self, table: &str, field: &str, phase: &str, ) -> Result<Option<String>, String>

Resolve the analyzer assigned to (table, field) for the given phase. phase is "index", "search", or "both". Returns the exact bound configuration JSON. both requires the same named revision on both sides; an unnamed default has no explicit assignment to return.

Source§

impl Engine

Source

pub fn cancel(&self)

Source

pub fn reset_cancellation(&self)

Reset the cancellation flag so subsequent queries run normally. Call between query batches when reusing the same engine for many cancellable executions.

Source

pub fn cancellation_token(&self) -> CancellationToken

Source

pub fn cancel_token(&self) -> CancellationToken

compatibility alias for Engine::cancellation_token.

Source

pub fn is_cancelled(&self) -> bool

Source§

impl Engine

Source

pub fn register_view( &self, name: &str, body: SelectStmt, ) -> Result<(), SQLError>

Source§

impl Engine

Source

pub fn render_enum_labels(&self, result: &mut SQLResult) -> Result<(), SQLError>

Replace the enum values of a query result by their current labels, as PostgreSQL clients receive them from the type’s output function. Declared column types keep the enum type.

§Errors

Returns an error when a result value names an enum type or label that this session’s catalog no longer contains.

Source§

impl Engine

Source

pub fn drop_view(&self, name: &str) -> Result<bool, SQLError>

Source§

impl Engine

Source

pub fn drop_sequence(&self, name: &str) -> Result<bool, String>

Source§

impl Engine

Source

pub fn nextval(&self, name: &str) -> Result<i64, String>

Source

pub fn currval(&self, name: &str) -> Result<i64, String>

Source

pub fn lastval(&self) -> Result<i64, String>

Source

pub fn setval(&self, name: &str, value: i64) -> Result<i64, String>

Source

pub fn setval_with_is_called( &self, name: &str, value: i64, is_called: bool, ) -> Result<i64, String>

Source§

impl Engine

Source

pub fn register_catalog_index( &self, name: &str, index_type: &str, table: &str, columns: &[String], options: &[(String, String)], ) -> StorageBackendResult<()>

Source

pub fn drop_catalog_index( &self, name: &str, ) -> StorageBackendResult<Option<CatalogIndexRow>>

Source

pub fn catalog_index( &self, name: &str, ) -> StorageBackendResult<Option<CatalogIndexRow>>

Source

pub fn has_catalog_index(&self, name: &str) -> StorageBackendResult<bool>

Source§

impl Engine

Source

pub fn register_foreign_server( &self, name: String, fdw_type: String, options: Vec<(String, String)>, if_not_exists: bool, ) -> Result<(), String>

Source

pub fn register_foreign_table( &self, name: String, server_name: String, columns: Vec<ColumnDef>, options: Vec<(String, String)>, if_not_exists: bool, ) -> Result<(), String>

Source

pub fn drop_foreign_server(&self, name: &str) -> Result<bool, String>

Source

pub fn drop_foreign_table(&self, name: &str) -> Result<bool, String>

Source

pub fn foreign_server_definition( &self, name: &str, ) -> Result<Option<ForeignServerDefinition>, String>

Read the retained SQL server definition without requiring a source handler.

Source

pub fn foreign_table_definition( &self, name: &str, ) -> Result<Option<StoredForeignTable>, String>

Read the complete retained SQL table definition without requiring a source handler.

Source

pub fn foreign_server( &self, name: &str, ) -> Result<Option<ForeignServer>, String>

Source

pub fn foreign_table(&self, name: &str) -> Result<Option<ForeignTable>, String>

Source

pub fn list_foreign_servers(&self) -> Result<Vec<String>, String>

Source

pub fn list_foreign_tables(&self) -> Result<Vec<String>, String>

Source

pub fn foreign_table_columns(&self, table: &str) -> Result<Vec<String>, String>

Source

pub fn load_memory_foreign_table( &self, table_name: impl Into<String>, rows: Vec<Row>, ) -> Result<(), String>

Source§

impl Engine

Source

pub fn fts_index_stats( &self, table_filter: Option<&str>, ) -> Result<Vec<FtsIndexStat>, SQLError>

Source

pub fn add_document( &self, table: &str, doc_id: DocId, document: Document, ) -> Result<(), SQLError>

Source§

impl Engine

Source

pub fn create_graph( &self, name: impl Into<String>, ) -> StorageBackendResult<bool>

Source

pub fn drop_graph(&self, name: &str) -> StorageBackendResult<bool>

Drop a named graph. No-op when the graph is missing.

Source

pub fn list_graphs(&self) -> StorageBackendResult<Vec<String>>

Return every named graph registered on this engine in sorted order.

Source

pub fn has_graph(&self, name: &str) -> StorageBackendResult<bool>

Return true when a graph with name is registered.

Source

pub fn graph_label_catalog( &self, ) -> StorageBackendResult<Vec<(String, Vec<GraphLabelInfo>)>>

Every named graph with its ag_label entries, read under one catalog lock so catalog relations that mirror graphs do not re-read the registry once per graph.

Source

pub fn list_graph_labels( &self, graph: &str, ) -> StorageBackendResult<Option<Vec<GraphLabelInfo>>>

The surviving ag_label entries of a named graph in label-id order. None when the graph does not exist.

Source

pub fn create_graph_label( &self, graph: &str, label: &str, kind: LabelKind, ) -> StorageBackendResult<bool>

Register an empty vertex or edge label in a named graph (create_vlabel / create_elabel). Returns false when a label of that name already exists in the graph and fails when the graph does not exist.

Source

pub fn drop_graph_label( &self, graph: &str, label: &str, ) -> StorageBackendResult<bool>

Drop a label and every entity carrying it from a named graph (drop_label). Incident edge rows survive vertex-label removal like AGE’s DROP TABLE. Returns false when the label is not registered and fails when the graph does not exist.

Source

pub fn rename_graph(&self, from: &str, to: &str) -> StorageBackendResult<bool>

Rename a named graph (alter_graph(..., 'RENAME', ...)). Returns false when from does not exist and fails when to is already a graph.

Source

pub fn add_graph_vertex( &self, vertex: Vertex, graph: &str, ) -> StorageBackendResult<()>

Insert a vertex into a named graph, creating the graph if needed.

Source

pub fn add_graph_edge( &self, edge: Edge, graph: &str, ) -> StorageBackendResult<()>

Insert an edge into a named graph, creating the graph if needed.

Source

pub fn apply_graph_delta( &self, graph: &str, delta: &GraphDelta, ) -> StorageBackendResult<()>

Apply a uqa_graph::GraphDelta to a named graph as one atomic batch of vertex and edge additions or removals.

Source

pub fn build_path_index( &self, name: &str, graph: &str, label_sequences: &[Vec<String>], ) -> StorageBackendResult<bool>

Build (or replace) a path index for graph keyed by name. label_sequences is the set of label sequences to materialize; each sequence becomes a hash-friendly direct lookup for RPQ.

Source

pub fn drop_path_index( &self, name: &str, graph: &str, ) -> StorageBackendResult<bool>

Drop a path index by (graph, name). Return true when one existed.

Source

pub fn get_path_index( &self, name: &str, graph: &str, ) -> StorageBackendResult<Option<PathIndex>>

Look up a path index by (graph, name). Return a clone so the caller is not tied to the engine’s lock.

Source

pub fn list_path_indexes(&self) -> StorageBackendResult<Vec<String>>

Sorted list of registered path index keys. Each key has the shape <graph>::<name> so the caller can split as needed.

Source

pub fn graph_with<R>( &self, name: &str, f: impl FnOnce(&GraphStoreHandle) -> R, ) -> StorageBackendResult<Option<R>>

Read-only borrow of a named graph for ad-hoc query construction outside the SQL function path. Returns None when the graph is unknown.

Source

pub fn graph_with_mut<R>( &self, name: &str, f: impl FnOnce(&mut GraphStoreHandle) -> GraphStoreResult<R>, ) -> StorageBackendResult<Option<R>>

Mutable borrow of a named graph for vertex / edge insertion.

Source

pub fn run_cypher( &self, graph: &str, query: &str, params: BTreeMap<String, Value>, ) -> Result<(Vec<String>, Vec<ResultRow>), CypherError>

Run a Cypher query against a named graph and return the (columns, rows) projected by the query’s RETURN clause (or empty vectors when the query has no RETURN).

This wires the full CREATE / MERGE / SET / DELETE / UNWIND surface through to the selected storage backend. The named graph is auto-created on first use.

Source§

impl Engine

Source

pub fn save_model(&self, name: &str, model: &DeepModel) -> Result<(), SQLError>

Source

pub fn load_model(&self, name: &str) -> Result<Option<DeepModel>, SQLError>

Source

pub fn drop_model(&self, name: &str) -> Result<bool, SQLError>

Source

pub fn delete_model(&self, name: &str) -> Result<bool, SQLError>

compatibility alias for Engine::drop_model.

Source

pub fn deep_learn( &self, name: &str, training_set: &TrainingSet, options: &LearnOptions, ) -> Result<DeepLearnOutput, SQLError>

Train an analytical deep model and persist it under name.

Source

pub fn deep_learn_json( &self, name: &str, training_json: &str, options: &LearnOptions, ) -> Result<DeepLearnOutput, SQLError>

Parse a JSON TrainingSet, train it, and persist the model.

Source

pub fn deep_learn_table( &self, name: &str, table: &str, options: &LearnOptions, ) -> Result<DeepLearnOutput, SQLError>

Train from a table containing features and label columns.

Source

pub fn save_scoring_params( &self, name: &str, params_json: &str, ) -> Result<(), SQLError>

Persist Bayesian calibration parameters for a named signal. The Parameters arrive serialized as JSON so callers can persist arbitrary (alpha, beta, base_rate, ...) shapes without a fixed struct.

Source

pub fn load_scoring_params( &self, name: &str, ) -> Result<Option<String>, SQLError>

Load persisted scoring parameters for a single signal. Falls back to the in-memory cache when the engine is not catalog-backed.

Source

pub fn try_load_scoring_params( &self, name: &str, ) -> Result<Option<String>, SQLError>

Fallible scoring-parameter read. Persistent sessions consult their own catalog connection instead of trusting an engine-local snapshot; this preserves transaction isolation and makes commits from sibling sessions visible without reopening the engine.

Source

pub fn load_all_scoring_params(&self) -> Result<Vec<(String, String)>, SQLError>

Snapshot every persisted (name, params_json) pair.

Source

pub fn drop_scoring_params(&self, name: &str) -> Result<bool, SQLError>

Drop persisted scoring parameters for a single signal. Returns true when something was removed.

Source

pub fn save_vector_calibration_model( &self, name: &str, model: &VectorCalibrationModel, ) -> Result<(), SQLError>

Persist a typed vector-calibration model, including the corpus, index, embedding-model, candidate-K, and version provenance that constrains its safe reuse.

Source

pub fn load_vector_calibration_model( &self, name: &str, ) -> Result<Option<VectorCalibrationModel>, SQLError>

Load and validate a persisted vector-calibration model. Unsupported schema versions and invalid numeric parameters are errors rather than silently falling back to query-pool calibration.

Source

pub fn drop_vector_calibration_model( &self, name: &str, ) -> Result<bool, SQLError>

Source

pub fn deep_predict( &self, name: &str, ) -> Result<Option<Vec<(DocId, f64)>>, SQLError>

Run saved-model inference through the shared operator optimizer and plan executor. A missing model retains the public API’s None contract; the physical driver only receives known models.

Source

pub fn deep_predict_features( &self, name: &str, examples: &[(DocId, Vec<f64>)], ) -> Result<Vec<(DocId, f64)>, SQLError>

Source§

impl Engine

Source

pub fn configure_sql_notifications( &self, options: SQLNotificationOptions, ) -> Result<(), NotificationSubscriptionError>

Configure bounded LISTEN delivery once, before opening a transaction or listening. This does not create another session, change channels or execute SQL. The adapter must use try_take_sql_notifications or try_take_sql_notification_with and close this session on a terminal error.

Source

pub fn try_take_sql_notifications( &self, ) -> Result<Vec<SQLNotification>, SQLError>

Synchronize committed messages and atomically drain the same SQL session’s inbox. Transactional LISTEN, UNLISTEN, NOTIFY and savepoint semantics remain unchanged. An overflow or source failure remains terminal; no lost message is called success.

Source

pub fn try_take_sql_notification_with<T, E>( &self, prepare: impl FnOnce(&SQLNotification) -> Result<T, E>, ) -> Result<NotificationReceive<T>, E>

Receive one event from a configured bounded SQL LISTEN inbox, admitting its destination before dequeue. The ordinary SQL transaction deferral and cross-process synchronization remain native. prepare follows NotificationSubscription::poll_with’s no-reentry contract. A source failure remains terminal in this inbox; admission failures do not consume it.

Source§

impl Engine

Source

pub fn require_notification_subscriptions(&self) -> Result<(), SQLError>

Require independently owned subscriptions instead of SQL LISTEN/UNLISTEN for this session and subsequently created sibling sessions. Stateless SQL hosts must enable this before serving requests. NOTIFY and pg_notify retain their transactional behavior.

This is irreversible for the session and survives rollback, DISCARD and nested execution. Enabling it fails with SQLSTATE 55000 during SQL execution, inside a transaction or while SQL channels are registered. Repeated calls after successful configuration are harmless. Independently owned subscription handles are unaffected.

Source§

impl Engine

Source

pub fn subscribe_notifications( &self, channels: &[&str], options: NotificationSubscriptionOptions, ) -> Result<NotificationSubscription, NotificationSubscriptionError>

Register one independent idle listener before returning a ready handle. Channels are exact, unique, nonempty UTF-8 names of at most 63 bytes; no identifier folding or truncation is performed. The caller’s transaction and low-level SQL listener remain independent.

Registration and close can perform native provider I/O. Runtime adapters must run them outside their event-loop worker. Polling never performs I/O; a wait timeout does not unsubscribe.

Source

pub fn subscribe_notifications_with_cancellation( &self, channels: &[&str], options: NotificationSubscriptionOptions, cancellation: &CancellationToken, ) -> Result<NotificationSubscription, NotificationSubscriptionError>

Register with independent caller cancellation through statement, hub and native registry waits. A pending registration already owns subscription capacity. Cancellation before the committed registration boundary returns Cancelled without publishing a partial listener; successful readiness wins a simultaneous cancellation race.

The signal applies to registration only. After readiness the handle retains its independent lifetime until close/drop. Native file opening and provider-session construction already in progress remain synchronous; this method does not establish an operating-system I/O deadline.

Source

pub fn reserve_notification_subscription( &self, options: NotificationSubscriptionOptions, cancellation: &CancellationToken, ) -> Result<NotificationSubscriptionPermit, NotificationSubscriptionError>

Reserve the original hub’s shared pending/live allowance without waiting on Engine or provider gates. Runtime adapters must retain this Engine separately and obtain the permit before submitting work. The cancellation token applies to this reservation call; the consuming registration accepts its own retained signal.

Source

pub fn subscribe_notifications_with_permit( &self, channels: &[&str], permit: NotificationSubscriptionPermit, cancellation: &CancellationToken, ) -> Result<NotificationSubscription, NotificationSubscriptionError>

Consume one pre-submission reservation on its original hub. The permit fixes every limit and cannot be reused or transferred to another database identity. Invalid input, cancellation or failure releases it; readiness transfers that same permit to the listener through completed cleanup.

Source§

impl Engine

Source

pub fn backend_process_id(&self) -> i32

PostgreSQL-compatible backend process identifier for this logical SQL session.

Source

pub fn poll_sql_notifications(&self) -> Result<usize, SQLError>

Pull committed cross-process messages into this session without draining them.

Source

pub fn wait_for_sql_notifications( &self, timeout: Duration, ) -> Result<bool, SQLError>

Wait until at least one committed notification is ready for this idle SQL session or the timeout elapses.

Source

pub fn take_sql_notifications(&self) -> Vec<SQLNotification>

Drain committed notifications available to this SQL session. Notifications received during a transaction remain queued until that transaction ends.

Source§

impl Engine

Source

pub fn new_session_for_user(&self, user: &str) -> Result<Self, SQLError>

Open an independent session for a role authenticated by the embedding host. This checks role existence, LOGIN, and database CONNECT privileges; credential verification and connection limits belong to the host’s connection manager.

Source§

impl Engine

Source

pub fn new() -> Self

In-memory engine. State lives only as long as this Engine.

Source

pub fn open(path: &Path) -> Result<Self, SQLiteError>

Source

pub fn detect_database_file(path: &Path) -> Result<DatabaseFileFormat>

Classify the on-disk format of path without opening it: plain SQLite, UQA compressed container (with its encryption flag), a missing/empty file, or an unrecognized header (SQLCipher databases fall here because SQLCipher encrypts the whole file).

Source

pub fn open_auto(path: &Path, key: Option<&str>) -> Result<Self, SQLiteError>

Open path with the variant its on-disk format calls for.

  • Missing/empty file: creates a new database, SQLCipher encrypted when key is provided, plaintext otherwise.
  • Plain SQLite: opens plaintext; providing a key is an error (SQLiteError::NotEncrypted) rather than a silent no-op so callers never believe an unencrypted database is protected.
  • Compressed container: opens with the codec recorded in the container header; the encryption flag decides whether key is required (SQLiteError::EncryptionKeyRequired) or rejected (SQLiteError::NotEncrypted).
  • Unrecognized header: treated as SQLCipher when key is provided; without a key this fails with SQLiteError::EncryptionKeyRequired because an encrypted database cannot be told apart from a foreign file.

New compressed containers are not created through this entry point; use Engine::open_compressed or Engine::open_compressed_encrypted to choose compression for a new database.

Source

pub fn open_encrypted(path: &Path, key: &str) -> Result<Self, SQLiteError>

SQLCipher-backed engine. Applies key before any catalog access, runs migrations, and rebuilds the in-memory table registry from the encrypted catalog.

Source

pub fn open_compressed( path: &Path, compression: SQLiteCompressionOptions, ) -> Result<Self, SQLiteError>

Compressed SQLite-backed engine. The compression VFS is schema-neutral: it compresses SQLite byte ranges in chunks without knowledge of UQA catalog tables or columns.

Source

pub fn open_compressed_encrypted( path: &Path, key: &str, compression: SQLiteCompressionOptions, ) -> Result<Self, SQLiteError>

Compressed and encrypted SQLite-backed engine. Chunk payloads are compressed first, then encrypted by the compressed VFS. The v2 format authenticates container metadata, chunk placement, and commit records, but cannot distinguish replacement by an internally valid snapshot or fork without an external trusted state anchor. Security-sensitive deployments that do not require compression should prefer Engine::open_encrypted and SQLCipher.

Source

pub fn open_compressed_encrypted_with_anchor( path: &Path, key: &str, compression: SQLiteCompressionOptions, trusted_anchor: SQLiteCompressedContainerAnchor, ) -> Result<Self, SQLiteError>

Open an encrypted compressed database and reject a different file or any state other than trusted_anchor before SQLite reads the main database. Refresh the trusted anchor after every committed write.

Source

pub fn compressed_container_anchor( path: &Path, key: &str, ) -> Result<SQLiteCompressedContainerAnchor, SQLiteError>

Authenticate and return the anchor to persist in a trusted store after committed writes to an encrypted compressed database.

Source

pub fn new_session(&self) -> StorageBackendResult<Self>

Create an independent SQL session over this engine’s durable database.

The new session gets its own catalog/backend pair, transaction stack, runtime variables, prepared statements, statement cache, and cancellation token. Committed catalog definitions share immutable allocations; mutations detach the session’s copy and synchronize through shared epochs. Runtime-only Rust extensions are shared. The provider must return catalog and data handles bound to one session transaction so every durable mutation commits atomically.

Source

pub fn shares_database_with(&self, other: &Self) -> bool

Whether these sessions use the same database identity. This reuses the provider-identified coordinator shared by independent opens and sibling sessions; memory engines have independent identities. Providers without stable storage identity can share only through their retained provider or backend owner.

Source

pub fn from_persistent_provider( provider: Arc<dyn PersistentStorageProvider>, ) -> StorageBackendResult<Self>

Build an engine and retain the provider used to create future independent sessions.

Source

pub fn from_persistent_backends( catalog: Arc<dyn CatalogFacade>, backend: Arc<dyn PersistentStorageBackend>, ) -> StorageBackendResult<Self>

Build an engine from already-open persistent metadata and data backends. The backend’s session factory is retained for independent SQL sessions and latest-committed row-lock rechecks. Prefer Self::from_persistent_provider when a database-level owner is already available.

Source§

impl Engine

Source

pub fn create_range_parameter_with_control( &self, type_name: &str, bounds: RangeParameterBounds<'_>, control: &ProductionControl<'_>, ) -> Result<Produced<SQLParam>, SQLError>

Construct typed range bounds with the native statement scope; SQL owns endpoint conversion and Execution invokes selected catalog support.

Source

pub fn create_multirange_parameter_with_control( &self, type_name: &str, members: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<Produced<SQLParam>, SQLError>

Normalize typed range members and validate an enclosing domain in the native statement scope.

Source

pub fn create_record_parameter_with_control( &self, type_name: &str, fields: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<Produced<SQLParam>, SQLError>

Construct a typed host record in the native statement scope. SQL owns attribute selection, source binding, scalar casts and domain checks.

Source

pub fn create_array_parameter_with_control( &self, type_name: &str, dimensions: &[usize], lower_bounds: &[i32], elements: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<Produced<SQLParam>, SQLError>

Construct a typed host array in the session’s native statement/catalog scope. SQL owns parameter identities, scalar conversion, dimensions and domain constraints.

Source

pub fn create_typed_parameter_with_control( &self, type_name: &str, text: Option<&str>, control: &ProductionControl<'_>, ) -> Result<Produced<SQLParam>, SQLError>

Create a typed parameter from external text, or a typed SQL NULL from None. Type input runs with the session’s current catalog, privileges and presentation settings. Domain checks and input callbacks share native transaction admission, commit and failure recovery; the returned parameter retains the supplied production allowance.

Source§

impl Engine

Source

pub fn prepare_statement( &self, sql: &str, declared: &[ColumnType], ) -> Result<PreparedStatement, SQLError>

Prepare native SQL with optional explicit parameter declarations. Definitions survive transaction rollback and are removed by finalize, DEALLOCATE or DISCARD ALL.

Source

pub fn validate_prepared_statement( &self, statement: &PreparedStatement, ) -> Result<(), SQLError>

Source

pub fn describe_prepared_statement( &self, statement: &PreparedStatement, ) -> Result<PreparedStatementDescription, SQLError>

Source

pub fn execute_prepared_statement( &self, statement: &PreparedStatement, params: &[SQLParam], ) -> Result<SQLResult, SQLError>

Source

pub fn finalize_prepared_statement(&self, statement: &PreparedStatement)

An invalidated handle is harmless to release and cannot remove a replacement definition.

Source

pub fn register_prepared( &self, name: String, definition: Statement, ) -> Result<(), SQLError>

Source

pub fn lookup_prepared(&self, name: &str) -> Option<SharedExecutablePlan>

Retain the current generic executable, or its analyzed input before planning, without copying the plan tree.

Source

pub fn deallocate_prepared(&self, name: Option<&str>)

Source§

impl Engine

Source

pub fn bayesian_params_for( &self, table: &str, field: &str, ) -> Result<BayesianBM25Params, SQLError>

Resolve the Bayesian BM25 calibration for table.field.

Saved parameters win. Absent or stale auto-estimated parameters trigger a corpus-driven estimation. Writable transactions persist it for subsequent queries; read-only transactions use it without publication. The raw-score identity calibration (alpha = 1, beta = 0) never silently ships a score for a populated field. Parameters written by the online learner carry no estimated_doc_count stamp and are never overwritten automatically.

Source§

impl Engine

Exact single-prior hybrid retrieval under cross-modal conditional independence. Query-level Bayesian BM25 and query-pool-transformed KNN emit signed prior-free evidence, the evidence logits add without gating or confidence scaling, and the resolved corpus relevance prior enters exactly once. Returns the top-top_k entries by descending posterior score.

Explicit robust positive-evidence hybrid ranking. This method applies Softplus gating, confidence scaling, and adaptive query-pool weights; its output is a bounded ranking heuristic rather than the exact single-prior posterior returned by Self::hybrid_search.

Source§

impl Engine

Source

pub fn learn_scoring_params( &self, table: &str, field: &str, query: &str, labels: &[u8], ) -> Result<BTreeMap<String, f64>, SQLError>

Source

pub fn estimate_scoring_params( &self, table: &str, field: &str, n_samples: usize, tokens_per_query: usize, seed: i64, ) -> Result<BTreeMap<String, f64>, SQLError>

Estimate and persist an unsupervised BM25 score transform from a field’s indexed vocabulary and raw score distribution.

Source

pub fn update_scoring_params( &self, table: &str, field: &str, score: f64, label: u8, ) -> Result<(), SQLError>

Source§

impl Engine

Source

pub fn search( &self, table: &str, field: &str, query: &str, mode: &ScoringMode, top_k: usize, ) -> Result<Vec<ScoredEntry>, SQLError>

Run a text query through the shared operator optimizer and executor.

Source

pub fn search_profiled( &self, table: &str, field: &str, query: &str, mode: &ScoringMode, top_k: usize, ) -> Result<TextSearchProfile, SQLError>

Run the same planner-selected physical text path as Self::search while returning exact candidate/skip counters for benchmarks and production diagnostics.

Source

pub fn calibration_report( &self, table: &str, field: &str, query: &str, labels: &[u8], ) -> Result<CalibrationReport, SQLError>

Compute calibration diagnostics for a Bayesian BM25 query against every document in table, aligned to labels in ascending document-id order.

Source§

impl Engine

Source

pub fn rebuild_text_block_max( &self, table: &str, field: &str, mode: &ScoringMode, ) -> Result<bool, SQLError>

Materialize scorer-versioned block bounds for one text field. SQLite persists them across reopen; when a backend returns false, execution falls back from the planned BMW strategy to exact WAND.

Source§

impl Engine

Top-k nearest neighbors through the shared operator optimizer and executor.

Source

pub fn diskann_calibration_target( &self, table: &str, field: &str, embedding_model_id: &str, embedding_model_version: &str, candidate_k: usize, ) -> Result<VectorCalibrationTarget, SQLError>

Obtain the actual DiskANN corpus and physical-generation versions for fitting a fixed calibration model. Embedding identity remains the caller’s contract. This metadata read does not execute KNN or register a serializable vector predicate.

Source

pub fn calibrated_vector_search_with_model( &self, table: &str, field: &str, query_vector: impl AsRef<[f32]>, model: &VectorCalibrationModel, target: &VectorCalibrationTarget, ) -> Result<Vec<ScoredEntry>, SQLError>

Apply a persisted/offline vector calibration model to a KNN pool.

Unlike calibrated_vector_match, this path never fits parameters from the current query’s top-K results. The target must match the model provenance, physical table/field, index kind, dimensions and candidate K. For DiskANN, obtain actual corpus/generation versions with Self::diskann_calibration_target; execution revalidates them against the same retained index used for KNN. Embedding identity and other index methods’ version labels remain explicit caller contracts.

All documents whose cosine similarity to query_vector is at least threshold.

Source§

impl Engine

Source

pub fn create_sequence( &self, name: &str, start: i64, increment: i64, if_not_exists: bool, ) -> Result<bool, String>

Source

pub fn alter_sequence( &self, name: &str, restart: Option<Option<i64>>, increment: Option<i64>, start: Option<i64>, ) -> Result<(), String>

Compatibility wrapper for the original direct API. SQL lowering and all internal execution use SequenceRestart instead.

Source

pub fn try_sequences_snapshot( &self, ) -> StorageBackendResult<BTreeMap<String, SequenceState>>

Snapshot of all registered sequences as (name, state) pairs.

Source

pub fn sequences_snapshot( &self, ) -> StorageBackendResult<BTreeMap<String, SequenceState>>

Source

pub fn sequence_state( &self, name: &str, ) -> StorageBackendResult<Option<(String, SequenceState)>>

Resolve a sequence name through the current search_path and return its canonical name with the current state.

Source§

impl Engine

Source

pub fn run_analyze(&self, table: Option<&str>) -> StorageBackendResult<()>

Refresh per-column statistics for one table, or every table when table is None. The analysis scans each document and collects per- column distinct count / null count / min / max / equi-depth histogram (100 buckets) / MCV list (top 10 above-average frequency), and stores the result on the per-table state so the cardinality estimator can read it on subsequent queries.

Source

pub fn column_stats( &self, table: &str, ) -> StorageBackendResult<BTreeMap<String, ColumnStats>>

Snapshot of the cardinality estimator’s per-column statistics for table. Clean statistics are reused, including sampled scalar statistics from automatic maintenance. Dirty stats are recomputed through the same durable transaction boundary as ANALYZE. Use run_analyze to force full collection regardless of cached statistics. Persistent query planning only consumes already-collected statistics.

Source

pub fn try_column_stats( &self, table: &str, ) -> StorageBackendResult<BTreeMap<String, ColumnStats>>

Source§

impl Engine

Source

pub fn list_catalog_indexes(&self) -> StorageBackendResult<Vec<CatalogIndexRow>>

Source

pub fn register_schema( &self, name: &str, if_not_exists: bool, ) -> StorageBackendResult<bool>

Create a durable schema catalog object. Returns true when a new schema was created and false only for IF NOT EXISTS.

Source

pub fn drop_schema(&self, name: &str) -> StorageBackendResult<bool>

Drop an empty durable schema. Virtual system namespaces cannot be removed.

Source

pub fn has_schema(&self, name: &str) -> StorageBackendResult<bool>

Source

pub fn has_namespace(&self, name: &str) -> StorageBackendResult<bool>

Whether name resolves as a namespace: a durable schema, a virtual system schema (pg_catalog, information_schema, ag_catalog), or the namespace a named graph owns.

Source

pub fn list_schemas(&self) -> StorageBackendResult<Vec<String>>

Return every registered schema in sorted order.

Source

pub fn tables_in_schema( &self, schema: &str, ) -> StorageBackendResult<Vec<String>>

Local names of tables whose structural relation identity is owned by schema. No string-prefix inference participates in this lookup.

Source

pub fn list_sequences(&self) -> StorageBackendResult<Vec<String>>

Source§

impl Engine

Source

pub fn set_client_parameter( &self, name: &str, value: &str, ) -> Result<(), SQLError>

Keep value as the client’s startup setting of name, which the session starts with and RESET restores (PGC_S_CLIENT).

Source§

impl Engine

Source

pub fn session_termination(&self) -> Option<SQLError>

The error that terminated this session, if a session timeout did; every later statement reports it, and a server closes the connection after sending it at FATAL.

Source§

impl Engine

Source

pub fn search_path(&self) -> Vec<String>

Return the current search_path.

Source

pub fn load_library(&self, library: &str) -> Result<(), SQLError>

LOAD 'library'. The engine embeds Apache AGE and PL/pgSQL, so loading either succeeds as a no-op through every spelling PostgreSQL resolves against $libdir; any other library fails exactly like a missing shared object.

Source

pub fn current_schema_name(&self) -> StorageBackendResult<Option<String>>

First usable namespace on this logical session’s explicit search path: a durable, virtual system or graph namespace.

Source

pub fn current_schema_names( &self, include_implicit: bool, ) -> StorageBackendResult<Vec<String>>

Existing schemas with USAGE privilege in this logical session’s search path. PostgreSQL implicitly searches pg_catalog unless it is already named explicitly.

Source

pub fn next_random_u64(&self) -> u64

Draw every bit of one word from this logical session’s PRNG.

Source

pub fn next_random_value(&self) -> f64

Draw one value in [0, 1) from this logical session’s PRNG.

Source

pub fn set_random_seed(&self, seed: f64) -> Result<(), String>

Reseed this logical session’s PRNG. Equal seeds produce equal streams without changing any sibling session.

Source

pub fn set_search_path(&self, path: &[String]) -> Result<(), SQLError>

Set the session’s search_path to path, each schema quoted as an identifier needs, as SET search_path TO with those names does. An empty path finds unqualified names only in the system schemas.

Source

pub fn set_query_memory_limit(&self, bytes: Option<usize>)

Bound the memory each query workspace of this session may hold before it spills, in place of work_mem; None returns to work_mem. Unlike work_mem, whose minimum is PostgreSQL’s 64 kB, the bound may be as small as one byte, so that a host can make queries over little data spill.

Source

pub fn set_variable(&self, name: &str, value: &str) -> Result<(), SQLError>

Apply SET <name> [TO|=] <value> for the session.

Source

pub fn reset_variable(&self, name: &str) -> Result<(), SQLError>

Source

pub fn reset_all_variables(&self)

RESET ALL: every parameter except those RESET ALL leaves alone returns to the setting RESET restores.

Source

pub fn show_variable(&self, name: &str) -> Result<String, SQLError>

The value of the parameter name as SHOW reports it; a name nothing defines is an error.

Source

pub fn discard(&self, target: DiscardTarget) -> Result<(), SQLError>

Apply DISCARD <target>. ALL resets every kind of session state; the narrower variants are scoped accordingly.

Source§

impl Engine

Source

pub fn view(&self, name: &str) -> Result<Option<QueryPlan>, SQLError>

Source

pub fn list_views(&self) -> Result<Vec<String>, SQLError>

Source§

impl Engine

Source

pub fn install_sql_function_context( &self, context: SQLFunctionContext, ) -> Result<(), SQLFunctionRegistrationError>

Install immutable host invocation data for this session. Public sibling sessions start empty; internal readers and portal workers inherit it.

Source

pub fn register_scalar_function<F>( &self, name: &str, function: F, ) -> Result<(), SQLError>
where F: SQLScalarFunction + 'static,

Source

pub fn register_scalar_function_with_options<F>( &self, name: &str, options: SQLFunctionOptions, function: F, ) -> Result<(), SQLError>
where F: SQLScalarFunction + 'static,

Register a Rust scalar callback with explicit optimizer and transaction properties.

Source

pub fn register_scalar_function_retained<F>( &self, name: &str, options: SQLFunctionOptions, function: F, ) -> Result<SQLFunctionRegistration, SQLFunctionRegistrationError>
where F: SQLScalarFunction + 'static,

Register a callback and return its independent retirement handle.

Source

pub fn register_table_function<F>( &self, name: &str, function: F, ) -> Result<(), SQLError>
where F: SQLTableFunction + 'static,

Source

pub fn register_table_function_with_options<F>( &self, name: &str, options: SQLFunctionOptions, function: F, ) -> Result<(), SQLError>
where F: SQLTableFunction + 'static,

Register a Rust table callback with explicit optimizer and transaction properties.

Source

pub fn register_table_function_retained<F>( &self, name: &str, options: SQLFunctionOptions, function: F, ) -> Result<SQLFunctionRegistration, SQLFunctionRegistrationError>
where F: SQLTableFunction + 'static,

Register a callback and return its independent retirement handle.

Source

pub fn register_aggregate_function<F>( &self, name: &str, function: F, ) -> Result<(), SQLError>
where F: SQLAggregateFactory + 'static,

Source

pub fn register_aggregate_function_with_options<F>( &self, name: &str, options: SQLFunctionOptions, function: F, ) -> Result<(), SQLError>
where F: SQLAggregateFactory + 'static,

Register a Rust aggregate callback with explicit optimizer and transaction properties.

Source

pub fn register_aggregate_function_retained<F>( &self, name: &str, options: SQLFunctionOptions, function: F, ) -> Result<SQLFunctionRegistration, SQLFunctionRegistrationError>
where F: SQLAggregateFactory + 'static,

Register a callback and return its independent retirement handle.

Source§

impl Engine

Source

pub fn automatic_statistics_status(&self) -> AutomaticStatisticsStatus

Source

pub fn automatic_diskann_maintenance_status(&self) -> DiskANNMaintenanceStatus

Source

pub fn diskann_rebuild_policy(&self) -> DiskANNRebuildPolicy

Database-shared, process-local rebuild thresholds for future maintenance admissions.

Source

pub fn set_diskann_rebuild_policy(&self, policy: DiskANNRebuildPolicy)

Revisit pending changes under this policy at the next maintenance poll. Current builds retain their admitted policy and resource limits; this setting is not persisted.

Source§

impl Engine

Source

pub fn register_column( &self, table: &str, column: ColumnDef, ) -> StorageBackendResult<()>

Append a column to the schema. No data migration is needed because the document store is sparse; rows missing the column read back as Value::Null.

Source

pub fn drop_column( &self, table: &str, column: &str, ) -> StorageBackendResult<bool>

Drop a column and the copies its inheritors have from no other source, as ALTER TABLE ... DROP COLUMN does without CASCADE. Returns false when the table or column does not exist.

Source

pub fn rename_column( &self, table: &str, from: &str, to: &str, ) -> StorageBackendResult<bool>

Source

pub fn rename_table(&self, from: &str, to: &str) -> StorageBackendResult<bool>

Source§

impl Engine

Source

pub fn set_column_default( &self, table: &str, column: &str, default: Option<Expr>, ) -> StorageBackendResult<bool>

Source

pub fn set_column_not_null( &self, table: &str, column: &str, not_null: bool, ) -> StorageBackendResult<bool>

Source

pub fn set_column_type( &self, table: &str, column: &str, ty: &ColumnType, ) -> StorageBackendResult<bool>

Source

pub fn register_table_constraints( &self, table: &str, checks: Vec<TableCheck>, foreign_keys: Vec<ForeignKey>, key_constraints: Vec<TableKeyConstraint>, ) -> StorageBackendResult<()>

Register table-level CHECK, FK, PRIMARY KEY, and UNIQUE constraints. Called by the SQL CREATE TABLE path after the columns are in place.

Source

pub fn check_constraints( &self, table: &str, ) -> StorageBackendResult<Vec<(Option<String>, Expr)>>

Snapshot of every CHECK constraint that applies to table, merging the column-level CHECKs into the table-level list. Returns (name, expr) pairs for backward API compatibility; use Self::try_check_constraint_definitions when enforcement metadata is required.

Source

pub fn try_check_constraints( &self, table: &str, ) -> StorageBackendResult<Vec<(Option<String>, Expr)>>

Source

pub fn try_check_constraint_definitions( &self, table: &str, ) -> StorageBackendResult<Vec<TableCheck>>

Snapshot of every CHECK constraint, including PostgreSQL 18 enforcement metadata.

Source

pub fn foreign_keys(&self, table: &str) -> StorageBackendResult<Vec<ForeignKey>>

Snapshot of every FOREIGN KEY constraint that applies to table. Column-level REFERENCES are lifted to single-column ForeignKey entries.

Source

pub fn try_foreign_keys( &self, table: &str, ) -> StorageBackendResult<Vec<ForeignKey>>

Source

pub fn referrers_to( &self, table: &str, ) -> StorageBackendResult<Vec<(String, ForeignKey)>>

Tables that hold a FOREIGN KEY pointing at table. Used by DELETE / DROP CASCADE to refuse the operation when a referrer has at least one row matching the target value.

Source

pub fn try_referrers_to( &self, table: &str, ) -> StorageBackendResult<Vec<(String, ForeignKey)>>

Source

pub fn unique_columns(&self, table: &str) -> StorageBackendResult<Vec<String>>

Names of columns with a UNIQUE or PRIMARY KEY constraint declared on the table. Auto-increment columns are excluded because the engine guarantees their uniqueness through the monotonic id watermark, so re-checking is redundant.

Source

pub fn try_unique_columns( &self, table: &str, ) -> StorageBackendResult<Vec<String>>

Source

pub fn key_constraints( &self, table: &str, ) -> StorageBackendResult<Vec<TableKeyConstraint>>

Every PRIMARY KEY / UNIQUE tuple declared on table. Legacy column metadata is lifted into scalar constraints so pre-v16 and API- created tables retain their existing behavior.

Source

pub fn try_key_constraints( &self, table: &str, ) -> StorageBackendResult<Vec<TableKeyConstraint>>

Source§

impl Engine

Source

pub fn find_doc_id_by_field( &self, table: &str, field: &str, value: &Value, ) -> Result<Option<DocId>, SQLError>

Source

pub fn find_conflict( &self, table: &str, columns: &[String], values: &[Value], ) -> Result<Option<DocId>, SQLError>

Find a matching conflict key in the caller’s transaction snapshot. Execution selects the integer primary-key mapping, an answerable value index, or an evaluated scan and records the corresponding serializable read.

Source§

impl Engine

Source

pub fn update_document_fields( &self, table: &str, doc_id: DocId, updates: BTreeMap<String, Value>, vectors: BTreeMap<String, Vec<f32>>, ) -> Result<bool, SQLError>

Apply per-column updates to an existing document. Mirrors the DO UPDATE SET col = expr branch of an ON CONFLICT clause. Returns whether the row was updated; Ok(false) when the document no longer exists. Storage write failures surface as Err so the enclosing transaction rolls back instead of committing a delete whose re-insert never happened.

Source

pub fn update_document_fields_with_vector_values( &self, table: &str, doc_id: DocId, updates: BTreeMap<String, Value>, vectors: BTreeMap<String, Vec<Vec<f32>>>, ) -> Result<bool, SQLError>

Source

pub fn patch_document_fields( &self, table: &str, doc_id: DocId, updates: &BTreeMap<String, Value>, vectors: &BTreeMap<String, Vec<f32>>, ) -> Result<bool, SQLError>

Apply field-level updates to the current command-visible row. Callers must only use this path when constraints and referential actions do not need the old or complete new row.

Source

pub fn patch_document_fields_with_vector_values( &self, table: &str, doc_id: DocId, updates: &BTreeMap<String, Value>, vectors: &BTreeMap<String, Vec<Vec<f32>>>, ) -> Result<bool, SQLError>

Source

pub fn delete_document( &self, table: &str, doc_id: DocId, ) -> Result<(), SQLError>

Source§

impl Engine

Source

pub fn add_fts_field(&self, table: &str, field: FieldName) -> Result<(), String>

Append field to the table’s FTS field list. Existing rows are indexed immediately so SQL CREATE INDEX USING gin behaves like a real secondary-index build rather than a metadata-only toggle.

Source

pub fn add_fts_field_with_analyzer( &self, table: &str, field: FieldName, analyzer: Option<&str>, ) -> Result<(), String>

Same as Engine::add_fts_field, but allows registering a per-field analyzer name (e.g. standard_cjk). When None, the table-level analyzer continues to apply.

Source§

impl Engine

Source

pub fn drop_table(&self, name: &str) -> StorageBackendResult<bool>

Drop a table from the catalog and release its in-memory state. Returns true if the table existed.

Source

pub fn has_table(&self, name: &str) -> StorageBackendResult<bool>

Source

pub fn try_has_table(&self, name: &str) -> StorageBackendResult<bool>

Source

pub fn table_columns(&self, table: &str) -> StorageBackendResult<Vec<String>>

All schema-declared columns for table, in declaration order.

Source

pub fn try_table_columns( &self, table: &str, ) -> StorageBackendResult<Vec<String>>

Source

pub fn table_has_column( &self, table: &str, column: &str, ) -> StorageBackendResult<bool>

Source

pub fn try_table_has_column( &self, table: &str, column: &str, ) -> StorageBackendResult<bool>

Source

pub fn table_names(&self) -> StorageBackendResult<Vec<String>>

Sorted list of every registered table name.

Source

pub fn describe_table( &self, table: &str, ) -> StorageBackendResult<Option<Vec<ColumnDef>>>

Snapshot the column schema of table. Returns None when no table by that name is registered.

Source

pub fn try_describe_table( &self, table: &str, ) -> StorageBackendResult<Option<Vec<ColumnDef>>>

Source

pub fn column_default_expr( &self, table: &str, column: &str, ) -> StorageBackendResult<Option<Expr>>

DEFAULT expression for column on table, when one was declared via ... <col> <type> DEFAULT <expr>.

Source

pub fn try_column_default_expr( &self, table: &str, column: &str, ) -> StorageBackendResult<Option<Expr>>

Source§

impl Engine

Source

pub fn truncate_table(&self, name: &str) -> Result<(), SQLError>

Source§

impl Engine

Source

pub fn get_document( &self, table: &str, doc_id: DocId, ) -> Result<Option<Document>, SQLError>

Source

pub fn document_count(&self, table: &str) -> Result<u64, SQLError>

Count documents retained by the table’s text index in the selected transaction view.

Source

pub fn table_doc_ids(&self, table: &str) -> Result<Vec<DocId>, SQLError>

All document ids in the caller’s selected transaction view.

Source§

impl Engine

Source

pub fn create_table( &self, name: impl Into<String>, analyzer: Analyzer, fts_fields: Vec<FieldName>, ) -> StorageBackendResult<()>

Register a table. fts_fields is the list of field names that are tokenized into the inverted index when documents are inserted. Other fields are still stored in the document store but are not queryable via text_match / uqa_operators::TermOperator.

Source

pub fn create_vector_field( &self, table: &str, field: impl Into<FieldName>, dimensions: u32, ) -> StorageBackendResult<bool>

Register a vector field on a table. Existing document values in the same field are indexed immediately; later calls to Engine::add_vector or Engine::add_document_with_vectors keep it current. CREATE INDEX ... USING ivf or CREATE INDEX ... USING hnsw upgrades the field to the corresponding approximate backend.

Source

pub fn add_vector( &self, table: &str, doc_id: DocId, field: &str, vector: Vec<f32>, ) -> Result<bool, SQLError>

Source

pub fn add_vector_values( &self, table: &str, doc_id: DocId, field: &str, vectors: Vec<Vec<f32>>, ) -> Result<bool, SQLError>

Source

pub fn add_document_with_vectors( &self, table: &str, doc_id: DocId, document: Document, vectors: BTreeMap<FieldName, Vec<f32>>, ) -> Result<(), SQLError>

Source

pub fn add_document_with_vector_values( &self, table: &str, doc_id: DocId, document: Document, vectors: BTreeMap<FieldName, Vec<Vec<f32>>>, ) -> Result<(), SQLError>

Source

pub fn create_default_table( &self, name: impl Into<String>, fts_fields: Vec<FieldName>, ) -> StorageBackendResult<()>

Source§

impl Engine

Source

pub fn close(&self) -> Result<(), SQLError>

Roll back open transactions, remove this session’s temporary objects and their dependents, and release its runtime resources. A failed completion retains the session and its transaction receipt for retry. Successful closure is idempotent; subsequent query use is unsupported.

Source§

impl Engine

Source

pub fn execute_with_completion<T, E>( &self, operation: impl FnOnce(&Self) -> Result<T, E>, ) -> ExecutionOutcome<T, E>

Run one host operation under the session statement gate and report its native completion facts. The operation retains its own admission, execution and recovery owner; this adapter neither starts a transaction nor retries work. Nested native calls contribute to the same interval, while earlier calls and sibling sessions do not. A successful operation without a retained transaction has finished its implicit work, including a read-only evaluation that required no physical transaction.

Source§

impl Engine

Source§

impl Engine

Source

pub fn begin(&self) -> Result<(), SQLError>

Source

pub fn commit(&self) -> Result<(), SQLError>

Commit the topmost transaction frame.

Source

pub fn rollback(&self) -> Result<(), SQLError>

Roll back the topmost transaction frame.

Source

pub fn savepoint(&self, name: &str) -> Result<(), SQLError>

Mark a savepoint inside the current transaction.

Source

pub fn release_savepoint(&self, name: &str) -> Result<(), SQLError>

Release a savepoint.

Source

pub fn rollback_to_savepoint(&self, name: &str) -> Result<(), SQLError>

Roll back to a named savepoint.

Source

pub fn transaction_depth(&self) -> usize

Number of currently-open transaction frames (BEGIN count minus COMMIT/ROLLBACK count). Useful for assertions in tests and for status displays in the CLI.

Source

pub fn transaction_failed(&self) -> bool

Whether the current transaction has failed and requires rollback. This reports the engine’s transaction state, including failures raised outside SQL text execution and recovery through a savepoint.

Source

pub fn pending_commit(&self) -> Option<StorageTransactionId>

Physical write identity of an unresolved completion. Read-only serializable completion has no physical receipt; use pending_transaction_completion to inspect either kind. Callers must not replay transaction bodies.

Source

pub fn pending_transaction_completion(&self) -> Option<TransactionOutcomeId>

Retained physical or logical completion identity. Only completion resolution or whole-transaction rollback may proceed while this is present. A failed transaction retains its rollback intent even when the caller requests COMMIT.

Source

pub fn begin_simple_query_transaction(&self) -> Result<(), SQLError>

Start the implicit transaction segment owned by a multi-statement simple-query message.

Source

pub fn promote_simple_query_transaction(&self) -> Result<(), SQLError>

Promote the current simple-query transaction to an explicit block after BEGIN.

Source§

impl Engine

Source

pub fn transaction<R>( &self, f: impl FnOnce(&Self) -> Result<R, SQLError>, ) -> Result<R, SQLError>

Run f inside one engine transaction. An error or panic from f rolls back the transaction. A successful callback commits; an indeterminate commit retains its sealed attempt in the session for resolution through commit or rollback, without replaying f.

Source

pub fn sql_batch( &self, statements: &[(&str, &[SQLParam])], ) -> Result<Vec<SQLResult>, SQLError>

Execute multiple SQL statements inside one engine transaction.

Source

pub fn sql_batch_diagnosed( &self, statements: &[(&str, &[SQLParam])], ) -> Result<Vec<SQLResult>, SQLBatchError>

Execute the same atomic batch while retaining the zero-based failing member. Transaction-boundary failures carry no member; no statement is retried.

Source

pub fn sql_batch_with_labels( &self, statements: &[(&str, &[SQLParam])], ) -> Result<Vec<SQLResult>, SQLError>

Execute multiple SQL statements inside one engine transaction like Engine::sql_batch, replacing each result’s enum values by their labels before the next statement runs, so a later statement cannot remove a type an earlier result still names. Host bindings return these results.

Source§

impl Engine

Source

pub fn sql_function_depth_limit(&self) -> usize

Current nesting cap for user-defined routine calls.

Source

pub fn set_sql_function_depth_limit(&self, limit: usize)

Adjust the nesting cap for user-defined routine calls (minimum 1). Mirrors PostgreSQL’s max_stack_depth role for recursive functions.

Source

pub fn take_sql_notices(&self) -> Vec<SQLNotice>

Drain the queued notices in emission order, each with its level, SQLSTATE, message, and the detail and hint PostgreSQL reports as fields of their own.

Source

pub fn try_take_sql_notice_with<T, E>( &self, prepare: impl FnOnce(&SQLNotice) -> Result<T, E>, ) -> Result<Option<(SQLNotice, T)>, E>

Prepare a destination for the oldest notice before removing it. The callback runs only when a notice exists; rejection or unwinding preserves the queue. It must not reenter this Engine or its notice queue. Success moves the original notice and prepared owner.

Source§

impl Engine

Source

pub fn copy_from( &self, statement: &str, input: impl Read, ) -> Result<u64, SQLError>

Consume a PostgreSQL text or CSV COPY relation FROM STDIN stream.

The complete input is decoded before the single underlying multi-row insert starts. Row routing, defaults, identity allocation, generated columns, checks, foreign keys, and statement rollback consequently use exactly the same implementation as INSERT.

Source

pub fn copy_to( &self, statement: &str, output: impl Write, ) -> Result<u64, SQLError>

Write a PostgreSQL text or CSV COPY ... TO STDOUT stream and return the number of emitted rows.

Trait Implementations§

Source§

impl AddedColumnKeys for Engine

Source§

impl AggregateClassifier for Engine

Source§

fn is_registered_aggregate(&self, name: &str) -> bool

Source§

fn is_registered_aggregate_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Native catalogs override this observation to admit lookup scratch before allocation. External classifiers keep their existing callback boundary.
Source§

impl AggregateFunctionRegistry for Engine

Source§

impl AnalyzeCatalog for Engine

Source§

impl AnalyzeLocks for Engine

Source§

impl AnalyzeNotices for Engine

Source§

fn notice(&self, notice: SQLNotice)

Source§

impl AnalyzerRevisions for Engine

Source§

impl AnalyzerTableFunctions for Engine

Source§

fn register_named_analyzer( &self, name: &str, config: &str, ) -> Result<(), String>

Source§

fn drop_named_analyzer(&self, name: &str) -> Result<bool, String>

Source§

fn list_named_analyzers(&self) -> Result<Vec<String>, String>

Source§

fn set_table_field_analyzer( &self, table: &str, field: &str, analyzer: &str, phase: &str, ) -> Result<(), SQLError>

Source§

fn fts_index_stats( &self, table: Option<&str>, ) -> Result<Vec<FtsIndexStat>, SQLError>

Source§

impl AssignmentColumnCatalog for Engine

Source§

fn try_describe_table( &self, table: &str, ) -> Result<Option<Vec<ColumnDef>>, ColumnCatalogError>

Source§

fn columns_declared(&self, table: &str) -> Result<bool, ColumnCatalogError>

Source§

fn with_column_metadata_with_control( &self, table: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&[ColumnDef]) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Lend one declaration generation after observing the same default/generated sequence dependencies as a full description. Call the reader exactly once for a found table and do no catalog work afterwards. Consumers inspect names, types and flags; expression consumers still request resolved expressions.
Source§

fn columns_declared_with_control( &self, table: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Source§

fn try_column_insert_default_expr( &self, table: &str, column: &str, ) -> Result<Option<Expr>, ColumnCatalogError>

Source§

fn try_identity_column_sequence( &self, table: &str, column: &str, ) -> Result<Option<String>, SQLError>

The sequence an identity DEFAULT draws from. An identity declaration with no sequence owned by it reports PostgreSQL’s error.
Source§

fn try_column_shape( &self, table: &str, column: &str, ) -> Result<Option<Option<ColumnShape>>, ColumnCatalogError>

The type and generated kind of one column: None for an unknown table, and an inner None for a column the table does not declare. Every written value asks for it, so a catalog answers from the column alone. The default describes the whole table, which copies every column and resolves every default expression.
Source§

impl AssignmentContext for Engine

Source§

fn evaluate_domain_check_with_control( &self, expression: &Expr, row: &dyn RowLookup, schema: &RowSchema, control: &ProductionControl<'_>, ) -> Result<Produced<Value>, SQLError>

Native evaluation keeps lowering, binding and execution under this control; external callbacks own their construction and return an admitted result.
Source§

fn domain_display_name_with_control( &self, oid: u32, control: &ProductionControl<'_>, ) -> Result<Produced<String>, SQLError>

External adapters return the selected output spelling. Native catalogs admit visibility and name construction before producing it.
Source§

fn evaluate_domain_check( &self, expression: &Expr, row: &dyn RowLookup, schema: &RowSchema, ) -> Result<Value, SQLError>

Source§

impl AsyncSQLEngine for Engine

Source§

type Error = SQLError

Source§

fn sql<'a>( &'a self, query: &'a str, params: &'a [SQLParam], ) -> impl Future<Output = Result<SQLResult, Self::Error>> + Send + 'a

Source§

fn sql_batch<'a>( &'a self, statements: &'a [(&'a str, &'a [SQLParam])], ) -> impl Future<Output = Result<Vec<SQLResult>, Self::Error>> + Send + 'a

Source§

impl BatchRowLocks for Engine

Source§

impl BatchTransactions for Engine

Source§

fn refresh_idle_statement_view(&self) -> Result<(), SQLError>

Refresh an idle session before reading its statement cache. An active transaction retains its view until its admitted statement selects a snapshot, including ownership of refresh failure.
Source§

fn begin_simple_query_transaction(&self) -> Result<(), SQLError>

Source§

fn promote_simple_query_transaction(&self) -> Result<(), SQLError>

Source§

fn run_transaction_statement( &self, statement: TransactionStmt, ) -> Result<(), SQLError>

Source§

fn with_active_transaction( &self, operation: &mut dyn FnMut() -> Result<(), SQLError>, ) -> Result<(), SQLError>

Admit and run one operation in the existing transaction. The owner rejects failed or unresolved frames before invoking the callback, invokes it exactly once on admission, and owns error and unwind cleanup.
Source§

fn prepare_explicit_statement_snapshot( &self, sets_snapshot: bool, ) -> Result<(), SQLError>

Source§

fn prepare_explicit_transaction_writer(&self) -> Result<bool, SQLError>

Source§

fn begin_implicit_statement_transaction( &self, read_only: bool, ) -> Result<(), SQLError>

Source§

impl BuiltinRoutineSecurityCatalog for Engine

Source§

impl BuiltinRoutineSecurityState for Engine

Source§

impl CatalogExpressionEvaluation for Engine

Source§

fn evaluate(&self, expression: &Expr) -> Result<Value, SQLError>

Source§

impl CatalogInputFunctions for Engine

Source§

fn read_unknown_input_with_control( &self, text: &str, target: &ColumnType, control: &ProductionControl<'_>, ) -> Result<Produced<Value>, SQLError>

External callbacks retain their original production boundary; a controlled caller receives a distinct admitted value. Native catalogs override this method at their input constructors.
Source§

fn read_unknown_input( &self, text: &str, target: &ColumnType, ) -> Result<Value, SQLError>

Source§

impl CatalogNamespace for Engine

Source§

fn current_schema_names(&self, implicit: bool) -> Result<Vec<String>, SQLError>

Source§

fn current_schema_names_with_catalog( &self, catalog: &CatalogReadView, implicit: bool, ) -> Result<Vec<String>, SQLError>

Resolve visibility through a caller-selected catalog while preserving legacy namespace services.
Source§

impl CatalogNotices for Engine

Source§

fn notice(&self, notice: SQLNotice)

Source§

impl CatalogPublicationChanges for Engine

Source§

fn prepared_relation_changed(&self, relation: &RelationIdentity)

Publish a change to an existing, already-bound relation. The session adapter lends its loaded object identity; this does not resolve a SQL name.
Source§

fn prepared_catalog_changed(&self, change: PreparedCatalogChange)

Source§

fn table_catalog_changed(&self)

Source§

fn catalog_registry_changed(&self)

Source§

impl CatalogRemovalInputs for Engine

Source§

impl CatalogRoutineScopes for Engine

Source§

impl CatalogSession for Engine

Source§

fn current_role(&self) -> RoleReference

Source§

fn temporary_schema_name(&self) -> String

Source§

fn relation_name_resolution(&self) -> RelationNameResolution

Source§

fn relation_name_resolution_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<RelationNameResolution>, SQLError>

Native sessions admit copies directly from locked session state; external services may supply their existing owned snapshot.
Source§

fn show_parameter(&self, name: &str) -> Result<(String, String), SQLError>

The canonical name of the parameter name refers to and its value as SHOW reports it.
Source§

fn parameter_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Produced<String>, SQLError>

Describe a SHOW column without constructing its current setting. External services preserve their existing resolution callback.
Source§

fn parameter_settings(&self) -> Vec<ParameterSetting>

Every parameter that SHOW ALL and pg_settings report, in name order.
Source§

fn explain_settings( &self, control: &ProductionControl<'_>, ) -> Result<Produced<ExplainSettings>, SQLError>

Native sessions override this boundary to read only selected planning parameters. An external implementation may supply its existing settings snapshot.
Source§

fn prepared_statements(&self) -> Vec<PreparedStatementMetadata>

Source§

fn cursors(&self) -> Vec<CursorMetadata>

Source§

impl CatalogSnapshotSource for Engine

Source§

fn bind_query_reads( &self, snapshot: CatalogReadView, ) -> Result<CatalogReadView, SQLError>

Attach the original query participant without replacing the retained catalog or observing unused sources.
Source§

fn retain_catalog_rows( &self, snapshot: CatalogReadView, ) -> Result<CatalogReadView, SQLError>

Retain direct catalog rows independently of name binding and SSI attribution.
Source§

fn refreshed_catalog_snapshot(&self) -> Result<CatalogReadView, SQLError>

Source§

fn refresh_catalog(&self) -> Result<(), SQLError>

Refresh definitions without capturing a query view that definition coordination will discard.
Source§

fn catalog_snapshot(&self) -> CatalogReadView

Source§

fn builtin_routine_permissions( &self, current_role: RoleReference, ) -> BuiltinRoutinePermissions

Capture builtin authority at the same boundary as ordinary catalog reads. Sources may use immutable authority inputs when they prove the existing unrestricted rule without table metadata.
Source§

fn current_catalog_snapshot(&self) -> CatalogReadView

Definition coordination uses the refreshed session catalog, independently from an ordinary query’s retained snapshot.
Source§

fn current_catalog_revision(&self) -> Option<u64>

A session-local revision covering all visible definition changes, including private DDL, rollback and refresh after a catalog lock wait. Sources without this guarantee must return None.
Source§

impl ColumnAdditionState for Engine

Source§

fn has_column(&self, table: &str, column: &str) -> StorageBackendResult<bool>

Source§

fn create_vector_field( &self, table: &str, column: String, dimensions: u32, ) -> StorageBackendResult<bool>

Source§

fn add_text_field(&self, table: &str, column: String) -> Result<(), SQLError>

Source§

fn set_missing_value( &self, table: &str, column: &str, value: Option<Value>, ) -> Result<(), SQLError>

Source§

fn persist_schema(&self, table: &str) -> StorageBackendResult<bool>

Source§

impl ColumnBackfillState for Engine

Source§

impl ColumnChangeCatalog for Engine

Source§

fn has_column( &self, table: &str, column: &str, ) -> Result<bool, ColumnCatalogError>

Source§

fn column_type( &self, table: &str, column: &str, ) -> Result<Option<ColumnType>, ColumnCatalogError>

Source§

fn stored_columns( &self, table: &str, ) -> Result<Vec<ColumnDef>, ColumnCatalogError>

Source§

impl ColumnDropCatalog for Engine

Source§

impl ColumnDropIndexes for Engine

Source§

impl ColumnDropRows for Engine

Source§

fn rewrite( &self, table: &str, id: DocId, document: Document, ) -> Result<(), SQLError>

Source§

impl ColumnDropRules for Engine

Source§

impl ColumnDropSequences for Engine

Source§

fn owned_by_column( &self, table: [u8; 16], column: [u8; 16], ) -> StorageBackendResult<BTreeSet<String>>

Source§

impl ColumnIndexChanges for Engine

Source§

fn drop_vector_indexes( &self, table: &str, column: &str, ) -> StorageBackendResult<bool>

Source§

fn prepare_vector_rewrite( &self, table: &str, column: &str, dimensions: u32, ) -> StorageBackendResult<()>

Source§

fn rebuild_vector_index( &self, table: &str, column: &str, dimensions: u32, ) -> StorageBackendResult<bool>

Source§

impl ColumnRemovalViews for Engine

Source§

fn dependents( &self, table: &str, column: &str, ) -> StorageBackendResult<Vec<String>>

Source§

impl ColumnRewritePublication for Engine

Source§

fn update_fields( &self, table: &str, id: DocId, values: BTreeMap<String, Value>, vectors: DocumentVectors, ) -> Result<bool, SQLError>

Source§

impl CommentPublication for Engine

Source§

impl CommittedRowSource for Engine

Source§

impl CompositeRegistryPublication for Engine

Source§

impl CompositeTypeCatalog for Engine

Source§

fn composite_type_with_control( &self, type_oid: u32, control: &ProductionControl<'_>, ) -> Result<Option<OwnedCompositeTypeDescriptor>, SQLError>

External catalogs own their callback construction; the default copies exposed metadata under the consumer’s control. Native catalogs select existing retained descriptors or admit each selected field before construction.
Source§

fn composite_type( &self, type_oid: u32, ) -> Result<Option<Arc<CompositeTypeDescriptor>>, SQLError>

The attributes of one composite type, or None when the catalog has no such type.
Source§

impl CompositeValueTables for Engine

Source§

impl ConflictCatalog for Engine

Source§

fn try_describe_table( &self, table: &str, ) -> Result<Option<Vec<ColumnDef>>, String>

Source§

fn with_column_metadata_with_control( &self, table: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&[ColumnDef]) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Lend declaration metadata after observing the same stored sequence dependencies as a description. Consumers inspect names, types and constraints, never rewritten default expressions.
Source§

fn enforced_keys(&self, table: &str) -> Result<Vec<EnforcedKey>, String>

Source§

fn try_declared_table_constraints( &self, table: &str, ) -> Result<TableConstraintSet, String>

Source§

impl ConstraintAlterAccess for Engine

Source§

fn ensure_table_owner(&self, table: &str) -> Result<(), SQLError>

Source§

fn ensure_no_pending_events( &self, table: &str, action: &str, ) -> Result<(), SQLError>

Source§

fn constraint_trigger_name( &self, table: &str, name: &str, ) -> Result<Option<String>, SQLError>

Source§

impl ConstraintCatalog for Engine

Source§

impl ConstraintDiagnosticSource for Engine

Source§

impl ConstraintModes for Engine

Source§

fn prune(&self) -> Result<(), SQLError>

Source§

fn forget(&self, identity: &ConstraintIdentity)

Source§

impl ConstraintNameCatalog for Engine

Source§

impl ConstraintRelations for Engine

Source§

impl ConstraintTransactions for Engine

Source§

fn foreign_key_is_deferred( &self, table: &str, key: &ForeignKey, ) -> Result<bool, SQLError>

Source§

fn referenced_key_is_deferred( &self, table: &str, key: &ForeignKey, derived: Option<&ReferencedPartitionConstraint>, ) -> Result<bool, SQLError>

Whether the checks that a change to a referenced row fires are deferred, under the constraint derived names when the foreign key derives one on the firing partition.
Source§

fn refresh_explicit_statement_snapshot(&self) -> Result<(), SQLError>

Source§

fn lock_key_reservation( &self, key: [u8; 32], table: &str, ) -> Result<LockAcquire, SQLError>

Source§

fn lock_key_reservations( &self, keys: &[[u8; 32]], table: &str, ) -> Result<Vec<LockAcquire>, SQLError>

All keys are evaluated before this boundary, with no reads or callbacks between reservations.
Source§

impl ConstraintTriggerEvents for Engine

Source§

fn forget(&self, identity: &ConstraintIdentity)

Source§

fn rename_trigger(&self, identity: &ConstraintIdentity, name: &str)

Source§

fn rename_constraint(&self, identity: &ConstraintIdentity, name: &str)

Source§

impl ConstraintTriggerQueue for Engine

Source§

impl ConstraintTypeReferrers for Engine

Source§

impl CopyCatalog for Engine

Source§

fn resolve_relation_kind( &self, name: &str, ) -> Result<Option<(String, &'static str)>, SQLError>

Source§

fn table( &self, name: &str, ) -> Result<Option<Box<dyn CopyRelation + '_>>, ColumnCatalogError>

Source§

impl CopyPrivileges for Engine

Source§

fn ensure_any_column( &self, table: &str, privilege: TableAclPrivilege, ) -> Result<(), SQLError>

Source§

fn ensure_column( &self, table: &str, column: &str, privilege: TableAclPrivilege, ) -> Result<(), SQLError>

Source§

impl CopyStatements for Engine

Source§

fn execute_statement( &self, statement: Statement, params: &[SQLParam], ) -> Result<SQLResult, SQLError>

Source§

fn execute_text_with_output( &self, text: &str, params: &[SQLParam], consume: &mut dyn FnMut(StatementOutput) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Source§

impl CreationRelationGuards for Engine

Source§

fn named_type_exists(&self, identity: &RelationIdentity) -> bool

Source§

fn tables(&self) -> Box<dyn CreationRelationNames + '_>

Source§

fn views(&self) -> Box<dyn CreationRelationNames + '_>

Source§

fn sequences(&self) -> Box<dyn CreationRelationNames + '_>

Source§

fn foreign_tables(&self) -> Box<dyn CreationRelationNames + '_>

Source§

fn indexes(&self) -> Box<dyn CreationRelationNames + '_>

Source§

fn composite_types(&self) -> Box<dyn CreationRelationNames + '_>

The relations of standalone composite types, which occupy the relation namespace as well as the type namespace.
Source§

impl CypherTableRuntime for Engine

Source§

impl DatabasePrivilegeCatalog for Engine

Source§

impl DatabasePrivilegePublication for Engine

Source§

impl DatabaseSecurityRegistry for Engine

Source§

impl Default for Engine

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl DetachedConstraintModes for Engine

Source§

impl DomainCatalog for Engine

Source§

fn domain_by_oid_with_control( &self, oid: u32, control: &ProductionControl<'_>, ) -> Result<Option<Produced<StoredDomain>>, SQLError>

Native catalogs copy the selected declaration under the caller’s control. Legacy external callbacks retain responsibility for producing their input.
Source§

fn domain_by_oid(&self, oid: u32) -> Option<StoredDomain>

Source§

impl DomainConstraintBinding for Engine

Source§

impl DomainDeclarationBinding for Engine

Source§

fn bind_domain_declaration( &self, definition: &mut CreateDomain, ) -> Result<(), SQLError>

Source§

impl DomainDependencyCatalog for Engine

Source§

impl DomainDropNotices for Engine

Source§

impl DomainRegistryPublication for Engine

Source§

impl DomainValidationTables for Engine

Source§

impl Drop for Engine

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl DropStatementBindings for Engine

Source§

impl EmptySchemaCatalog for Engine

Source§

fn schema_registered(&self, name: &str) -> bool

Source§

fn schema_is_empty(&self, name: &str) -> bool

Source§

impl EmptySchemaRemovalPersistence for Engine

Source§

impl EmptySchemaRemovalState for Engine

Source§

impl EngineHook for Engine

Source§

fn construct_range( &self, oid: u32, bounds: RangeBoundsInput, control: &ProductionControl<'_>, ) -> Result<Produced<Value>, SQLError>

Construct an admitted declared range with its selected canonical support, without repeating endpoint conversion.
Source§

fn construct_multirange( &self, oid: u32, members: &[Value], control: &ProductionControl<'_>, ) -> Result<Produced<Value>, SQLError>

Normalize admitted members with the selected declaration’s comparison and canonical support.
Source§

fn sql_notice(&self, notice: SQLNotice)

Retain a diagnostic reported by a type input or scalar operation without failing it.
Source§

fn read_range_input( &self, oid: u32, text: &str, control: &ProductionControl<'_>, ) -> Result<Produced<Value>, SQLError>

Invoke the retained declaration’s input and optional canonical support. Read-only value catalogs never execute these effects.
Source§

fn require_builtin_execute( &self, binding: &FunctionBinding, ) -> Result<(), SQLError>

Enforce EXECUTE on a selected built-in at an execution boundary. Catalog-free embedders have no mutable routine ACLs.
Source§

fn require_builtin_execute_with_control( &self, binding: &FunctionBinding, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

External hooks own their authorization callbacks; native hooks retain role traversal under the invoking control.
Source§

fn transaction_timestamp_micros(&self) -> Option<i64>

Start of the current SQL transaction, in Unix microseconds.
Source§

fn statement_timestamp_micros(&self) -> Option<i64>

Start of the current frontend SQL message, in Unix microseconds.
Source§

fn resolve_oid_alias_input_with_control( &self, ty: &ColumnType, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<i64>, SQLError>

Read an OID alias through the invoking planning owner. Native catalogs implement selected lookup directly; external adapters keep their historical input hooks.
Source§

fn resolve_regtype_input(&self, name: &str) -> Result<Option<i64>, SQLError>

Resolve a regtype cast to its OID carrier when a complete type catalog is available.
Source§

fn cast_domain( &self, value: &Value, source: Option<&str>, target: &ColumnType, ) -> Result<Option<Value>, SQLError>

Apply catalog-owned domain conversion and constraints. A missing implementation leaves built-in catalog domains on their base-type conversion path.
Source§

fn cast_domain_with_control( &self, value: &Value, source: Option<&str>, target: &ColumnType, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Value>>, SQLError>

Apply domain input with the invoking value’s allowance and cancellation owners. Native catalogs override this method so base conversion and checks retain that control; the default admits results returned by an external legacy adapter.
Source§

fn resolve_type_name(&self, name: &str) -> Result<Option<ColumnType>, String>

Resolve a catalog-owned SQL type name for casts evaluated with an engine context.
Source§

fn resolve_type_oid(&self, oid: u32) -> Result<Option<ColumnType>, String>

Resolve an already admitted catalog type identity without name lookup or input privileges.
Source§

fn resolve_type_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

External catalogs own legacy descriptor construction; native catalogs admit selected metadata before producing it.
Source§

fn resolve_type_oid_with_control( &self, oid: u32, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

Source§

fn type_oid_exists(&self, oid: u32) -> Result<bool, String>

Observe whether a physical type OID remains in the current catalog, including types without a scalar value carrier.
Source§

fn resolve_regclass_input(&self, name: &str) -> Result<Option<i64>, SQLError>

Resolve regclass input while preserving typed SQL errors. Embedders that implement the historical string-error hook retain its previous behavior; engines with catalog privilege checks override this method directly.
Source§

fn resolve_regproc(&self, name: &str) -> Result<Option<i64>, SQLError>

Resolve a routine name that must name exactly one routine, as regproc input does.
Source§

fn resolve_regprocedure(&self, name: &str) -> Result<Option<i64>, String>

Resolve an exact routine signature to the OID carrier used by regprocedure.
Source§

fn resolve_regprocedure_input( &self, name: &str, ) -> Result<Option<i64>, SQLError>

Resolve regprocedure input while preserving the typed errors regprocedurein reports. Embedders that implement only the historical lookup hook keep its behavior.
Source§

fn resolve_regrole(&self, name: &str) -> Result<Option<i64>, SQLError>

Resolve a regrole input while preserving hard input errors for direct casts.
Source§

fn resolve_regnamespace(&self, name: &str) -> Result<Option<i64>, SQLError>

Resolve a regnamespace input while preserving hard input errors for direct casts.
Source§

fn resolve_regcollation(&self, name: &str) -> Result<Option<i64>, SQLError>

Resolve regcollation input with the direct input function’s diagnostics.
Source§

fn resolve_regobject( &self, ty: &ColumnType, name: &str, ) -> Result<Option<i64>, SQLError>

Resolve the text argument of one PostgreSQL to_reg* lookup function. The engine override owns catalog visibility and the lookup function’s NULL-versus-error boundary; the default preserves the two historical hooks for embedders that only implement regclass or regprocedure.
Source§

fn resolve_regtype_output( &self, ty: &ColumnType, oid: i64, ) -> Result<Option<String>, String>

Resolve one OID-backed alias type to its PostgreSQL text output.
Source§

fn enum_labels(&self) -> Option<&dyn EnumLabelCatalog>

Enum labels of the statement’s catalog. Embedders without catalog enum types keep the default, so enum input and output fail as an unavailable type.
Source§

fn composite_types(&self) -> Option<&dyn CompositeTypeCatalog>

Composite type attributes of the statement’s catalog. Embedders without catalog composite types keep the default, so composite input and coercion fail as an unavailable type.
Source§

fn nextval(&self, name: &str) -> Result<i64, SQLError>

Source§

fn currval(&self, name: &str) -> Result<i64, SQLError>

Source§

fn lastval(&self) -> Result<i64, SQLError>

Source§

fn setval( &self, name: &str, value: i64, is_called: bool, ) -> Result<i64, SQLError>

Source§

fn call_scalar_function( &self, name: &str, args: &[Value], ) -> Option<Result<Value, SQLError>>

Source§

fn call_bound_builtin_function( &self, binding: &FunctionBinding, args: &[(Option<String>, Value)], ) -> Option<Result<Value, SQLError>>

Invoke an engine-backed built-in after an exact catalog binding has selected it. Unlike call_scalar_function, this path is also available when dynamic dispatch is disabled, so runtime callbacks cannot override the stored built-in identity.
Source§

fn has_scalar_functions(&self) -> bool

Source§

fn call_bound_builtin_function_with_control( &self, binding: &FunctionBinding, args: &[(Option<String>, Value)], control: &ProductionControl<'_>, ) -> Option<Result<Produced<Value>, SQLError>>

Session-backed execution keeps its existing result lifetime. A planning caller receives a separately admitted copy; the execution buffer is never retroactively classified as planning storage.
Source§

fn current_schema(&self) -> Result<Option<String>, String>

The first schema of the session’s search path that exists and that the role may use, or None when there is none, which current_schema() reports as NULL. A hook without a session reports public, the first schema of the default search path.
Source§

fn current_user(&self) -> Result<Option<String>, SQLError>

Source§

fn session_user(&self) -> Result<Option<String>, SQLError>

Source§

fn runtime_parameter(&self, name: &str) -> Result<Option<String>, SQLError>

Read a session setting. None means the parameter is unknown; errors must remain visible even for current_setting(..., true).
Source§

fn temporal_interval_style( &self, ) -> Result<Option<TemporalIntervalStyle>, SQLError>

The live interval input/output convention. A catalog-only hook leaves the calling statement’s captured style in force.
Source§

fn temporal_time_zone(&self) -> Result<Option<TemporalTimeZone>, SQLError>

The validated zone of a live session. Detached value evaluation uses UTC.
Source§

fn sleep(&self, duration: Duration) -> Result<(), SQLError>

Sleep in the session for duration, ending at once when the statement is canceled or times out (pg_sleep).
Source§

fn set_runtime_parameter( &self, name: &str, value: Option<&str>, local: bool, ) -> Result<String, SQLError>

Assign a session setting as set_config(name, value, is_local) does, restoring the reset setting for None, and return the new value as SHOW reports it.
Source§

fn current_schemas( &self, include_implicit: bool, ) -> Result<Option<Vec<String>>, String>

Resolve the existing schemas visible to the logical session.
Source§

fn random_value(&self) -> Result<Option<f64>, String>

Draw from an engine-owned logical-session PRNG. None keeps pure, engine-free expression evaluation available for library callers.
Source§

fn random_u64(&self) -> Result<Option<u64>, String>

Draw every bit of one engine-owned logical-session PRNG word. Range functions use this instead of a floating-point sample so bigint and arbitrary-precision numeric bounds remain uniform.
Source§

fn set_random_seed(&self, seed: f64) -> Result<bool, String>

Reseed the logical-session PRNG. false means the hook does not own a mutable random stream and the caller must report the unsupported call.
Source§

fn call_user_function( &self, name: &str, args: &[(Option<String>, Value)], ) -> Option<Result<Value, SQLError>>

Invoke a user-defined SQL / PL/pgSQL function. Consulted after built-in dispatch misses (and immediately for calls with named arguments, which built-ins never accept). None means no user-defined function with this name exists.
Source§

fn catalog_cast_scope(&self) -> Option<&CatalogCastScope>

Certify stable descriptors for bound/schema-qualified type names. Live custom catalogs decline by default; conversion callbacks, settings and unqualified namespace resolution are never covered by this capability.
Source§

fn resolve_regclass(&self, _name: &str) -> Result<Option<i64>, String>

Resolve a relation name to the OID carrier used by regclass.
Source§

fn call_bound_user_function( &self, _binding: &FunctionBinding, _args: &[(Option<String>, Value)], ) -> Option<Result<Value, SQLError>>

Source§

fn call_bound_user_function_with_control( &self, binding: &FunctionBinding, args: &[(Option<String>, Value)], control: &ProductionControl<'_>, ) -> Option<Result<Produced<Value>, SQLError>>

Run a selected routine with its ordinary execution contract, then admit a distinct destination for the planning result before copying it. Arguments remain borrowed from their producing owner throughout the call.
Source§

fn routine_description_scope(&self) -> Option<RoutineDescriptionScope>

Identity for successful bound routine metadata. A mutable context must decline reuse or change this identity when its types, registry or role change. Returning a valid identity also admits retaining this hook for a fixed lateral source; default/custom hooks are reconstructed at their original boundary.
Source§

fn call_bound_user_function_with_descriptions( &self, binding: &FunctionBinding, args: &[(Option<String>, Value)], _descriptions: &RoutineCallDescriptions, _control: &ProductionControl<'_>, ) -> Option<Result<Value, SQLError>>

Optional metadata belongs to this prepared expression. Mutable/custom hooks preserve their ordinary invocation unless they explicitly support native scope validation.
Source§

impl EnumLabelVisibility for Engine

Source§

fn enum_type_created(&self, type_oid: u32)

Source§

fn enum_label_added(&self, type_oid: u32, label_oid: u32)

Source§

impl EnumRegistryPublication for Engine

Source§

impl EventCatalogGuards for Engine

Source§

impl EventCatalogPublication for Engine

Source§

impl EventCatalogReads for Engine

Source§

impl EventForeignPrivileges for Engine

Source§

impl EventLookupState for Engine

Source§

impl EventPartitionCatalog for Engine

Source§

impl EventRelationCatalog for Engine

Source§

fn event_relation_owner( &self, relation: &RelationIdentity, ) -> Result<(RoleIdentity, &'static str), SQLError>

Source§

fn view_kind(&self, relation: &RelationIdentity) -> Option<StoredViewKind>

Source§

fn view(&self, relation: &RelationIdentity) -> Option<StoredView>

Source§

fn with_view_with_control( &self, relation: &RelationIdentity, control: &ProductionControl<'_>, read: &mut dyn FnMut(&StoredView) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Read the current restored definition, without search-path resolution or another catalog refresh.
Source§

fn foreign_columns(&self, relation: &RelationIdentity) -> Option<Vec<ColumnDef>>

Source§

fn restored_catalog_view_definition( &self, name: &str, ) -> Result<Option<StoredView>, SQLError>

Source§

fn stored_view_schema(&self, view: &StoredView) -> Result<RowSchema, SQLError>

Source§

fn stored_view_schema_with_control( &self, view: &StoredView, control: &ProductionControl<'_>, ) -> Result<RowSchema, SQLError>

Source§

fn loaded_table_hierarchy( &self, relation: &RelationIdentity, ) -> Option<TableHierarchy>

Source§

impl EventRelationPersistence for Engine

Source§

impl ExecutablePlanOptimizer for Engine

Source§

fn planning_control(&self) -> Result<OwnedProductionControl, SQLError>

Source§

fn plan_owned_for_execution( &self, plan: MutableExecutablePlan, params: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<SharedExecutablePlan, SQLError>

Source§

fn plan_owned_with_result( &self, plan: MutableExecutablePlan, params: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<(SharedExecutablePlan, AnalyzedResult), SQLError>

Source§

fn plan_owned_for_statement_cache( &self, plan: MutableExecutablePlan, params: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<(SharedExecutablePlan, bool), SQLError>

Source§

fn plan_owned_with_cached_analysis( &self, plan: MutableExecutablePlan, params: &[SQLParam], cached: Option<AnalyzedStatement>, control: &ProductionControl<'_>, ) -> Result<(SharedExecutablePlan, Option<AnalyzedStatement>), SQLError>

Source§

fn plan_retained_with_cached_analysis( &self, plan: SharedExecutablePlan, params: &[SQLParam], cached: Option<AnalyzedStatement>, control: &ProductionControl<'_>, ) -> Result<(SharedExecutablePlan, Option<AnalyzedStatement>), SQLError>

Select reusable analysis before constructing mutable inputs. The preliminary owner is consumed, so its storage can retire before analysis and optimization allocate their outputs.
Source§

fn plan_with_cached_analysis( &self, plan: UnifiedPlan, params: &[SQLParam], cached: Option<AnalyzedStatement>, ) -> Result<(SharedExecutablePlan, Option<AnalyzedStatement>), SQLError>

Reuse analysis only after the caller validates its catalog/scope in the selected snapshot. Optimization still runs for this invocation. The default retains full analysis for implementations without this capability.
Source§

fn plan_for_statement_cache( &self, plan: UnifiedPlan, params: &[SQLParam], ) -> Result<(SharedExecutablePlan, bool), SQLError>

Return an executable and whether its analysis inputs permit reuse across ordinary messages. Planners without that evidence must analyze again.
Source§

fn plan_for_execution( &self, plan: UnifiedPlan, params: &[SQLParam], ) -> Result<SharedExecutablePlan, SQLError>

Source§

fn plan_with_result( &self, plan: UnifiedPlan, params: &[SQLParam], ) -> Result<(SharedExecutablePlan, AnalyzedResult), SQLError>

Analyze and optimize a logical plan, and return what its analysis derives about its result.
Source§

impl ForeignCreationNamespace for Engine

Source§

impl ForeignCreationRegistry for Engine

Source§

impl ForeignCreationTransactions for Engine

Source§

impl ForeignKeyCheckRunner for Engine

Source§

impl ForeignKeyDefinitionCatalog for Engine

Source§

impl ForeignLookupState for Engine

Source§

impl ForeignRegistryReads for Engine

Source§

impl ForeignSchemaPublication for Engine

Source§

impl ForeignTableAlterAccess for Engine

Source§

impl ForeignTableAlterCatalog for Engine

Source§

impl ForeignTableAlterPublication for Engine

Source§

impl ForeignTableAlterTransactions for Engine

Source§

impl ForeignTableOwnerWriter for Engine

Source§

impl ForeignTableScan for Engine

Source§

fn scan_foreign_source( &self, name: &str, filter: Option<&ScalarExpr>, params: &[SQLParam], ) -> Result<ForeignSourceRows<'_>, String>

Source§

impl FunctionTypeResolver for Engine

Source§

fn format_type_name(&self, ty: &ColumnType) -> Result<String, SQLError>

Format a selected type using the binding catalog’s namespace visibility.
Source§

fn format_type_name_with_control( &self, ty: &ColumnType, control: &ProductionControl<'_>, ) -> Result<Produced<String>, SQLError>

Retain a custom resolver’s result in the caller’s allowance. Native catalogs override this method to admit their own construction rather than copy an external result.
Source§

fn has_untyped_function_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Observe an external callback’s dispatch precedence while retaining invoking cancellation. Native catalogs override this callback to admit any name normalization before allocation.
Source§

fn has_untyped_function(&self, name: &str) -> bool

Return whether an external runtime callback claims this unbound function name without exposing a declared SQL return type. Such callbacks must retain dispatch precedence instead of being rebound to a same-named built-in overload.
Source§

fn resolve_type_name(&self, name: &str) -> Result<Option<ColumnType>, SQLError>

Resolve a catalog-owned SQL type name that is not represented by the built-in ColumnType::from_sql_name mapping, such as a domain.
Source§

fn resolve_type_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

The default adapts an external catalog’s owned result; project-owned catalogs admit their result in the producing implementation.
Source§

fn resolve_collation_name(&self, name: &str) -> Result<Option<u32>, SQLError>

Resolve an explicit collation name with the binding catalog’s namespace visibility and privileges.
Source§

fn resolve_collation_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<u32>, SQLError>

Native catalogs admit namespace parsing and lookup scratch in this scope; the default adapts an external resolver’s inline result.
Source§

fn enum_labels(&self) -> Option<&dyn EnumLabelCatalog>

Enum labels of the binding catalog. Binding converts unknown literals coerced to an enum type with them, as PostgreSQL parse analysis calls the type’s input function.
Source§

fn catalog_input_functions(&self) -> Option<&dyn CatalogInputFunctions>

Input functions whose catalog constraints must run when an unknown literal is analyzed. Callers retain the returned constant; metadata-only inference does not invoke this capability.
Source§

fn composite_types(&self) -> Option<&dyn CompositeTypeCatalog>

Composite type attributes of the binding catalog, which type field selections and row coercions.
Source§

fn require_type_usage(&self, ty: &ColumnType) -> Result<(), SQLError>

Require the current user’s USAGE privilege on a type that a relation column, domain or routine declares, as object_aclcheck(TypeRelationId, ..., ACL_USAGE) and aclcheck_error_type require it; see crate::catalog::security::type_inquiry::usage_governing_type. A resolver without roles and type privileges has nothing to deny.
Source§

fn resolve_function_type_with_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

Source§

fn resolve_function_overload_with_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ResolvedFunctionOverload>>, SQLError>

Source§

fn resolve_function_overload_with_builtins_and_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, builtins: &[BuiltinFunctionOverload], control: &ProductionControl<'_>, ) -> Result<Option<Produced<ResolvedFunctionOverload>>, SQLError>

Source§

fn resolve_function_type( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, ) -> Result<Option<ColumnType>, SQLError>

Source§

fn resolve_function_overload( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, ) -> Result<Option<ResolvedFunctionOverload>, SQLError>

Resolve a catalog-backed overload together with the stable binding needed to execute it after built-in and user-defined candidates have been ranked.
Source§

fn is_scalar_function_binding( &self, binding: &FunctionBinding, ) -> Result<bool, SQLError>

Return whether an exact catalog-selected binding can execute in a scalar expression. The conservative default prevents aggregate, procedure, and set-returning routines from being attached to ScalarExpr::Func.
Source§

fn is_scalar_function_binding_with_control( &self, binding: &FunctionBinding, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Resolve the selected routine’s execution category in the caller’s production scope. Native catalog producers override this boundary; the default adapts an external resolver’s boolean callback.
Source§

fn resolve_function_overload_with_builtins( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, builtins: &[BuiltinFunctionOverload], ) -> Result<Option<ResolvedFunctionOverload>, SQLError>

Resolve catalog-backed routines and the supplied built-in overloads as one PostgreSQL candidate set. Implementations with catalog visibility should override this so search-path shadowing and unknown-category selection happen before a winner is chosen.
Source§

fn resolve_scalar_subquery_type_with_control( &self, subquery: usize, outer_schema: &RowSchema, params: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

Source§

fn resolve_scalar_subquery_type( &self, _subquery: usize, _outer_schema: &RowSchema, _params: &[SQLParam], ) -> Result<Option<ColumnType>, SQLError>

Resolve the declared first-column type of a physical scalar-subquery slot when the owning execution context carries its plan arena.
Source§

impl GeneratedRewriteState for Engine

Source§

impl GrantNamespace for Engine

Source§

impl GraphLifecycle for Engine

Source§

impl GraphNameCatalog for Engine

Source§

impl HierarchyCatalog for Engine

Source§

impl HierarchyDropCatalog for Engine

Source§

fn tables(&self) -> Box<dyn HierarchyDropTables + '_>

Source§

impl HierarchyNamespace for Engine

Source§

impl IdentitySequences for Engine

Source§

fn nextval_sql(&self, sequence: &str) -> Result<i64, SQLError>

Source§

impl ImplicitOwnerPublication for Engine

Source§

fn attach_owner( &self, sequence: &str, owner: SequenceOwner, ) -> Result<(), SQLError>

Source§

impl ImplicitOwnerTables for Engine

Source§

impl ImplicitSequencePublication for Engine

Source§

impl IndexBuildCatalog for Engine

Source§

fn table_hierarchy(&self, table: &str) -> Result<TableHierarchy, SQLError>

Source§

fn scan_tables(&self, table: &str) -> Result<Vec<String>, SQLError>

Source§

fn partition_tree( &self, table: &str, ) -> Result<Vec<PartitionTreeNode>, SQLError>

The partitions below table, each after its parent with siblings in partition bound order.
Source§

impl IndexCreationNamespace for Engine

Source§

impl IndexCreationPublication for Engine

Source§

fn create_diskann_field( &self, row: &CatalogIndexRow, field: &str, dimensions: u32, parameters: DiskANNIndexParams, ) -> Result<(), SQLError>

Source§

fn add_text_field( &self, table: &str, column: &str, analyzer: Option<&str>, ) -> Result<(), SQLError>

Source§

fn rebuild_vector_field( &self, table: &str, column: &str, dimensions: u32, spec: VectorIndexSpec, ) -> Result<bool, SQLError>

Source§

fn register_index( &self, name: &str, method: &str, table: &str, keys: &[IndexKey], options: &[(String, String)], definition: &IndexDefinition, ) -> Result<(), SQLError>

Source§

fn planned_partition_indexes( &self, name: &str, method: &str, table: &str, keys: &[IndexKey], options: &[(String, String)], definition: &IndexDefinition, ) -> Result<BTreeMap<String, String>, SQLError>

The indexes that registering this index would create on the partitions below table, as partition and index name.
Source§

impl IndexKeyDescription for Engine

Source§

fn describe_index_key( &self, table: &str, keys: &[IndexKey], key_types: &[ColumnType], values: &[Value], ) -> Result<Option<String>, SQLError>

Source§

impl IndexNameCatalog for Engine

Source§

impl IndexRegistryPublication for Engine

Source§

fn persist_index( &self, row: &CatalogIndexRow, kind: IndexPublicationKind, ) -> StorageBackendResult<()>

Source§

fn erase_index( &self, row: &CatalogIndexRow, kind: IndexPublicationKind, ) -> StorageBackendResult<()>

Source§

fn publish_index(&self, row: CatalogIndexRow)

Source§

fn forget_index(&self, relation: &RelationIdentity)

Source§

fn rebind_diskann_index( &self, row: &CatalogIndexRow, ) -> StorageBackendResult<()>

Replace a name-bound live handle while retaining its stored generation and canonical data.
Source§

fn refresh_index_table(&self, table: &str) -> StorageBackendResult<()>

Source§

fn rebind_persistent_vector_field( &self, table: &str, field: &str, dimensions: u32, spec: VectorIndexSpec, ) -> StorageBackendResult<()>

Attach the completed persistent build after all catalog reservations and publications. Memory and temporary handles retain their original contents.
Source§

impl IndexRemovalCatalog for Engine

Source§

impl IndexRemovalPrivileges for Engine

Source§

impl IndexRemovalPublication for Engine

Source§

impl IndexRemovalTransactions for Engine

Source§

impl IndexRenameTransactions for Engine

Source§

impl IndexRoutineRegistry for Engine

Source§

impl InferenceBindingScope for Engine

Source§

impl InheritanceCatalog for Engine

Source§

fn resolve_parent(&self, name: &str) -> Result<String, SQLError>

Source§

fn declared_constraints( &self, table: &str, ) -> Result<TableConstraintSet, String>

Source§

fn check_definitions(&self, table: &str) -> Result<Vec<TableCheck>, String>

Source§

fn unique_index_keys(&self, table: &str) -> Result<Vec<Vec<IndexKey>>, String>

The key attributes of each unique index of table that no key constraint owns; a partition builds an index for each.
Source§

impl InsertIdentityCatalog for Engine

Source§

impl LoadedTableSchemas for Engine

Source§

impl LockingCatalog for Engine

Source§

fn hierarchy_scan_tables_with_control( &self, table: &str, descendants: bool, control: &ProductionControl<'_>, ) -> Result<Produced<Vec<String>>, SQLError>

Source§

fn resolve_relation_with_control( &self, name: &str, bound: bool, control: &ProductionControl<'_>, ) -> Result<Produced<RelationResolution>, SQLError>

Source§

fn with_view_plan_with_control( &self, name: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&QueryPlan) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Lend the selected stored view generation with registry guards released before traversal.
Source§

fn view_exists_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Source§

fn table_persistence( &self, name: &str, ) -> Result<Option<RelationPersistence>, String>

Source§

fn referenceable_keys( &self, table: &str, ) -> Result<Vec<TableKeyConstraint>, String>

Source§

fn table_columns(&self, table: &str) -> Result<Option<Vec<ColumnDef>>, String>

Source§

impl MaterializedViewAccess for Engine

Source§

fn ensure_maintenance( &self, name: &str, view: &StoredView, ) -> Result<(), SQLError>

Source§

impl MutationCommandRows for Engine

Source§

fn stage_shared_command_document( &self, table: &str, doc_id: DocId, document: Option<Arc<Document>>, ) -> Result<(), SQLError>

Source§

fn stage_command_document( &self, table: &str, doc_id: DocId, document: Option<Document>, ) -> Result<(), SQLError>

Source§

impl MutationCommandState for Engine

Source§

impl MutationConstraintDeferrals for Engine

Source§

fn inserted(&self, table: &str, doc_id: DocId) -> Result<(), SQLError>

Source§

fn rewritten( &self, table: &str, doc_id: DocId, old: Option<&Document>, new: &Document, ) -> Result<(), SQLError>

Source§

impl MutationHistory for Engine

Source§

fn note_rewrite( &self, old_table: &str, old_doc_id: DocId, new_table: &str, new_doc_id: DocId, ) -> Result<(), SQLError>

Source§

impl MutationIdentifiers for Engine

Source§

fn allocate_next_id(&self, table: &str) -> Result<DocId, SQLError>

Source§

fn allocate_unmapped_id(&self, table: &str) -> Result<DocId, SQLError>

Generate an identity for a row of table whose integer primary key names none: one at or above KEY_IDENTITY_LIMIT, where no key names an identity.
Source§

fn maps_integer_keys(&self, table: &str) -> Result<bool, SQLError>

Whether the single integer primary key of table names its rows’ identities: each row whose key lies below KEY_IDENTITY_LIMIT has the identity equal to its key, and no other row has an identity below the limit. A table that does not keep this, as one an earlier version wrote can fail to, resolves its keys through the key’s index.
Source§

fn advance_next_id( &self, table: &str, doc_id: DocId, ) -> StorageBackendResult<()>

Source§

fn persist_next_id(&self, table: &str) -> StorageBackendResult<()>

Source§

fn generates_unused_identities(&self, table: &str) -> Result<bool, SQLError>

Whether every identity allocate_next_id returns for table is one no document of the table ever had. That holds where the table reserves identities in its own durable namespace, whose watermark every write of the table raises. A table that draws from another table’s namespace, as a partition does, or keeps only a local counter cannot say.
Source§

impl MutationIndexRead for Engine

Source§

fn index_definitions(&self) -> Result<Arc<PhysicalIndexDefinitions>, SQLError>

Source§

fn find_conflict( &self, table: &str, columns: &[String], values: &[Value], ) -> Result<Option<DocId>, SQLError>

Source§

fn staged_matches( &self, table: &str, columns: &[String], values: &[Value], ) -> Result<Vec<DocId>, SQLError>

The visible rows the active commands staged for table whose columns hold values, a missing column holding null.
Source§

fn visit_staged_matches( &self, table: &str, columns: &[String], values: &[Value], visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Source§

fn staged_expression_matches( &self, table: &str, physical_key: &str, values: &[Value], ) -> Result<CommandIndexProbe, SQLError>

Probe already evaluated physical tuple keys and retain only the command rows that mask the mutation-visible stored index.
Source§

fn visit_staged_expression_matches( &self, table: &str, physical_key: &str, values: &[Value], visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<DocumentChanges, SQLError>

Source§

fn visit_value_index_key( &self, table: &str, key: &ValueIndexKey, predicate: &Predicate, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Visit distinct candidate identities in increasing order without reading documents inside the index borrow. A declined probe invokes no callback.
Source§

fn value_index_scan_key( &self, table: &str, key: &ValueIndexKey, predicate: &Predicate, ) -> Result<Option<PostingList>, SQLError>

Source§

fn visit_value_index_equal( &self, table: &str, key: &ValueIndexKey, value: &Value, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Capture ordered identities without loading documents inside the retained index read.
Source§

impl MutationNamespace for Engine

Source§

impl MutationPrivilegeCatalog for Engine

Source§

fn visit_bound_table_column_names_with_control( &self, table: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&str) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Native callers lend declarations and copy only the selected prefix before releasing the guard.
Source§

fn ensure_table_privilege_for_with_control( &self, table: &str, subject: &RoleReference, privilege: TableAclPrivilege, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn ensure_column_privilege_for_with_control( &self, table: &str, column: &str, subject: &RoleReference, privilege: TableAclPrivilege, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn ensure_any_column_privilege_for_with_control( &self, table: &str, subject: &RoleReference, privilege: TableAclPrivilege, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn bound_table_column_names(&self, table: &str) -> Result<Vec<String>, SQLError>

Source§

fn ensure_table_privilege_for( &self, table: &str, subject: &RoleReference, privilege: TableAclPrivilege, ) -> Result<(), SQLError>

Source§

fn ensure_column_privilege_for( &self, table: &str, column: &str, subject: &RoleReference, privilege: TableAclPrivilege, ) -> Result<(), SQLError>

Source§

fn ensure_any_column_privilege_for( &self, table: &str, subject: &RoleReference, privilege: TableAclPrivilege, ) -> Result<(), SQLError>

Source§

impl MutationRead for Engine

Source§

fn table_doc_ids(&self, table: &str) -> Result<Vec<DocId>, SQLError>

Source§

fn table_doc_id_page( &self, table: &str, after: Option<DocId>, limit: usize, control: &StorageReadControl, ) -> Result<BudgetedVec<DocId>, SQLError>

Source§

fn live_table_doc_ids(&self, table: &str) -> Result<Vec<DocId>, SQLError>

Source§

fn live_table_doc_id_page( &self, table: &str, after: Option<DocId>, limit: usize, control: &StorageReadControl, ) -> Result<BudgetedVec<DocId>, SQLError>

Source§

fn get_document( &self, table: &str, doc_id: DocId, ) -> Result<Option<Document>, SQLError>

Source§

fn raw_document( &self, table: &str, doc_id: DocId, ) -> Result<Option<Document>, SQLError>

Read the stored fields without materializing expressions from the current descriptor; a retained rewrite supplies its original descriptor.
Source§

fn command_overlay_changes( &self, table: &str, ) -> Result<Option<DocumentChanges>, SQLError>

The changes of table that the active command overlays and this transaction’s fixed-snapshot reads hold above its storage view, without copying them.
Source§

impl MutationRowCatalog for Engine

Source§

fn column_definitions( &self, table: &str, ) -> Result<Option<Vec<ColumnDef>>, String>

Source§

fn column_names(&self, table: &str) -> Result<Vec<String>, String>

Source§

fn visit_column_names_with_control( &self, table: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&str) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Visit declared names without resolving DEFAULT or generated expressions. Native catalogs lend an immutable declaration generation without copying its payloads.
Source§

fn view_schema(&self, name: &str) -> Result<RowSchema, SQLError>

Source§

impl MutationStorage for Engine

Source§

fn can_defer_document_text(&self, table: &str) -> Result<bool, SQLError>

Deferral is valid only while physical row publication cannot invoke expressions that observe earlier text changes.
Source§

fn delete_document(&self, table: &str, doc_id: DocId) -> Result<(), SQLError>

Source§

fn observe_document_identity( &self, table: &str, doc_id: DocId, ) -> Result<ObservedIdentifier, SQLError>

Raise the table’s document identity watermark to a supplied identity before the rows that carry identities up to it are published. The answer tells which identities no document of the table ever had.
Source§

fn delete_document_deferred_text( &self, table: &str, doc_id: DocId, ) -> Result<(), SQLError>

Delete under the original tuple lock; the publication owner removes text before observers run.
Source§

fn insert_document( &self, table: &str, doc_id: DocId, document: Document, vectors: DocumentVectors, inserted: InsertedIdentity, ) -> Result<(), SQLError>

Source§

fn insert_document_deferred_text( &self, table: &str, doc_id: DocId, document: Document, vectors: DocumentVectors, inserted: InsertedIdentity, ) -> Result<(), SQLError>

Source§

fn rewrite_document( &self, table: &str, doc_id: DocId, document: Document, ) -> Result<(), SQLError>

Source§

fn rewrite_document_deferred_text( &self, table: &str, doc_id: DocId, document: Document, ) -> Result<(), SQLError>

Publish a prepared rewrite under its existing tuple lock; the caller publishes text before allowing statement observers to run.
Source§

impl MutationTargetColumns for Engine

Source§

impl MutationTargetResolution for Engine

Source§

fn resolve_target_with_control( &self, name: &str, bound: bool, control: &ProductionControl<'_>, ) -> Result<Produced<String>, SQLError>

Native resolvers admit the selected name; external resolvers keep their original callback.
Source§

fn resolve_target(&self, name: &str, bound: bool) -> Result<String, SQLError>

Source§

impl MutationTextIndex for Engine

Source§

fn text_fields( &self, table: &str, document: &Document, ) -> Result<BTreeMap<FieldName, String>, SQLError>

Source§

fn add_documents( &self, table: &str, documents: Vec<(DocId, BTreeMap<FieldName, String>)>, ) -> Result<(), SQLError>

Source§

impl MutationTupleMetadata for Engine

Source§

fn table_relation_oid(&self, table: &str) -> Result<i64, SQLError>

Read the canonically bound storage relation identity without constructing a database-wide catalog for each row image.
Source§

fn document_metadata( &self, table: &str, doc_id: DocId, ) -> Result<Option<DocumentMetadata>, SQLError>

Source§

fn tuple_version_xid(&self) -> Result<u32, SQLError>

Source§

impl NamespaceCatalogChanges for Engine

Source§

impl NamespaceCatalogRefresh for Engine

Source§

impl OperatorJoinBinding for Engine

Source§

fn lower( &self, name: &str, relations: Option<&OperatorJoinRelations>, args: &[ScalarExpr], params: &[SQLParam], ) -> Result<(OperatorJoinRelations, OperatorTree), SQLError>

Source§

impl OwnedSequenceSecurityCatalog for Engine

Source§

impl PartitionCatalog for Engine

Source§

fn try_table_hierarchy(&self, table: &str) -> Result<TableHierarchy, String>

Source§

fn direct_hierarchy_children( &self, parent: &str, ) -> Result<Vec<String>, SQLError>

Source§

fn try_resolve_table_name(&self, name: &str) -> Result<Option<String>, String>

Source§

fn try_resolve_table_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<String>>, SQLError>

Source§

fn try_describe_table( &self, table: &str, ) -> Result<Option<Vec<ColumnDef>>, String>

Source§

fn try_table_object_id(&self, table: &str) -> Result<Option<[u8; 16]>, String>

The object identity of a table, which survives renames.
Source§

impl PartitionExpressions for Engine

Source§

fn expression_text(&self, expression: &Expr) -> Result<String, SQLError>

Reconstruct a stored key using its retained type and routine identities and current catalog names.
Source§

fn evaluate_bound( &self, expression: &Expr, params: &[SQLParam], ) -> Result<Value, SQLError>

Source§

fn evaluate_row( &self, expression: &Expr, row: &dyn RowLookup, schema: &RowSchema, params: &[SQLParam], ) -> Result<Value, SQLError>

Source§

impl PhysicalExplainPlanning for Engine

Source§

fn explained_plan_estimates( &self, body: &UnifiedPlan, params: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<Produced<Vec<ExplainNodeEstimate>>, SQLError>

Source§

fn plan_explained_statement( &self, body: PlanRef<'_>, ) -> Result<OwnedExecutablePlan, SQLError>

Optimize the already analyzed body only after the command has interpreted its options.
Source§

fn physical_explain_plan( &self, body: &UnifiedPlan, params: &[SQLParam], costs: bool, control: &ProductionControl<'_>, ) -> Result<Produced<ExplainPhysicalPlan>, SQLError>

Source§

impl PhysicalTextRetrieval for Engine

Source§

fn validate_text_search_field( &self, table: &str, field: &str, ) -> Result<(), SQLError>

Source§

fn fts_fields_for_table(&self, table: &str) -> Result<Vec<String>, SQLError>

Source§

fn bayesian_params_for_relation( &self, table: &str, signal_table: &str, field: &str, ) -> Result<BayesianBM25Params, SQLError>

Source§

fn search_leaf( &self, table: &str, field: &str, query: &str, mode: &ScoringMode, limit: usize, top_k: Option<TextTopKPlan>, ) -> Result<Vec<ScoredEntry>, SQLError>

Source§

fn visit_search_leaf( &self, table: &str, field: &str, query: &str, mode: &ScoringMode, visitor: &mut dyn FnMut(ScoredEntry) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Source§

impl PhysicalVectorRetrieval for Engine

Source§

fn knn_search_leaf( &self, table: &str, field: &str, query: &[f32], k: usize, diagnostics: Option<&CapturedDiagnostics>, ) -> Result<Vec<ScoredEntry>, SQLError>

Source§

impl PlannerStatisticsCatalog for Engine

Source§

impl PointMutationStorage for Engine

Source§

fn find_doc_id_by_field( &self, table: &str, field: &str, value: &Value, ) -> Result<Option<DocId>, SQLError>

Source§

fn patch_document_fields_with_vector_values( &self, table: &str, doc_id: DocId, updates: &BTreeMap<String, Value>, vectors: &RowUpdateVectors, ) -> Result<bool, SQLError>

Patch the same command-visible version as the identity lookup, including an unpublished row; a command tombstone is absent.
Source§

impl PortalRelationCatalog for Engine

Source§

impl PortalTransitionRelations for Engine

Source§

impl PreparedArgumentScopes for Engine

Source§

fn with_scope( &self, parameters: &[SQLParam], operation: &mut ScopedArgumentOperation<'_>, ) -> Result<Vec<SQLParam>, SQLError>

Source§

impl PreparedDefinitionRegistry for Engine

Source§

impl PreparedPlanOptimization for Engine

Source§

impl PreparedPlanProvider for Engine

Source§

impl PreparedPlanSession for Engine

Source§

impl PreparedPlanState for Engine

Source§

impl PreparedSessionMetadata for Engine

Source§

impl QueryDocumentRead for Engine

Source§

fn document_ids(&self, table: &str) -> Result<Vec<DocId>, SQLError>

Source§

fn document( &self, table: &str, doc_id: DocId, ) -> Result<Option<Document>, SQLError>

Source§

fn document_fields( &self, table: &str, ids: &[DocId], fields: &[&str], ) -> Result<BTreeMap<DocId, Vec<Value>>, SQLError>

Source§

fn column_definitions( &self, table: &str, ) -> Result<Option<Vec<ColumnDef>>, String>

Source§

fn command_overlay_holds(&self, table: &str) -> Result<bool, SQLError>

Whether a read of table merges changes from the command overlay that the table’s storage view does not show. A read of a table for which this is false sees exactly its storage view.
Source§

impl QueryEffectCatalog for Engine

Source§

impl QueryIndexRead for Engine

Source§

fn visit_value_index( &self, table: &str, field: &str, predicate: &Predicate, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Visit support without collecting a posting list, retaining the same selected snapshot and predicate observation. False means unsupported and must not follow any callback.
Source§

fn visit_exact_command_matches( &self, table: &str, field: &str, value: &Value, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<DocumentChanges, SQLError>

Capture every cached command match before returning its exact frame mask. The callback captures identities and must not reenter the engine.
Source§

fn value_index_scan( &self, table: &str, field: &str, predicate: &Predicate, ) -> Result<Option<PostingList>, SQLError>

Probe stored values and record the original serializable predicate observation.
Source§

fn command_overlay_changes( &self, table: &str, ) -> Result<Option<DocumentChanges>, SQLError>

Source§

fn exact_command_matches( &self, table: &str, field: &str, value: &Value, ) -> Result<CommandIndexProbe, SQLError>

Capture command-only masks together with cached matches from the same frame stack.
Source§

impl QueryOutputRewriter for Engine

Source§

fn optimize_retained_query( &self, query: MutableQueryPlan, control: &ProductionControl<'_>, ) -> Result<OwnedQueryPlan, SQLError>

Consume the private catalog-query destination before assembling its streaming or materialized execution path. The caller has already restored layouts and applied its output demand.
Source§

fn prune_owned_query_outputs( &self, query: MutableQueryPlan, aliases: &[String], projection: &SourceProjection, schema: &RowSchema, visible_ctes: &dyn Fn(&str) -> bool, control: &ProductionControl<'_>, ) -> Result<MutableQueryPlan, SQLError>

Source§

fn push_output_filter( &self, query: &QueryPlan, qualifier: &str, filter: &ScalarExpr, columns: Option<&[String]>, ) -> Result<Option<OwnedQueryPlan>, SQLError>

Return a plan that applies the complete output predicate, or None when the caller must retain it.
Source§

fn push_derived_output_filter( &self, query: &QueryPlan, qualifier: &str, filter: &ScalarExpr, columns: Option<&[String]>, ) -> Result<Option<OwnedQueryPlan>, SQLError>

Place a predicate inside an ordinary derived source. Recursive specialization keeps its separate effect boundary through push_output_filter.
Source§

impl QueryRowLockSession for Engine

Source§

impl QueryTableAccess for Engine

Source§

fn index_read_control(&self) -> Result<StorageReadControl, SQLError>

Source§

fn serializable_read( &self, name: &str, ) -> Result<Option<SerializableRelationRead>, SQLError>

Source§

fn table(&self, name: &str) -> Result<Arc<dyn TableRead>, SQLError>

Source§

fn index_holds_fields( &self, name: &str, table: &Arc<dyn TableRead>, fields: &[String], ) -> Result<bool, SQLError>

Whether the indexes of table, the handle Self::table returned for name, hold fields for every row, loading or building what the catalog provides. An index-only read then projects those fields without reading a document.
Source§

fn table_row_estimate(&self, name: &str) -> Result<u64, SQLError>

An estimate of the rows a read of the table sees, which costs no work in the number of changes it merges; scans size their output by it.
Source§

impl RangeCanonicalInvocation for Engine

Source§

fn invoke_canonical( &self, catalog: &CatalogReadView, oid: u32, value: &Value, control: &ProductionControl<'_>, ) -> Result<Produced<Value>, SQLError>

Source§

impl RangeRegistryPublication for Engine

Source§

impl ReferencingTableAccess for Engine

Source§

impl ReferentialCatalog for Engine

Source§

fn session_replication_role_is_replica(&self) -> bool

Source§

fn partition_ancestor_tables( &self, table: &str, ) -> Result<Vec<String>, SQLError>

The relation followed by each partitioned table it is a partition of, nearest first, as crate::semantics::partition::partition_ancestor_tables returns them.
Source§

fn try_referrers_to( &self, table: &str, ) -> Result<Vec<(String, ForeignKey)>, String>

Source§

impl ReferentialDeferrals for Engine

Source§

fn defer_foreign_key_check( &self, constraint_table: &str, firing_table: &str, row: (&str, DocId), foreign_key: &ForeignKey, derived: Option<&ReferencedPartitionConstraint>, values: Arc<[Value]>, ) -> Result<(), SQLError>

Source§

fn defer_foreign_key_parent_event( &self, constraint_table: &str, firing_table: &str, foreign_key: &ForeignKey, derived: Option<&ReferencedPartitionConstraint>, ) -> Result<(), SQLError>

Source§

impl ReferentialSnapshots for Engine

Source§

impl RelationAlterNames for Engine

Source§

impl RelationCandidateState for Engine

Source§

impl RelationCounts for Engine

Source§

impl RelationCreationRuntime for Engine

Source§

fn relation_array_name( &self, relation: &RelationIdentity, array_oid: u32, ) -> Option<String>

Source§

fn displace_generated_array( &self, identity: &RelationIdentity, ) -> Result<bool, SQLError>

Source§

fn displace_relation_array( &self, identity: &RelationIdentity, ) -> Result<bool, SQLError>

Source§

fn synchronize_catalog_registries(&self) -> StorageBackendResult<()>

Source§

fn synchronize_table_catalog(&self) -> StorageBackendResult<()>

Source§

fn synchronize_table_data(&self) -> StorageBackendResult<()>

Source§

fn backend_transaction_is_deferred(&self) -> bool

Source§

fn fence_catalog_writer_and_refresh_snapshot(&self) -> Result<(), SQLError>

Source§

fn create_temporary_namespace(&self) -> Result<(), SQLError>

Create the session’s temporary namespace and its TOAST namespace with the counter’s next OIDs, which a rollback past this point forgets.
Source§

impl RelationDefinitionSession for Engine

Source§

impl RelationDropCatalog for Engine

Source§

impl RelationEventAlterTransactions for Engine

Source§

impl RelationLockCatalog for Engine

Source§

fn relation_object_id(&self, name: &str) -> Result<Option<[u8; 16]>, SQLError>

Source§

fn relation_object_id_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<[u8; 16]>, SQLError>

Source§

fn relation_catalog_oid(&self, name: &str) -> Result<Option<u32>, SQLError>

The pg_class OID of a table, view, materialized view or foreign table, which addresses its catalog tuple.
Source§

fn table_name(&self, object_id: [u8; 16]) -> Option<String>

Source§

fn table_name_with_control( &self, object_id: [u8; 16], control: &ProductionControl<'_>, ) -> Result<Option<Produced<String>>, SQLError>

Source§

fn relation_name(&self, object_id: [u8; 16]) -> Option<String>

The current name of the table, view, materialized view, sequence or foreign table with the object identity.
Source§

impl RelationLockSession for Engine

Source§

impl RelationOwnerSchemas for Engine

Source§

impl RelationRemovalEvents for Engine

Source§

fn ensure_no_pending_trigger_events( &self, table: &str, action: &str, ) -> Result<(), SQLError>

Source§

impl RelationRemovalLocks for Engine

Source§

fn lock_exclusive(&self, table: &str) -> Result<(), SQLError>

Source§

impl RelationRemovalPrivileges for Engine

Source§

impl RelationRemovalTransactions for Engine

Source§

impl RelationRemovalViews for Engine

Source§

impl RelationRenameDependencies for Engine

Source§

impl RelationRetrieval for Engine

Source§

fn prepare_accelerated<'a>( &'a self, table: &'a str, signal_table: &'a str, predicate: Option<&ScalarExpr>, params: &'a [SQLParam], capture_complete_scores: bool, ) -> Result<Option<ScoredEntriesProducer<'a>>, SQLError>

Source§

fn optimized( &self, table: &str, predicate: Option<&ScalarExpr>, params: &[SQLParam], ) -> Result<Option<Vec<ScoredEntry>>, SQLError>

Source§

fn captured( &self, table: &str, predicate: Option<&ScalarExpr>, params: &[SQLParam], ) -> Result<Option<ProducedScoredEntries>, SQLError>

Source§

fn function( &self, table: &str, signal_table: &str, name: &str, args: &[ScalarExpr], params: &[SQLParam], top_k: Option<usize>, ) -> Result<Vec<ScoredEntry>, SQLError>

Source§

impl RelationRetrievalPlanner for Engine

Source§

fn accelerated_tree( &self, table: &str, expression: &ScalarExpr, tree: OperatorTree, ) -> Result<Option<OperatorTree>, SQLError>

Source§

fn text_top_k( &self, table: &str, tree: OperatorTree, top_k: usize, ) -> Result<OperatorTree, SQLError>

Source§

impl RetrievalAccess for Engine

Source§

fn direct_vector_retrieval( &self, predicate: &ScalarExpr, params: &[SQLParam], ) -> Result<Option<DirectVectorRetrieval>, SQLError>

Source§

fn knn_entries( &self, table: &str, field: &str, query: &[f32], top_k: usize, committed: bool, ) -> Result<Vec<ScoredEntry>, SQLError>

Source§

fn retrieval_entries( &self, table: &str, predicate: &ScalarExpr, params: &[SQLParam], committed: bool, ) -> Result<Option<Vec<ScoredEntry>>, SQLError>

Source§

fn retrieval_input( &self, table: &str, predicate: &ScalarExpr, params: &[SQLParam], committed: bool, ) -> Result<Option<ProducedScoredEntries>, SQLError>

Source§

impl RetrievalDocuments for Engine

Source§

fn get_document( &self, table: &str, doc_id: DocId, ) -> Result<Option<Document>, SQLError>

Source§

impl RetrievalGraphs for Engine

Source§

impl RetrievalIndexes for Engine

Source§

impl RetrievalModels for Engine

Source§

impl RetrievalPlanOptimizer for Engine

Source§

fn optimize( &self, table: &str, tree: &OperatorTree, ) -> Result<OperatorTree, SQLError>

Source§

impl RetrievalPlanningCatalog for Engine

Source§

fn production_resources(&self) -> Result<Option<PlanningResources>, SQLError>

Retain the invoking allowance for statistics production. Standalone catalogs may use ordinary allocation.
Source§

fn has_table(&self, table: &str) -> Result<bool, String>

Source§

fn resolve_table_name(&self, table: &str) -> Result<Option<String>, String>

Source§

fn list_catalog_indexes(&self) -> Result<CatalogIndexSnapshot, String>

Source§

fn value_index_cardinality( &self, table: &str, field: &str, predicate: &Predicate, ) -> Result<Option<usize>, SQLError>

Source§

fn value_index_supports( &self, table: &str, field: &str, predicate: &Predicate, ) -> Result<bool, String>

Source§

fn text_top_k_capabilities( &self, table: &str, field: &str, query: &str, ) -> Result<TextTopKCapabilities, SQLError>

Read analyzed term and indexed-document counts under one retained text-index guard.
Source§

fn table_doc_count(&self, table: &str) -> Result<u64, SQLError>

Source§

fn try_query_table( &self, table: &str, ) -> Result<Option<Box<dyn RetrievalStatisticsTable>>, String>

Source§

fn try_query_column_stats( &self, table: &str, ) -> Result<ColumnStatistics, String>

Source§

fn graph_snapshot( &self, graph: &str, ) -> Result<Option<GraphStatisticsSnapshot>, String>

Read all four graph populations under one snapshot before returning.
Source§

impl RetrievalRelations for Engine

Source§

fn serializable_read( &self, table: &str, ) -> Result<Option<SerializableRelationRead>, SQLError>

Source§

fn try_describe_query_table( &self, table: &str, ) -> StorageBackendResult<Option<Vec<ColumnDef>>>

Source§

fn has_table(&self, table: &str) -> StorageBackendResult<bool>

Source§

fn column_type( &self, table: &str, field: &str, ) -> StorageBackendResult<Option<ColumnType>>

Source§

fn table_doc_ids(&self, table: &str) -> Result<Vec<DocId>, SQLError>

Source§

fn table_doc_id_page( &self, table: &str, after: Option<DocId>, limit: usize, control: &StorageReadControl, ) -> Result<BudgetedVec<DocId>, SQLError>

Source§

fn get_document_fields( &self, table: &str, ids: &[DocId], field: &str, ) -> Result<BTreeMap<DocId, Value>, SQLError>

Source§

fn capture_document_filter( &self, table: &str, ids: &SelectedIds, field: &str, predicate: &Predicate, bytes: usize, cancellation: &CancellationToken, ) -> Result<CapturedScoredEntries, SQLError>

Retain the selected projection context and its original read/evaluation ordering while capturing complete filter support.
Source§

impl RetrievalSnapshots for Engine

Source§

fn snapshot_context( &self, table: &str, ) -> Result<Option<ExecutionContext>, SQLError>

Source§

fn snapshot_context_for_scores( &self, table: &str, ) -> Result<Option<ExecutionContext>, SQLError>

Retain the relation boundary for already evaluated score signals. Fusion does not read vector indexes; adapters can omit their physical snapshots.
Source§

fn snapshot_context_with_document_store( &self, table: &str, documents: Arc<dyn DocumentStore>, ) -> Result<Option<ExecutionContext>, SQLError>

Source§

fn get_documents_with_materialized_projection( &self, table: &str, ids: &[DocId], projection: &[String], ) -> Result<BTreeMap<DocId, Document>, SQLError>

Source§

impl RetrievalSourceCosting for Engine

Source§

impl RetrievalTransactionState for Engine

Source§

impl ReturningCatalog for Engine

Source§

fn try_describe_table_row_type( &self, table: &str, ) -> Result<Option<Vec<ColumnDef>>, String>

Source§

fn with_table_row_type_with_control( &self, name: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&[ColumnDef]) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Lend the current row declaration without evaluating defaults or generated expressions.
Source§

fn try_table_columns(&self, table: &str) -> Result<Vec<String>, String>

Source§

fn visit_column_names_with_control( &self, table: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&str) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Visit declared names without resolving DEFAULT or generated expressions. Native catalogs lend an immutable declaration generation without copying its payloads.
Source§

fn view_schema(&self, table: &str) -> Result<Option<RowSchema>, SQLError>

Source§

impl ReturningScope for Engine

Source§

impl RewriteRowChanges for Engine

Source§

fn storage_generation(&self, table: &str) -> Result<[u8; 16], SQLError>

Source§

fn visit_changes( &self, visit: &mut dyn FnMut(&[TransactionRowChange]) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Source§

impl RoleCatalogGuards for Engine

Source§

fn role_definitions(&self) -> RoleDefinitionRead<'_>

Source§

fn role_memberships(&self) -> RoleMembershipRead<'_>

Source§

fn with_role_catalogs_with_control( &self, control: &ProductionControl<'_>, read: &mut RoleCatalogVisitor<'_>, ) -> Result<(), SQLError>

Native catalogs lend stack-held guards; external catalogs retain their existing guard callbacks.
Source§

fn inquiry_role_definitions(&self) -> Result<RoleDefinitionRead<'_>, SQLError>

Capture current definitions for explicit inquiry subjects without requiring publication into a retained catalog.
Source§

impl RoleDependencyCatalog for Engine

Source§

impl RoleNotices for Engine

Source§

fn notice(&self, notice: SQLNotice)

Source§

impl RolePublication for Engine

Source§

impl RoleReferenceNames for Engine

Source§

fn outer_role(&self) -> RoleReference

Session-selected role before any SECURITY DEFINER substitution.
Source§

fn current_role(&self) -> RoleReference

Source§

fn session_role(&self) -> RoleReference

Source§

fn authenticated_role(&self) -> RoleReference

Source§

impl RoleRegistry for Engine

Source§

impl RoleSharedDependencies for Engine

Source§

fn role_dependency_detail( &self, role: RoleIdentity, ) -> Result<Option<String>, SQLError>

The detail listing the objects that depend on role; None when nothing does. Projection may restore catalog state, so callers release registry guards before invoking it.
Source§

impl RoleTargetSchemaAccess for Engine

Source§

fn require_schema_create( &self, schema: &str, role: &RoleReference, ) -> Result<(), SQLError>

Source§

impl RoutineBodySession for Engine

Source§

impl RoutineCompilationCatalog for Engine

Source§

fn binding_snapshot_with_control( &self, control: &ProductionControl<'_>, ) -> Result<ControlledBindingSnapshot, SQLError>

External adapters retain their ordinary callback boundary; native implementations construct each captured name under this control.
Source§

fn stored_query_namespace_with_control( &self, control: &ProductionControl<'_>, ) -> Result<ControlledStoredQueryNamespace, SQLError>

Source§

fn has_registered_aggregate_function(&self, name: &str) -> bool

Source§

fn binding_snapshot(&self) -> Result<BindingSnapshot, SQLError>

Source§

fn stored_query_namespace(&self) -> StoredQueryNamespace

Source§

impl RoutineCompilationSession for Engine

Source§

fn routine_search_path(&self) -> Vec<String>

Source§

fn replace_routine_search_path(&self, path: Vec<String>) -> Vec<String>

Source§

fn restore_routine_search_path(&self, path: Vec<String>)

Source§

fn routine_settings_scope( &self, settings: &[(String, String)], ) -> Result<Box<dyn RoutineConfigurationGuard + '_>, SQLError>

Apply a routine’s own settings, as a call of the routine applies them, until the returned scope is dropped.
Source§

impl RoutineConfigurationSession for Engine

Source§

fn routine_configuration_guard(&self) -> Box<dyn RoutineConfigurationGuard + '_>

Source§

fn set_routine_variable(&self, name: &str, value: &str) -> Result<(), SQLError>

Source§

fn show_routine_variable(&self, name: &str) -> Result<String, SQLError>

Source§

fn routine_variable_name(&self, name: &str) -> Result<String, SQLError>

The canonical spelling of the parameter name refers to, which a routine’s configuration stores.
Source§

fn load_language_library(&self, language: &str)

Load the library of the routine’s language into the session, as calling its validator does.
Source§

impl RoutineDropNotices for Engine

Source§

impl RoutineExecutionAuthority for Engine

Source§

fn current_role(&self) -> RoleReference

Source§

fn current_user_has_role_identity_privileges(&self, role: RoleIdentity) -> bool

Source§

fn current_user_has_role_identity_privileges_with_control( &self, role: RoleIdentity, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

External authorities keep their own membership implementation. Native authorities admit their membership traversal with the invoking planner’s control.
Source§

impl RoutineExpressions for Engine

Source§

impl RoutineInvocationSession for Engine

Source§

fn plpgsql_body( &self, function: &SQLUserFunction, definition: &CreateFunction, relation: Option<i64>, ) -> Result<Arc<CompiledFunctionBody>, SQLError>

Source§

fn depth_limit(&self) -> usize

Source§

fn state_guard( &self, configured: bool, security_definer: bool, ) -> Box<dyn RoutineInvocationState + '_>

Source§

fn set_current_user(&self, user: RoleIdentity) -> Result<(), SQLError>

Source§

fn set_configured_parameter( &self, name: &str, value: &str, ) -> Result<(), SQLError>

Source§

fn plpgsql_variable_conflict(&self) -> VariableConflict

The plpgsql.variable_conflict setting a PL/pgSQL body compiled now takes, with the language’s library loaded as its call handler loads it.
Source§

impl RoutineNameCatalog for Engine

Source§

fn schema_security(&self, schema: &str) -> Option<BoundSchemaSecurity>

Source§

fn current_role(&self) -> RoleReference

Source§

fn search_path(&self) -> Vec<String>

Source§

fn search_path_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<Vec<String>>, SQLError>

Source§

fn temporary_schema(&self) -> Option<String>

The canonical name of this session’s temporary namespace after its allocation.
Source§

fn temporary_schema_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Option<Produced<String>>, SQLError>

Source§

fn schema_exists_with_control( &self, schema: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Source§

fn require_schema_usage( &self, schema: &str, role: &RoleReference, ) -> Result<(), SQLError>

Source§

fn schema_has_usage(&self, schema: &str, role: &RoleReference) -> bool

Source§

fn schema_has_usage_with_control( &self, schema: &str, role: &RoleReference, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Source§

fn require_schema_usage_with_control( &self, schema: &str, role: &RoleReference, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn routine_type_display(&self, type_name: &str) -> String

format_type_be of a routine argument type: a user-defined type, recorded by identity, is spelled by its current name.
Source§

fn routine_identity_display(&self, oid: u32) -> Result<String, SQLError>

format_procedure of an existing routine, including search-path qualification and its current input type names. Call before retaining the routine registry’s write guard.
Source§

impl RoutineOverloadCatalog for Engine

Source§

impl RoutineParserCatalog for Engine

Source§

impl RoutinePlanExpressions for Engine

Source§

fn evaluate_constant_routine_with_control( &self, expression: &ScalarExpr, control: &ProductionControl<'_>, ) -> Result<Produced<Value>, SQLError>

Evaluate a constant call and admit its distinct planning destination before copying the result. Native evaluators also admit their temporary scalar and scope inputs; interpreter rows and results retain their existing execution ownership.
Source§

fn evaluate_constant_routine( &self, expression: &ScalarExpr, ) -> Result<Value, SQLError>

Execute only an immutable call whose inputs the planner proved constant. The existing runtime boundary retains authorization and session body caches.
Source§

impl RoutinePortals for Engine

Source§

fn ensure_available(&self, name: &str) -> Result<(), SQLError>

Source§

fn open( &self, params: &[SQLParam], name: &str, scroll: Option<bool>, plan: &UnifiedPlan, source_sql: &str, ) -> Result<(), SQLError>

Source§

fn fetch(&self, request: &FetchCursorStmt) -> Result<SQLResult, SQLError>

Source§

fn close(&self, name: &str) -> Result<(), SQLError>

Source§

fn allocate_name(&self) -> String

Source§

fn pin(&self, name: &str) -> Result<(), SQLError>

Source§

fn unpin(&self, name: &str) -> Result<(), SQLError>

Source§

impl RoutinePrivilegeNotices for Engine

Source§

impl RoutineRegclassCatalog for Engine

Source§

impl RoutineRegistryPublication for Engine

Source§

impl RoutineRegistryState for Engine

Source§

impl RoutineRenameDependents for Engine

Source§

impl RoutineResolution for Engine

Source§

fn routine_body( &self, function: &SQLUserFunction, ) -> Result<Arc<CompiledFunctionBody>, SQLError>

The compiled body of a routine as this session executes it: a bound body as defined, or a source body as this session compiled it. A resolver without a session holds only bound bodies.
Source§

fn routine_analysis_body( &self, function: &SQLUserFunction, ) -> Result<Arc<CompiledFunctionBody>, SQLError>

Inspect a body for static effects and portal dependencies. A session may compile source independently here without creating its execution cache entry or issuing diagnostics for a body the query never reaches.
Source§

fn lookup_bound_sql_functions( &self, name: &str, ) -> Option<Vec<Arc<SQLUserFunction>>>

Resolve an exact stored routine name without repeating visible-name lookup.
Source§

fn lookup_bound_sql_functions_by_binding( &self, binding: &FunctionBinding, ) -> Option<Vec<Arc<SQLUserFunction>>>

Source§

fn has_registered_scalar_function(&self, name: &str) -> bool

Source§

fn has_registered_table_function(&self, name: &str) -> bool

Source§

fn has_registered_scalar_function_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Native registries admit normalized lookup keys before allocation; external catalogs retain their existing scalar callback.
Source§

fn has_registered_table_function_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Native registries admit normalized lookup keys before allocation; external catalogs retain their established boolean callback.
Source§

fn has_registered_aggregate_function_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Source§

fn registered_table_function_columns(&self, name: &str) -> Option<Vec<String>>

A registered function’s stable output names, available without calling it. None means its result supplies the descriptor at execution.
Source§

fn registered_table_function_columns_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Vec<String>>>, SQLError>

Native registries copy borrowed declarations under the request allowance; external catalogs retain their metadata callback.
Source§

fn has_registered_aggregate_function(&self, name: &str) -> bool

Source§

fn lookup_visible_sql_functions( &self, name: &str, ) -> Result<Option<Vec<Arc<SQLUserFunction>>>, SQLError>

Source§

fn has_visible_sql_functions_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Native catalogs inspect immutable buckets; external catalogs preserve their visible lookup.
Source§

fn lookup_visible_sql_functions_for_analysis( &self, name: &str, ) -> Result<Option<Vec<Arc<SQLUserFunction>>>, SQLError>

Resolve candidate metadata without refreshing session-visible function state during analysis.
Source§

fn visible_function_returns_set_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Observe visible set-returning declarations without constructing candidate snapshots in native catalogs. External adapters retain their existing analysis lookup.
Source§

fn visible_function_setness_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<VisibleFunctionSetness, SQLError>

Observe the same visible, signature-shadowed candidates used by ordinary analysis without requiring a copied native candidate list.
Source§

fn select_bound_function_with_control( &self, binding: &FunctionBinding, control: &ProductionControl<'_>, ) -> Result<Option<Arc<SQLUserFunction>>, SQLError>

Select an already bound scalar routine. Native registries borrow their immutable bucket; custom catalogs may supply their existing candidate snapshot.
Source§

fn resolve_static_sql_function( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, ) -> Result<Option<Arc<SQLUserFunction>>, SQLError>

Source§

fn resolve_static_sql_function_match( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, ) -> Result<Option<StaticFunctionMatch>, SQLError>

Source§

fn resolve_static_sql_function_setness_with_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, control: &ProductionControl<'_>, ) -> Result<Option<bool>, SQLError>

Select the same routine as static expression analysis and observe only its set-returning declaration. Native adapters retain admitted overload workspace; external adapters keep the existing selection callback.
Source§

fn resolve_static_sql_function_strictness_with_control( &self, name: &str, binding: Option<&FunctionBinding>, call: RoutineCallDescriptor<'_>, control: &ProductionControl<'_>, ) -> Result<Option<bool>, SQLError>

Observe strictness after the same static function selection; native overload workspace retains the invoking allowance.
Source§

fn resolve_static_sql_function_match_with_control( &self, name: &str, binding: Option<&FunctionBinding>, call: RoutineCallDescriptor<'_>, control: &ProductionControl<'_>, ) -> Result<Option<OwnedStaticFunctionMatch>, SQLError>

Keep the selected invocation owned while callers derive table-result metadata.
Source§

fn resolve_static_sql_function_binding_with_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, control: &ProductionControl<'_>, ) -> Result<Option<Produced<FunctionBinding>>, SQLError>

Construct the selected table-call binding without adding scalar output-type validation.
Source§

fn resolve_table_function_overload_with_builtins_and_control( &self, name: &str, binding: Option<&FunctionBinding>, call: RoutineCallDescriptor<'_>, builtins: &[BuiltinFunctionOverload], control: &ProductionControl<'_>, ) -> Result<Option<Produced<ResolvedFunctionOverload>>, SQLError>

Source§

fn resolve_table_function_overload_with_builtins( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, builtins: &[BuiltinFunctionOverload], ) -> Result<Option<ResolvedFunctionOverload>, SQLError>

Source§

impl RoutineRestoreSchemas for Engine

Source§

fn routine_schema_exists(&self, schema: &str) -> bool

Source§

fn routine_user_type_identity(&self, type_name: &str) -> Option<String>

The identity of the restored user-defined type a signature type name spells, for signatures recorded before types were recorded by identity.
Source§

impl RoutineStatementInputs for Engine

Source§

impl RoutineStatementTransactions for Engine

Source§

fn with_rename(&self, operation: RoutineRenameWrite<'_>) -> Result<(), SQLError>

Source§

fn with_removal( &self, operation: RoutineRemovalWrite<'_>, ) -> Result<(), SQLError>

Source§

impl RoutineStatements for Engine

Source§

fn with_statement_scope_with_control( &self, control: &ProductionControl<'_>, analyze: ControlledStatementScopeOperation<'_>, ) -> Result<(), SQLError>

Source§

fn planning_resources(&self) -> Result<OwnedProductionControl, SQLError>

Retain the native request resources for statement preparation inside an activation. External executors without an admission contract preserve their ordinary allocation behavior.
Source§

fn body_input_context(&self) -> Option<SQLRoutineInputContext<'_>>

Source§

fn plpgsql_preparations( &self, definition: &CreateFunction, parsed: &PLpgSQLFunction, control: &ProductionControl<'_>, ) -> Result<Arc<PLpgSQLPreparations>, SQLError>

Source§

fn analyze_static_plan( &self, plan: &mut UnifiedPlan, parameters: &[SQLParam], ) -> Result<ProceduralPlanAnalysis, SQLError>

SQL analysis only: publication precedes optimization and statement effects.
Source§

fn analyze_static_plan_owned( &self, plan: MutableExecutablePlan, parameters: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<OwnedProceduralPlanAnalysis, SQLError>

Source§

fn parser_settings(&self) -> ParserSettings

Source§

fn execute_body_statement( &self, plan: UnifiedPlan, params: &[SQLParam], check: Option<StatementResultCheck<'_>>, ) -> Result<SQLResult, SQLError>

Run one statement of a SQL function body; check sees what the statement’s analysis derives about its result before it runs, as PostgreSQL checks a body’s final statement before running it.
Source§

fn select_body_plan( &self, entry: &PreparedStatementPlan, params: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<PreparedPlanSelection, SQLError>

Reuse the ordinary custom/generic selection policy for a retained routine statement, without registering it in the user’s PREPARE namespace.
Source§

fn select_simple_expression_plan( &self, entry: &PreparedStatementPlan, params: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<PreparedPlanSelection, SQLError>

Select the generic plan of an analyzed PL/pgSQL simple expression, preserving runtime parameters.
Source§

fn execute_selected_body_plan( &self, plan: &UnifiedPlan, params: &[SQLParam], ) -> Result<SQLResult, SQLError>

Execute an already selected plan under the current statement scope.
Source§

fn execute_bound( &self, statement: Statement, params: &[SQLParam], ) -> Result<SQLResult, SQLError>

Source§

fn execute_text( &self, text: &str, params: &[SQLParam], ) -> Result<SQLResult, SQLError>

Source§

fn optimize_plan( &self, plan: UnifiedPlan, ) -> Result<SharedExecutablePlan, SQLError>

Source§

fn optimize_owned_plan( &self, plan: MutableExecutablePlan, control: &ProductionControl<'_>, ) -> Result<SharedExecutablePlan, SQLError>

Source§

fn assertions_enabled(&self) -> bool

Source§

fn load_language_library(&self, language: &str)

Load the library of a procedural language into the session, as its call handler does on first use.
Source§

fn with_statement_scope( &self, analyze: StatementScopeOperation<'_>, ) -> Result<(), SQLError>

Run analyze with the routines and the catalog, namespace and transition relations that a statement the routine runs now is analyzed with.
Source§

impl RoutineSupportAuthority for Engine

Source§

impl RoutineTransactions for Engine

Source§

impl RoutineTypeCatalog for Engine

Source§

fn shell_type_oid(&self, name: &str) -> Result<Option<u32>, SQLError>

Resolve an undefined type without inventing a value layout.
Source§

fn require_type_oid_usage(&self, oid: u32) -> Result<(), SQLError>

Source§

fn try_describe_table( &self, name: &str, ) -> Result<Option<Vec<ColumnDef>>, String>

Source§

fn resolve_catalog_column_type(&self, name: &str) -> Option<ColumnType>

Source§

fn resolve_catalog_column_type_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

Source§

fn resolve_catalog_column_type_name( &self, name: &str, ) -> Result<ColumnType, SQLError>

Source§

fn resolve_catalog_column_type_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Produced<ColumnType>, SQLError>

An external catalog may return owned metadata; native catalogs override this to admit the selected projection before allocation.
Source§

fn resolve_catalog_user_type_by_oid(&self, oid: u32) -> Option<ColumnType>

Source§

fn format_type(&self, ty: &ColumnType) -> Result<String, SQLError>

The name PostgreSQL’s format_type_be gives a type in messages.
Source§

fn format_type_with_control( &self, ty: &ColumnType, control: &ProductionControl<'_>, ) -> Result<Produced<String>, SQLError>

Source§

fn format_type_oid(&self, oid: u32) -> Result<String, SQLError>

Render a carried record field’s type identity in a runtime diagnostic.
Source§

fn composite_types(&self) -> Option<&dyn CompositeTypeCatalog>

Live composite attributes used to validate a SQL routine’s returned row.
Source§

fn require_type_usage(&self, ty: &ColumnType) -> Result<(), SQLError>

USAGE on a type a routine declares, as crate::FunctionTypeResolver::require_type_usage requires it.
Source§

impl RoutineValueContext for Engine

Source§

impl RowLockReadSource for Engine

Source§

fn get_document( &self, table: &str, doc_id: DocId, ) -> Result<Option<Document>, SQLError>

Source§

fn get_document_for_mutation( &self, table: &str, doc_id: DocId, ) -> Result<Option<Document>, SQLError>

Source§

impl RowLockSession for Engine

Source§

impl RuleCatalog for Engine

Source§

fn relation_has_rules(&self, table: &str) -> Result<bool, SQLError>

Source§

fn resolve_rule_relation( &self, table: &str, ) -> Result<RelationIdentity, SQLError>

Source§

fn rules_for( &self, table: &str, event: RuleEvent, ) -> Result<Vec<StoredRule>, SQLError>

Source§

fn capture_rules( &self, table: &str, event: RuleEvent, ) -> Result<CapturedRules, SQLError>

Source§

fn capture_rules_with_control( &self, table: &str, event: RuleEvent, control: &ProductionControl<'_>, ) -> Result<CapturedRules, SQLError>

Capture active execution rules at the ordinary lookup boundary. Native catalogs retain the live immutable registry generation without copying its declarations.
Source§

fn resolve_mutation_target( &self, name: &str, bound: bool, ) -> Result<String, SQLError>

Source§

fn resolve_rule_relation_with_control( &self, table: &str, control: &ProductionControl<'_>, ) -> Result<Produced<RelationIdentity>, SQLError>

Source§

fn resolve_mutation_target_with_control( &self, name: &str, bound: bool, control: &ProductionControl<'_>, ) -> Result<Produced<String>, SQLError>

Source§

fn visit_rules_with_control( &self, table: &str, event: RuleEvent, reverse: bool, control: &ProductionControl<'_>, visit: &mut dyn FnMut(&StoredRule) -> Result<(), SQLError>, ) -> Result<(), SQLError>

External catalogs may supply owned metadata. Native catalogs override this observation to lend the selected immutable rule declarations directly.
Source§

impl RuleInputColumns for Engine

Source§

fn source_column_names( &self, table: &str, relations_bound: bool, ) -> Result<Option<Vec<String>>, SQLError>

Source§

fn source_column_names_with_control( &self, table: &str, relations_bound: bool, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Vec<String>>>, SQLError>

Source§

impl RuleSecurity for Engine

Source§

impl RuleSourceCatalog for Engine

Source§

fn query_source_columns( &self, name: &str, relations_bound: bool, ) -> Result<Option<Vec<String>>, SQLError>

Source§

fn rule_relation_definitions( &self, name: &str, ) -> Result<Vec<ColumnDef>, SQLError>

Source§

fn rule_relation_columns_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Produced<Vec<String>>, SQLError>

Source§

fn rule_relation_definitions_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Produced<Vec<ColumnDef>>, SQLError>

External catalogs may return an owned declaration; native catalogs override this to admit copies directly from retained inputs.
Source§

fn query_source_columns_with_control( &self, name: &str, relations_bound: bool, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Vec<String>>>, SQLError>

Source§

impl SQLValueCatalog for Engine

Source§

fn enum_label_uncommitted(&self, label_oid: u32) -> bool

Labels added by the outermost transaction to a type it did not create stay unusable until commit.

Source§

fn enum_type_name(&self, type_oid: u32) -> Result<Option<String>, SQLError>

The regtype spelling of an enum, read from the enum registry alone: label errors are raised while catalog restoration holds transaction state, where building the complete catalog projection must not be attempted.

Source§

fn compare_range_bounds( &self, range_oid: u32, left: &Value, right: &Value, control: &ProductionControl<'_>, ) -> Result<Ordering, SQLError>

Compare admitted bounds with the range’s captured operator class and collation. Invocation state belongs to the support-function owner; this operation must not perform endpoint input or range canonicalization.
Source§

fn range_bound_equality_key( &self, range_oid: u32, value: &Value, control: &ProductionControl<'_>, ) -> Result<Produced<Vec<u8>>, SQLError>

Return an admitted exact equality key for one finite bound under the same selected operation. Keys must coincide exactly when compare_range_bounds returns Equal; an ordinary hash is not an exact key. Execution owns this encoding and any selected normalization.
Source§

fn value_range_type( &self, oid: u32, ) -> Result<Option<Arc<RangeValueDescriptor>>, SQLError>

The selected endpoint layout of a range or multirange in this statement generation. Observation does not execute input, domain checks or a canonical support function.
Source§

fn value_type_by_oid_with_control( &self, oid: u32, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

Native catalogs project the selected descriptor under the consumer’s allowance; external adapters retain their returned metadata.
Source§

fn value_type_by_oid(&self, oid: u32) -> Result<Option<ColumnType>, SQLError>

The declared type for a physical OID, including domains, arrays and composites.
Source§

fn value_type_exists(&self, oid: u32) -> Result<bool, SQLError>

Whether an admitted physical OID names any current catalog type, including pseudo-types without a value carrier. This lookup does not check input privileges or execute type input.
Source§

fn value_composite_type( &self, oid: u32, ) -> Result<Option<Arc<CompositeTypeDescriptor>>, SQLError>

The current descriptor of an admitted composite value.
Source§

fn value_composite_type_with_control( &self, oid: u32, control: &ProductionControl<'_>, ) -> Result<Option<OwnedCompositeTypeDescriptor>, SQLError>

Source§

fn enum_type_comparison_states(&self) -> Option<&EnumTypeComparisonStates>

The session’s comparison support functions, shared by declared type across nested array and record calls. Pure catalog readers do not own runtime state.
Source§

fn enum_label_position( &self, label_oid: u32, ) -> Result<Option<(u32, usize)>, SQLError>

The actual enum type and zero-based label position of an admitted physical OID in this generation. Positions have declaration/key order and avoid copying label keys for comparison.
Source§

fn enum_value_by_oid( &self, label_oid: u32, ) -> Result<Option<EnumValue>, SQLError>

Resolve an already admitted physical label OID across enum types. Output uses the label’s actual identity even if a retained tuple now declares another enum type; it does not repeat input safety checks.
Source§

fn enum_type_labels( &self, type_oid: u32, ) -> Result<Option<Arc<EnumTypeLabels>>, SQLError>

The labels of one enum type in the statement’s catalog generation, or None when the catalog has no such type.
Source§

fn has_enum_types(&self) -> bool

Whether the statement catalog defines any enum type; binding skips enum literal validation otherwise.
Source§

fn value_regtype_output( &self, _ty: &ColumnType, _oid: i64, ) -> Result<Option<String>, SQLError>

Current SQL spelling of an admitted catalog OID alias; None retains numeric output.
Source§

impl ScalarSession for Engine

Source§

impl SchemaDropCatalog for Engine

Source§

impl SchemaDropNotices for Engine

Source§

impl SchemaExpressionCatalog for Engine

Source§

fn plan_schema_expression( &self, expression: &Expr, columns: &[ColumnDef], ) -> Result<PlannedSchemaExpression, SQLError>

Analyze original stored syntax, then plan a copy to classify its remaining functions. The planner owns simplification; the returned catalog expression retains its dependencies.
Source§

fn registered_runtime_function_volatility( &self, name: &str, ) -> Option<FunctionVolatility>

Source§

fn schema_expression_columns( &self, table: &str, ) -> Result<Option<Vec<ColumnDef>>, SQLError>

Source§

impl SchemaMemberRelocation for Engine

Source§

fn relocate_relation( &self, relation: &SchemaRelation, schema: &str, ) -> Result<(), SQLError>

Source§

fn relocate_routine( &self, registry_key: &str, schema: &str, ) -> Result<(), SQLError>

Source§

fn relocate_type( &self, name: &str, kind: TypeObjectKind, schema: &str, ) -> Result<(), SQLError>

Source§

impl SchemaMembers for Engine

Source§

fn relations(&self, schema: &str) -> StorageBackendResult<Vec<SchemaRelation>>

Source§

fn routines(&self, schema: &str) -> Vec<String>

Registry keys of the routines the schema holds.
Source§

fn types(&self, schema: &str) -> Vec<(String, TypeObjectKind)>

Qualified names of the enum, domain and composite types the schema holds, with the keyword that alters each.
Source§

impl SchemaOwnerTransactions for Engine

Source§

impl SchemaPrivilegeCatalog for Engine

Source§

fn refresh_namespace_catalog(&self) -> Result<(), SQLError>

Source§

fn schemas(&self) -> SchemaRegistryRead<'_>

Source§

fn graphs(&self) -> Box<dyn GraphNamespaceRead + '_>

Source§

fn temporary_namespace_oids(&self) -> Option<TemporaryNamespaceOids>

The OIDs of the session’s temporary namespace and its TOAST namespace once the session’s first temporary object created them.
Source§

fn temporary_schema_name(&self) -> String

Source§

fn temporary_namespace_allocated(&self) -> bool

Source§

impl SchemaPrivilegeNotices for Engine

Source§

impl SchemaPrivilegeRegistry for Engine

Source§

impl SchemaReferenceCatalog for Engine

Source§

impl SchemaRegistration for Engine

Source§

fn register_schema( &self, name: &str, if_not_exists: bool, role_owner: RoleIdentity, tuple: SchemaTupleIdentity, ) -> StorageBackendResult<bool>

Source§

impl SchemaRemovalNames for Engine

Source§

impl SchemaRemovalPublication for Engine

Source§

impl SchemaRenamePersistence for Engine

Source§

fn save_schema_row( &self, name: &str, security: &BoundSchemaSecurity, ) -> Result<(), SQLError>

Store the schema’s row under name.
Source§

fn drop_schema_row(&self, name: &str) -> Result<(), SQLError>

Remove the row under name once it holds no relation.
Source§

impl SchemaRenameRegistry for Engine

Source§

impl SchemaRenameTransactions for Engine

Source§

impl SchemaSecurityCatalog for Engine

Source§

impl SchemaSecurityPersistence for Engine

Source§

fn persist_security( &self, name: &str, security: &BoundSchemaSecurity, ) -> Result<(), SQLError>

Source§

impl SchemaSecurityPublication for Engine

Source§

fn publish_security(&self, name: &str, security: BoundSchemaSecurity)

Source§

impl SchemaStatementWriter for Engine

Source§

impl SchemaWriteTransaction for Engine

Source§

impl SequenceAlterTransactions for Engine

Source§

impl SequenceCommandCatalog for Engine

Source§

impl SequenceCreationNamespace for Engine

Source§

impl SequenceCreationPublication for Engine

Source§

fn insert_sequence( &self, name: &str, relation: &RelationIdentity, state: SequenceState, persistence: RelationPersistence, role_owner: RoleIdentity, catalog_oid: u32, ) -> Result<bool, SQLError>

Publish a new sequence with the pg_class OID reserved for it.
Source§

impl SequenceCreationTransactions for Engine

Source§

impl SequenceDefinitionCatalog for Engine

Source§

fn object_id(&self, relation: &RelationIdentity) -> Option<[u8; 16]>

Source§

fn state( &self, relation: &RelationIdentity, ) -> Result<Option<SequenceState>, SQLError>

The state of a sequence at its exact position: a replaced definition continues the values handed out, not the durable record that runs ahead of them.
Source§

fn owner_target(&self, owner: SequenceOwner) -> Option<(String, String, bool)>

Source§

impl SequenceDefinitionPublication for Engine

Source§

fn replace_sequence( &self, name: &str, relation: &RelationIdentity, object_id: [u8; 16], persistence: RelationPersistence, state: SequenceState, invalidate_current_cache: bool, ) -> Result<(), SQLError>

Source§

impl SequenceDependencyCatalog for Engine

Source§

impl SequenceIntrospectionCatalog for Engine

Source§

impl SequenceLifecycleCatalog for Engine

Source§

impl SequenceOwnerCatalog for Engine

Source§

impl SequenceOwnerNames for Engine

Source§

impl SequencePrivilegePublication for Engine

Source§

impl SequencePrivilegeResolution for Engine

Source§

impl SequenceRemovalInputs for Engine

Source§

impl SequenceRemovalPublication for Engine

Source§

fn remove_state(&self, name: &str) -> Result<bool, String>

Source§

impl SequenceRenameCatalog for Engine

Source§

fn has_catalog(&self) -> bool

Source§

fn rename_sequence_row( &self, source: &str, target: &str, ) -> StorageBackendResult<bool>

Source§

impl SequenceRestoreRegistry for Engine

Source§

impl SequenceSecurityCatalog for Engine

Source§

impl SequenceSecurityPublication for Engine

Source§

impl SequenceSnapshotSource for Engine

Source§

fn sequence_read_snapshot(&self) -> StorageBackendResult<SequenceReadSnapshot>

Sequence definitions with the value state of their durable records, which may run ahead of the values handed out.
Source§

fn sequence_position( &self, key: SequencePositionKey, ) -> StorageBackendResult<Option<RecordedSequencePosition>>

The exact position recorded for one allocation generation of a sequence, if its durable record runs ahead.
Source§

impl SequenceStateRename for Engine

Source§

impl SequenceValueRuntime for Engine

Source§

fn cancellation(&self) -> &CancellationToken

Source§

fn states_write(&self) -> SequenceStatesWrite<'_>

Source§

fn caches(&self) -> SequenceCachesWrite<'_>

Source§

fn session_read(&self) -> Box<dyn SequenceSessionRead + '_>

Source§

fn session_write(&self) -> Box<dyn SequenceSessionWrite + '_>

Source§

fn current_transaction_is_read_only(&self) -> bool

Source§

fn require_sequence_value_durability(&self) -> StorageBackendResult<()>

Source§

fn open_nontransactional_sequence_session( &self, ) -> StorageBackendResult<Option<PersistentStorageSession>>

Source§

fn prepare_explicit_transaction_writer(&self) -> Result<(), SQLError>

Source§

fn sequence_positions(&self) -> Option<&RowLockManager>

The store of exact sequence positions, when persistent sequence values are allocated by independent sessions outside the caller’s transaction. A durable record then runs ahead of the values handed out, and the position between two records lives in this store.
Source§

fn record_nontransactional_sequence_value( &self, definition_generation: [u8; 16], value: NontransactionalSequenceValue, defines_lastval: bool, )

Source§

impl SequenceValueTransactions for Engine

Source§

impl SerializableWrites for Engine

Source§

impl SharedObjectLockSession for Engine

Source§

impl ShellRegistryPublication for Engine

Source§

impl StatementAnalysisScopes for Engine

Source§

fn planning_control(&self) -> Result<OwnedProductionControl, SQLError>

Request ownership precedes analysis; optimizer catalog callbacks remain after successful analysis.
Source§

fn with_controlled_scope( &self, control: &ProductionControl<'_>, analyze: ControlledStatementAnalysisOperation<'_>, ) -> Result<(), SQLError>

Native scopes construct their retained inputs under the caller’s control; external factories preserve their scope callback.
Source§

fn with_scope( &self, analyze: StatementAnalysisOperation<'_>, ) -> Result<(), SQLError>

Source§

impl StatementCache for Engine

Source§

fn retire_sql_logical_plan( &self, sql: &str, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Retire the preliminary executable once planning owns its input. Parsed syntax and matching analyzed inputs remain available for subsequent invocations.
Source§

fn cached_sql_analysis(&self, sql: &str) -> Option<AnalyzedStatement>

Look up analysis after the statement’s snapshot and writer refreshes, with current catalog and scope validation. Ordinary cache implementations may decline this capability.
Source§

fn cache_sql_analysis( &self, sql: &str, analysis: Option<AnalyzedStatement>, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn cached_sql_statement(&self, sql: &str) -> Option<CachedStatement>

Source§

fn cache_sql_statement( &self, sql: &str, statement: Arc<Statement>, logical_plan: Option<SharedExecutablePlan>, parser: ParserMetadata, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn cache_optimized_sql_plan( &self, sql: &str, optimized_plan: SharedExecutablePlan, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

impl StatementControl for Engine

Source§

fn transaction_failed(&self) -> bool

Source§

fn run_transaction_statement( &self, statement: TransactionStmt, ) -> Result<(), SQLError>

Source§

fn set_constraints( &self, requested: &[SetConstraintName], deferred: bool, nested_statement: bool, ) -> Result<(), SQLError>

Source§

impl StatementDiagnostics for Engine

Source§

impl StatementEffects for Engine

Source§

impl StatementNotifications for Engine

Source§

fn notification_subscriptions_required(&self) -> bool

Source§

fn notify(&self, channel: &str, payload: &str) -> Result<(), SQLError>

Source§

fn listen(&self, channel: &str) -> Result<(), SQLError>

Source§

fn unlisten(&self, channel: Option<&str>) -> Result<(), SQLError>

Source§

impl StatementOptimizationContexts for Engine

Source§

fn production_resources(&self) -> Result<Option<PlanningResources>, SQLError>

Retain the invoking request’s allowance and cancellation signal while optimizer producers run. Standalone planning may remain uncontrolled.
Source§

fn constant_storage( &self, ) -> Result<Option<Arc<dyn ConstantValueStorage>>, SQLError>

Source§

fn constant_storage_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Option<Arc<dyn ConstantValueStorage>>, SQLError>

Native storage constructors admit retained metadata before allocation. External adapters may keep their existing factory and are checked at the callback boundary.
Source§

fn builtin_permissions(&self) -> Option<Arc<dyn BuiltinRoutineExecution>>

Source§

fn statistics(&self) -> StatementStatisticsContext<'_>

Source§

fn builtin_permissions_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Option<Arc<dyn BuiltinRoutineExecution>>, SQLError>

Native permission owners admit their shared state before allocation. External factories retain their established callback boundary.
Source§

fn rule_inputs(&self) -> RuleInputPlanningContext<'_>

Source§

fn routine_inlining(&self) -> Option<RoutineInliningContext<'_>>

Source§

impl StatementPortals for Engine

Source§

impl StatementSettings for Engine

Source§

fn set_runtime_parameter( &self, name: &str, value: Option<&str>, local: bool, ) -> Result<(), SQLError>

Source§

fn reset_all_variables(&self)

Source§

fn discard(&self, target: DiscardTarget) -> Result<(), SQLError>

Source§

fn load_library(&self, library: &str) -> Result<(), SQLError>

Source§

impl StatementTransactions for Engine

Source§

fn transaction_depth(&self) -> usize

Source§

fn commit_resolution_pending(&self) -> bool

A commit has sealed its effects but its durable outcome is unresolved. Statement cleanup must preserve that attempt instead of treating it as an ordinary aborted transaction.
Source§

fn current_transaction_is_read_only(&self) -> bool

Source§

fn mark_transaction_snapshot_set(&self)

Source§

fn retain_completed_statement_snapshot(&self)

Successful execution leaves session-owned caches current. Adapters may retain that exact private read view; an error, undo or later external change must still require ordinary refresh.
Source§

fn abort_after_error(&self, error: SQLError) -> SQLError

Source§

fn rollback(&self) -> Result<(), SQLError>

Source§

impl StoredColumnCatalog for Engine

Source§

impl StoredMergeColumnCatalog for Engine

Source§

impl StoredQuerySequences for Engine

Source§

fn query_sequence(&self, reference: &str) -> Result<String, String>

Source§

fn loaded_query_sequence(&self, reference: &str) -> Result<String, String>

Source§

impl StoredRelationCatalog for Engine

Source§

impl StoredSequenceNames for Engine

Source§

impl StoredSequenceRegistry for Engine

Source§

impl StoredSourceCatalog for Engine

Source§

impl StoredTableNames for Engine

Source§

impl SystemRelationSecurityCatalog for Engine

Source§

impl SystemRelationSecurityState for Engine

Source§

impl TableAlterSession for Engine

Source§

impl TableAsNamespace for Engine

Source§

impl TableAsPublication for Engine

Source§

fn create_relation( &self, name: &str, persistence: RelationPersistence, on_commit: OnCommitAction, owner: &RoleBinding, ) -> Result<(), SQLError>

Source§

fn create_vector_field( &self, name: &str, column: &str, dimensions: u32, ) -> Result<bool, SQLError>

Source§

fn publish_columns( &self, name: &str, columns: &[ColumnDef], ) -> Result<(), SQLError>

Source§

fn insert_document( &self, table: &str, id: DocId, document: Document, vectors: DocumentVectors, ) -> Result<(), SQLError>

Source§

impl TableAsQuerySource for Engine

Source§

fn optimize(&self, plan: &QueryPlan) -> Result<OwnedQueryPlan, SQLError>

Source§

fn execute( &self, plan: &QueryPlan, params: &[SQLParam], measurement: Option<&QueryMeasurement>, ) -> Result<SQLResult, SQLError>

Source§

impl TableCreationNamespace for Engine

Source§

impl TableCreationPublication for Engine

Source§

fn create_table( &self, name: &str, persistence: RelationPersistence, on_commit: OnCommitAction, owner: &RoleBinding, catalog_oids: RelationCatalogOids, ) -> StorageBackendResult<()>

Create the relation under the OIDs CREATE TABLE allocated for it where heap_create_with_catalog allocates them.
Source§

fn create_vector_field( &self, table: &str, field: String, dimensions: u32, ) -> StorageBackendResult<bool>

Source§

fn install_hierarchy( &self, table: &str, hierarchy: TableHierarchy, ) -> StorageBackendResult<()>

Source§

fn validate_default_partition_rows( &self, parent: &str, bound: &PartitionBound, ) -> Result<(), SQLError>

Reject a new partition whose bound accepts a row already stored in the parent’s default partition.
Source§

fn persist_schema(&self, table: &str) -> StorageBackendResult<bool>

Source§

fn refresh_value_indexes(&self, table: &str) -> StorageBackendResult<()>

Source§

impl TableCreationTransactions for Engine

Source§

impl TableEventLifecycle for Engine

Source§

fn rename_trigger( &self, table: &str, from: &str, to: &str, ) -> Result<(), SQLError>

Source§

fn rename_trigger_constraint( &self, table: &str, from: &str, to: &str, ) -> Result<(), SQLError>

Source§

fn rename_rule(&self, table: &str, from: &str, to: &str) -> Result<(), SQLError>

Source§

fn set_trigger_enable_mode( &self, table: &str, name: Option<&str>, mode: EventEnableMode, ) -> Result<(), SQLError>

Source§

fn set_rule_enable_mode( &self, table: &str, name: &str, mode: EventEnableMode, ) -> Result<(), SQLError>

Source§

impl TableFunctionSession for Engine

Source§

fn listening_channels(&self) -> Vec<String>

Source§

fn sequence_data(&self, args: &[Value]) -> Result<Value, SQLError>

Source§

fn sequence_parameters(&self, args: &[Value]) -> Result<Value, SQLError>

Source§

fn role_oid(&self, name: &str) -> Result<Option<i64>, SQLError>

The OID of the role with this name in the statement’s catalog.
Source§

impl TableGrantInputs for Engine

Source§

impl TableGrantPersistence for Engine

Source§

impl TableGrantRegistry for Engine

Source§

fn tables(&self) -> Box<dyn TableGrantRead<'_> + '_>

Source§

impl TableGrantResolution for Engine

Source§

impl TableLifecycle for Engine

Source§

fn rename_table(&self, from: &str, to: &str) -> StorageBackendResult<bool>

Source§

fn rename_column( &self, table: &str, from: &str, to: &str, ) -> StorageBackendResult<bool>

Source§

impl TableLockCatalog for Engine

Source§

impl TableLockSession for Engine

Source§

impl TableOwnerPublication for Engine

Source§

impl TableOwnerRegistry for Engine

Source§

fn table( &self, relation: &RelationIdentity, ) -> Option<Box<dyn TableOwnerState + '_>>

Source§

impl TablePrivilegeRegistry for Engine

Source§

fn refresh_tables(&self) -> StorageBackendResult<()>

Source§

fn refresh_catalog(&self) -> StorageBackendResult<()>

Source§

fn retained_table_with_control( &self, relation: &RelationIdentity, control: &ProductionControl<'_>, ) -> Result<Option<Arc<dyn TablePrivilegeState>>, SQLError>

Release the registry before observing a selected table’s immutable authority and column declarations.
Source§

fn tables(&self) -> Box<dyn TablePrivilegeRead + '_>

Source§

fn views(&self) -> PrivilegeViewsRead<'_>

Source§

fn foreign_tables(&self) -> PrivilegeForeignTablesRead<'_>

Source§

fn foreign_security(&self) -> PrivilegeForeignSecurityRead<'_>

Source§

impl TableRemovalCatalog for Engine

Source§

impl TableRemovalPublication for Engine

Source§

impl TableSchemaCatalog for Engine

Source§

impl TemporaryRoleDependencyCatalog for Engine

Source§

impl TemporaryRoleDependencyReads for Engine

Source§

impl TextMatchCatalog for Engine

Source§

fn has_table(&self, table: &str) -> Result<bool, String>

Source§

fn has_column(&self, table: &str, column: &str) -> Result<bool, String>

Source§

fn column_names(&self, table: &str) -> Result<Vec<String>, String>

Source§

fn indexed_fields(&self, table: &str) -> Result<Vec<String>, SQLError>

Source§

impl TextRetrieval for Engine

Source§

fn bayesian_params( &self, table: &str, field: &str, ) -> Result<BayesianBM25Params, SQLError>

Source§

fn search( &self, table: &str, field: &str, query: &str, mode: &ScoringMode, top_k: usize, ) -> Result<Vec<ScoredEntry>, SQLError>

Source§

impl TrainedModels for Engine

Source§

fn save_model(&self, name: &str, model: &DeepModel) -> Result<(), SQLError>

Source§

impl TrainingTables for Engine

Source§

fn training_table( &self, name: &str, ) -> StorageBackendResult<Option<Box<dyn TrainingTable + '_>>>

Source§

fn training_documents( &self, table: &str, doc_ids: &[DocId], projection: &[String], ) -> Result<BTreeMap<DocId, Document>, SQLError>

Source§

impl TriggerCatalog for Engine

Source§

fn has_row_triggers( &self, table: &str, event: TriggerEvent, ) -> Result<bool, SQLError>

Source§

fn trigger_relation_definitions( &self, table: &str, ) -> Result<Vec<ColumnDef>, SQLError>

Source§

fn triggers_for( &self, table: &str, timing: TriggerTiming, event: TriggerEvent, row: bool, updated_columns: &[String], ) -> Result<Vec<StoredTrigger>, SQLError>

Source§

fn row_trigger_definitions( &self, table: &str, timing: TriggerTiming, event: TriggerEvent, updated_columns: Option<&[String]>, ) -> Result<Vec<StoredTrigger>, SQLError>

The row triggers of table for a timing and an event, whatever replication role fires them. None includes every UPDATE column restriction; a statement resolves definitions once and applies the role at each firing.
Source§

fn has_trigger_definition( &self, table: &str, timing: TriggerTiming, event: TriggerEvent, row: bool, ) -> Result<bool, SQLError>

Source§

fn hierarchy_scan_tables( &self, table: &str, descendants: bool, ) -> Result<Vec<String>, SQLError>

Source§

fn rule_relation_columns( &self, table: &str, ) -> Result<Vec<(String, ColumnType)>, SQLError>

Source§

impl TriggerRoutineInvoker for Engine

Source§

impl TruncateAccess for Engine

Source§

impl TruncateCatalog for Engine

Source§

fn try_resolve_visible_relation_kind( &self, name: &str, ) -> Result<Option<(String, &'static str)>, SQLError>

Source§

fn is_partitioned(&self, table: &str) -> Result<bool, String>

Source§

fn hierarchy_scan_tables( &self, table: &str, descendants: bool, ) -> Result<Vec<String>, SQLError>

Source§

fn referrers_to(&self, table: &str) -> Result<Vec<String>, String>

Source§

fn partition_ancestor_tables( &self, table: &str, ) -> Result<Vec<String>, SQLError>

The relation followed by each partitioned table it is a partition of, nearest first.
Source§

impl TruncateStorage for Engine

Source§

fn truncate_tables_with_identity( &self, tables: &[String], restart_identity: bool, ) -> Result<(), SQLError>

Source§

impl TruncateTransactions for Engine

Source§

impl TruncateTriggers for Engine

Source§

fn ensure_no_pending_trigger_events( &self, table: &str, operation: &str, ) -> Result<(), SQLError>

Source§

fn fire_statement_trigger( &self, table: &str, timing: TriggerTiming, ) -> Result<(), SQLError>

Source§

impl TypeObjectAuthority for Engine

Source§

impl TypeObjectCatalog for Engine

Source§

fn temporary_schema(&self) -> Option<String>

The session’s allocated temporary namespace; merely looking up a type never creates it.
Source§

fn shell_by_type_oid(&self, oid: u32) -> Option<StoredShellType>

Source§

fn schema_security(&self, name: &str) -> Option<BoundSchemaSecurity>

Source§

fn resolve_drop_type_oid(&self, name: &str) -> Result<Option<i64>, SQLError>

Source§

fn format_drop_type(&self, oid: i64) -> Result<Option<String>, String>

Source§

fn enum_by_type_oid(&self, oid: u32) -> Option<StoredEnum>

An enum by its own type OID or by its generated array’s OID.
Source§

fn composite_by_type_oid(&self, oid: u32) -> Option<StoredComposite>

A standalone composite type by its own type OID or by its generated array’s OID.
Source§

fn user_array_element(&self, oid: u32) -> Option<u32>

The element type of a generated array of a user-defined type.
Source§

fn row_type_relation(&self, oid: u32) -> Option<RowTypeRelation>

The relation whose row type has this OID: its object kind, display name and owner.
Source§

impl TypeReferenceDependents for Engine

Source§

impl VacuumCatalog for Engine

Source§

fn resolve_relation_kind( &self, name: &str, ) -> Result<Option<(String, &'static str)>, SQLError>

Source§

fn require_table( &self, name: &str, ) -> Result<Box<dyn VacuumRelation + '_>, SQLError>

Source§

impl VacuumLocks for Engine

Source§

impl VacuumPrivileges for Engine

Source§

fn ensure_maintain(&self, table: &str) -> Result<(), SQLError>

Source§

impl VacuumRelations for Engine

Source§

fn require_table( &self, name: &str, ) -> Result<Box<dyn VacuumTable + '_>, SQLError>

Source§

fn scan_tables( &self, name: &str, descendants: bool, ) -> Result<Vec<String>, SQLError>

Source§

impl VacuumRows for Engine

Source§

impl VacuumStatisticsRefresh for Engine

Source§

fn table_names(&self, operation: &str) -> Result<Vec<String>, SQLError>

Source§

fn analyze_target( &self, table: &str, columns: &[String], descendants: bool, ) -> StorageBackendResult<()>

Source§

impl VacuumStorage for Engine

Source§

impl VacuumTransactions for Engine

Source§

impl ValueRestorationSession for Engine

Source§

impl VectorIndexCatalog for Engine

Source§

fn resolve_table_name(&self, name: &str) -> Result<Option<String>, SQLError>

Source§

fn column_type( &self, table: &str, column: &str, ) -> Result<Option<ColumnType>, SQLError>

Source§

fn vector_index_names( &self, table: &str, column: &str, ) -> Result<Vec<String>, SQLError>

Source§

impl VectorPoolRetrieval for Engine

Source§

fn query_pool( &self, table: &str, field: &str, query_vector: &[f32], k: usize, diagnostics: Option<&CapturedDiagnostics>, ) -> Result<Vec<ScoredEntry>, SQLError>

Source§

impl ViewAlterAccess for Engine

Source§

fn ensure_owner( &self, name: &str, view: &StoredView, ) -> Result<String, SQLError>

Source§

impl ViewAlterCatalog for Engine

Source§

impl ViewAlterPublication for Engine

Source§

impl ViewAlterTransactions for Engine

Source§

impl ViewCatalogCapabilities for Engine

Source§

impl ViewCatalogPublication for Engine

Source§

impl ViewColumnRenameInputs for Engine

Source§

impl ViewCreationCatalog for Engine

Source§

impl ViewCreationTransactions for Engine

Source§

impl ViewIdentityAllocation for Engine

Source§

impl ViewPlanBinding for Engine

Source§

fn lock_relations(&self, plan: &QueryPlan) -> Result<(), SQLError>

Source§

fn bind_relations(&self, plan: &mut QueryPlan) -> Result<bool, SQLError>

Source§

fn bind_routines( &self, plan: &mut QueryPlan, params: &[SQLParam], ) -> Result<RowSchema, SQLError>

Source§

fn bind_type_identities(&self, plan: &mut QueryPlan) -> Result<(), SQLError>

Record the user-defined types that the plan casts to by identity.
Source§

fn assign_input_collations(&self, plan: &mut QueryPlan) -> Result<(), SQLError>

Record each call’s input collation in a query whose routines are bound, as a view stored by an earlier release lacks them.
Source§

impl ViewPrivilegeCatalog for Engine

Source§

fn with_view_definition_with_control( &self, name: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(Option<&StoredView>) -> Result<(), SQLError>, ) -> Result<(), SQLError>

External authorization catalogs retain their existing callback boundary; native adapters lend their immutable generation.
Source§

fn ensure_query_select_with_control( &self, query: &QueryPlan, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn bound_role_with_control( &self, identity: RoleIdentity, control: &ProductionControl<'_>, ) -> Result<Produced<RoleReference>, SQLError>

Source§

fn ensure_query_select(&self, query: &QueryPlan) -> Result<(), SQLError>

Source§

fn view_definition(&self, name: &str) -> Result<Option<StoredView>, SQLError>

Source§

fn current_role(&self) -> RoleReference

Source§

fn bound_role(&self, identity: RoleIdentity) -> Result<RoleReference, SQLError>

Source§

fn ensure_view_privilege_for_with_control( &self, name: &str, view: &StoredView, subject: &RoleReference, privilege: TableAclPrivilege, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn ensure_view_column_privilege_for_with_control( &self, name: &str, view: &StoredView, column: &str, subject: &RoleReference, privilege: TableAclPrivilege, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn ensure_any_view_column_privilege_for_with_control( &self, name: &str, view: &StoredView, subject: &RoleReference, privilege: TableAclPrivilege, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn ensure_view_privilege_for( &self, name: &str, view: &StoredView, subject: &RoleReference, privilege: TableAclPrivilege, ) -> Result<(), SQLError>

Source§

fn ensure_view_column_privilege_for( &self, name: &str, view: &StoredView, column: &str, subject: &RoleReference, privilege: TableAclPrivilege, ) -> Result<(), SQLError>

Source§

fn ensure_any_view_column_privilege_for( &self, name: &str, view: &StoredView, subject: &RoleReference, privilege: TableAclPrivilege, ) -> Result<(), SQLError>

Source§

fn ensure_target_select( &self, request: TargetSelectPrivilegeRequest<'_, '_>, ) -> Result<(), SQLError>

Source§

fn ensure_target_select_with_control( &self, request: TargetSelectPrivilegeRequest<'_, '_>, control: &ProductionControl<'_>, ) -> Result<(), SQLError>

Source§

fn current_role_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<RoleReference>, SQLError>

Source§

impl ViewPublication for Engine

Source§

fn has_catalog(&self) -> bool

Source§

fn save_view(&self, row: &ViewRow) -> StorageBackendResult<()>

Source§

fn save_view_representation(&self, row: &ViewRow) -> StorageBackendResult<()>

Store another representation of the same admitted definition without replacing its analysis identity. Actual definition changes must use save_view.
Source§

impl ViewQueryOwners for Engine

Source§

fn with_owner( &self, owner: &RoleReference, operation: ViewOwnerQuery<'_>, ) -> Result<SQLResult, SQLError>

Source§

impl ViewRegistryState for Engine

Source§

impl ViewRemovalEvents for Engine

Source§

impl ViewRemovalPublication for Engine

Source§

fn drop_view( &self, relation: &RelationIdentity, object: Option<[u8; 16]>, ) -> StorageBackendResult<Option<bool>>

Source§

impl ViewRestoreNamespace for Engine

Source§

impl ViewRestoreSchemas for Engine

Source§

impl ViewRestoreSequences for Engine

Source§

impl ViewRewriteCatalog for Engine

Source§

fn visit_table_column_names_with_control( &self, name: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&str) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Native catalogs lend each declared name under its retained table guard; external catalogs may supply their existing owned names.
Source§

fn capture_rules( &self, name: &str, event: RuleEvent, ) -> Result<CapturedRules, SQLError>

Source§

fn capture_rules_with_control( &self, name: &str, event: RuleEvent, control: &ProductionControl<'_>, ) -> Result<CapturedRules, SQLError>

Source§

fn with_view_definition_with_control( &self, name: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(Option<ViewRewriteDefinitionRef<'_>>) -> Result<(), SQLError>, ) -> Result<(), SQLError>

External catalogs may return owned declarations; native catalogs lend fields from their retained immutable definition.
Source§

fn try_resolve_view_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<String>>, SQLError>

Source§

fn visit_rules_with_control( &self, name: &str, event: RuleEvent, reverse: bool, control: &ProductionControl<'_>, visit: &mut dyn FnMut(&StoredRule) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Source§

fn target_view_kind_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<StoredViewKind>, SQLError>

Source§

fn has_trigger_definition_with_control( &self, name: &str, timing: TriggerTiming, event: TriggerEvent, row: bool, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Source§

fn binding_scope_with_control( &self, control: &ProductionControl<'_>, ) -> Result<ControlledBindingSnapshot, SQLError>

Source§

fn restored_view_scope_with_control( &self, control: &ProductionControl<'_>, ) -> Result<ControlledBindingContext<'static>, SQLError>

Source§

fn view_definition( &self, name: &str, ) -> Result<Option<ViewRewriteDefinition>, SQLError>

Source§

fn try_resolve_view_name(&self, name: &str) -> Result<Option<String>, String>

Source§

fn try_describe_table( &self, name: &str, ) -> Result<Option<Vec<ColumnDef>>, String>

Source§

fn try_table_columns(&self, name: &str) -> Result<Vec<String>, String>

Source§

fn rules_for( &self, name: &str, event: RuleEvent, ) -> Result<Vec<StoredRule>, SQLError>

Source§

fn rule_definitions_for( &self, name: &str, event: RuleEvent, ) -> Result<Vec<StoredRule>, SQLError>

Source§

fn has_trigger_definition( &self, name: &str, timing: TriggerTiming, event: TriggerEvent, row: bool, ) -> Result<bool, SQLError>

Source§

fn rule_new_row_columns( &self, rule: &StoredRule, ) -> Result<Option<BTreeSet<String>>, SQLError>

Source§

fn rule_new_row_columns_with_control( &self, rule: &StoredRule, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Vec<String>>>, SQLError>

Source§

fn target_view_kind( &self, name: &str, ) -> Result<Option<StoredViewKind>, SQLError>

Source§

fn binding_scope(&self) -> Result<BindingSnapshot, SQLError>

Source§

fn restored_view_catalog(&self) -> (CatalogReadView, RelationNameResolution)

Source§

fn try_table_column_names_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Produced<Vec<String>>, SQLError>

External table catalogs may return owned names. Native adapters publish each selected declaration directly.
Source§

fn try_relation_column_names_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Vec<String>>>, SQLError>

Source§

impl VolatilityCatalog for Engine

Source§

fn host_function_volatility(&self, name: &str) -> Option<FunctionVolatility>

Source§

fn routine_volatility_with_control( &self, name: &str, binding: Option<&FunctionBinding>, control: &ProductionControl<'_>, ) -> Result<Option<FunctionVolatility>, SQLError>

Aggregate an external catalog’s completed metadata; native registries override this with a borrowed fold.
Source§

fn routine_volatilities( &self, name: &str, binding: Option<&FunctionBinding>, ) -> Option<Vec<FunctionVolatility>>

Source§

fn view_query(&self, name: &str) -> Result<Option<QueryPlan>, SQLError>

Source§

fn with_view_query( &self, name: &str, read: &mut dyn FnMut(&QueryPlan) -> Result<bool, SQLError>, ) -> Result<Option<bool>, SQLError>

Lend the selected view plan for one read. Catalogs retaining immutable definitions can override this adapter without constructing an owned plan.
Source§

fn with_view_query_with_control( &self, name: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&QueryPlan) -> Result<bool, SQLError>, ) -> Result<Option<bool>, SQLError>

Read a retained native view under the current production scope. The external default keeps its existing callback boundary; native borrowed overrides do not construct a query copy.

Auto Trait Implementations§

§

impl !Freeze for Engine

§

impl !RefUnwindSafe for Engine

§

impl !UnwindSafe for Engine

§

impl Send for Engine

§

impl Sync for Engine

§

impl Unpin for Engine

§

impl UnsafeUnpin for Engine

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> OidAliasInput for T
where T: EngineHook + ?Sized,

Source§

fn resolve_oid_alias_input_with_control( &self, ty: &ColumnType, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<i64>, SQLError>

Native catalogs admit parsed names and lookup workspace before allocation. External catalogs retain their existing callback.
Source§

fn resolve_oid_alias_input( &self, ty: &ColumnType, name: &str, ) -> Result<Option<i64>, SQLError>

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SetFunctionCatalog for T

Source§

impl<T> StoredRegroleResolver for T
where T: EngineHook + ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.