no-mistakes-postgres-engine 0.109.131

PostgreSQL embedded SQL extraction, schema catalog, and replay-safety analysis for no-mistakes
Documentation
use super::super::EmbeddedSqlCall;

/// A relative import of a configured factory or type, unresolved during the fact parse.
#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct RelativeScopedCandidate {
    pub specifier: String,
    pub imported_name: String,
    pub local_name: String,
    pub factory: bool,
    pub type_import: bool,
}

/// Source span that would bind `name` if one of `owners` resolves into the package.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PendingRelativeSpan {
    pub owners: Vec<u32>,
    pub name: String,
    pub start: u32,
    pub end: u32,
}

/// Executor call recorded in source order, applied only if an owner is kept.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PendingRelativeCall {
    pub seq: u32,
    pub owners: Vec<u32>,
    pub call: EmbeddedSqlCall,
}

/// Relative scoped imports from one file, cleared once projected.
#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct PendingRelativeScope {
    pub candidates: Vec<RelativeScopedCandidate>,
    pub spans: Vec<PendingRelativeSpan>,
    pub calls: Vec<PendingRelativeCall>,
    /// SQL-looking member queries keyed by provisional call sequence.
    pub diagnostic_member_queries:
        std::collections::BTreeMap<u32, crate::embedded::UnprovenMemberQuery>,
    /// Sequence numbers parallel to confirmed `calls`, set only when provisional spans exist.
    pub confirmed_order: Vec<u32>,
    pub call_spans: std::collections::BTreeMap<u32, (u32, u32)>,
}