Skip to main content

SqlStatementFileFacts

Struct SqlStatementFileFacts 

Source
pub struct SqlStatementFileFacts {
Show 25 fields pub path: PathBuf, pub statement_kinds: Vec<SqlStatementKind>, pub setting_uses: Vec<SqlSettingUse>, pub function_calls: Vec<SqlFunctionCallFact>, pub writes: Vec<SqlWriteFact>, pub json_writes: Vec<SqlJsonWriteFact>, pub duplicate_keyed_lookups: Vec<SqlDuplicateKeyedLookupFact>, pub view_uses: Vec<SqlViewUseFact>, pub inserts: Vec<SqlInsertFact>, pub selects: Vec<SqlSelectFact>, pub updates: Vec<Vec<SqlRelationPredicateFact>>, pub deletes: Vec<Vec<SqlRelationPredicateFact>>, pub triggers: Vec<SqlTriggerFact>, pub returning_stars: Vec<SqlStarProjectionFact>, pub mutation_column_uses: Vec<SqlColumnUseFact>, pub transformed_column_uses: Vec<SqlTransformedColumnUseFact>, pub offset_uses: Vec<SqlOffsetFact>, pub bounds: Vec<SqlBoundFact>, pub limit_uses: Vec<SqlLimitFact>, pub sweeps: Vec<SqlSweepFact>, pub parse_failed: bool, pub parse_failures: Vec<SqlUnanalyzableStatement>, pub insert_keyword_count: usize, pub has_top_level_not_exists: bool, pub origin_line: usize, /* private fields */
}
Expand description

Statement facts for one SQL source (file or embedded call).

Fields§

§path: PathBuf§statement_kinds: Vec<SqlStatementKind>

Statement categories shared with schema policy, including static routine DDL.

§setting_uses: Vec<SqlSettingUse>§function_calls: Vec<SqlFunctionCallFact>§writes: Vec<SqlWriteFact>

Syntactic write targets; catalog resolution happens after preparation.

§json_writes: Vec<SqlJsonWriteFact>§duplicate_keyed_lookups: Vec<SqlDuplicateKeyedLookupFact>§view_uses: Vec<SqlViewUseFact>§inserts: Vec<SqlInsertFact>§selects: Vec<SqlSelectFact>§updates: Vec<Vec<SqlRelationPredicateFact>>

One entry per UPDATE. Each entry is that statement’s relation instances.

§deletes: Vec<Vec<SqlRelationPredicateFact>>

One entry per DELETE. Each entry is that statement’s relation instances.

§triggers: Vec<SqlTriggerFact>§returning_stars: Vec<SqlStarProjectionFact>

RETURNING * / RETURNING t.* on INSERT, UPDATE, and DELETE.

§mutation_column_uses: Vec<SqlColumnUseFact>

Bare column comparisons on UPDATE/DELETE WHERE and JOIN ON predicates.

§transformed_column_uses: Vec<SqlTransformedColumnUseFact>

Cast and function inputs in WHERE, JOIN ON and HAVING predicates.

§offset_uses: Vec<SqlOffsetFact>

Executed OFFSET occurrences in source order.

§bounds: Vec<SqlBoundFact>

Row-count bounds of each executed SELECT, UPDATE and DELETE.

§limit_uses: Vec<SqlLimitFact>

Every LIMIT / FETCH FIRST in the executed statements, in source order.

§sweeps: Vec<SqlSweepFact>

Limited single-table queries ordered by plain columns: pages of a key walk.

§parse_failed: bool§parse_failures: Vec<SqlUnanalyzableStatement>

Source-ordered failed statement starts from the existing recovery pass.

§insert_keyword_count: usize§has_top_level_not_exists: bool§origin_line: usize

Implementations§

Source§

impl SqlStatementFileFacts

Source

pub fn parse_failure_sites(&self) -> impl Iterator<Item = (SqlFactSite, usize)>

Failure occurrences with a compatibility fallback for older/manual projections.

Trait Implementations§

Source§

impl Clone for SqlStatementFileFacts

Source§

fn clone(&self) -> SqlStatementFileFacts

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SqlStatementFileFacts

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for SqlStatementFileFacts

Source§

fn default() -> SqlStatementFileFacts

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

impl Eq for SqlStatementFileFacts

Source§

impl PartialEq for SqlStatementFileFacts

Source§

fn eq(&self, other: &SqlStatementFileFacts) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SqlStatementFileFacts

Auto Trait Implementations§

§

impl Forget for SqlStatementFileFacts

§

impl Freeze for SqlStatementFileFacts
where *const u8 is !null: Freeze, PhantomData<InventoryLockFact>: Freeze, PhantomData<usize>: Freeze, PhantomData<(Location, State)>: Freeze, PhantomData<DdlEvent>: Freeze, PhantomData<RowAccess>: Freeze, PhantomData<StatementLockCheck>: Freeze, PhantomData<CatalogTriggerWrite>: Freeze, PhantomData<Option<String>>: Freeze, PhantomData<Vec<AdvisoryKey>>: Freeze, *const LeafNode<usize, CteWriteLink> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(usize, CteWriteLink)>>: Freeze, *const LeafNode<usize, Range<usize>> is !null: Freeze, PhantomData<Box<(usize, Range<usize>)>>: Freeze, PhantomData<ShareStatement>: Freeze, PhantomData<u8>: Freeze, *const [RowAccess] is !null: Freeze, PhantomData<[RowAccess]>: Freeze, PhantomData<(SqlFactSite, SqlFactPosition)>: Freeze, PhantomData<LockingSelectMetadata>: Freeze, PhantomData<SqlConflictInsertFact>: Freeze, PhantomData<u32>: Freeze, PhantomData<(SqlFactSite, Vec<u32>)>: Freeze, PhantomData<(usize, String, SqlFactSite)>: Freeze, PhantomData<SqlStatementKind>: Freeze, PhantomData<SqlSettingUse>: Freeze, PhantomData<SqlPolicyClauseUse>: Freeze, PhantomData<SqlFunctionCallFact>: Freeze, PhantomData<SqlWriteFact>: Freeze, PhantomData<SqlJsonWriteFact>: Freeze, PhantomData<SqlDuplicateKeyedLookupFact>: Freeze, PhantomData<SqlViewUseFact>: Freeze, PhantomData<SqlGroupingQuery>: Freeze, PhantomData<SqlInsertFact>: Freeze, PhantomData<SqlSelectFact>: Freeze, *const LeafNode<(usize, usize), Vec<String>> is !null: Freeze, PhantomData<Box<((usize, usize), Vec<String>)>>: Freeze, PhantomData<Vec<SqlRelationPredicateFact>>: Freeze, PhantomData<SqlTriggerFact>: Freeze, PhantomData<SqlStarProjectionFact>: Freeze, PhantomData<SqlColumnUseFact>: Freeze, PhantomData<SqlTransformedColumnUseFact>: Freeze, PhantomData<SqlOffsetFact>: Freeze, PhantomData<SqlBoundFact>: Freeze, PhantomData<SqlLifecycleBatch>: Freeze, PhantomData<(usize, usize, usize)>: Freeze, PhantomData<SqlLimitFact>: Freeze, PhantomData<SqlSweepFact>: Freeze, PhantomData<SqlQueryShapeFact>: Freeze, PhantomData<SqlUnanalyzableStatement>: Freeze,

§

impl Move for SqlStatementFileFacts

§

impl RefUnwindSafe for SqlStatementFileFacts

§

impl Send for SqlStatementFileFacts
where RawVecInner: Send, NodeRef<Owned, usize, CteWriteLink, LeafOrInternal>: Send, BoxRaw<(usize, CteWriteLink)>: Send, NodeRef<Owned, usize, Range<usize>, LeafOrInternal>: Send, BoxRaw<(usize, Range<usize>)>: Send, NodeRef<Owned, usize, Vec<String>, LeafOrInternal>: Send, BoxRaw<(usize, Vec<String>)>: Send, BoxRaw<[RowAccess]>: Send, RawTable<(SqlFactSite, SqlFactPosition)>: Send, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Send, BoxRaw<(String, Vec<String>)>: Send, NodeRef<Owned, String, String, LeafOrInternal>: Send, BoxRaw<(String, String)>: Send, NodeRef<Owned, String, SetValZST, LeafOrInternal>: Send, BoxRaw<(String, SetValZST)>: Send, RawTable<(SqlFactSite, Vec<u32>)>: Send, Arc<Query>: Send, Arc<[(u32, u32)]>: Send, NodeRef<Owned, (usize, usize), Vec<String>, LeafOrInternal>: Send, BoxRaw<((usize, usize), Vec<String>)>: Send, Arc<Expr>: Send, Arc<Vec<SqlTransformedColumnProbeFact>>: Send, BoxRaw<SqlTransformedColumnUseFact>: Send, BoxRaw<Expr>: Send, BoxRaw<Query>: Send, BoxRaw<ReplaceSelectElement>: Send, BoxRaw<DataType>: Send, BoxRaw<KeyValueOptions>: Send, BoxRaw<TableSample>: Send, BoxRaw<TableWithJoins>: Send, BoxRaw<TableFactor>: Send, BoxRaw<MatchRecognizePattern>: Send, BoxRaw<RepetitionQuantifier>: Send, BoxRaw<Statement>: Send, Arc<BTreeMap<(u32, u32), u32>>: Send,

§

impl Sync for SqlStatementFileFacts
where RawVecInner: Sync, NodeRef<Owned, usize, CteWriteLink, LeafOrInternal>: Sync, BoxRaw<(usize, CteWriteLink)>: Sync, NodeRef<Owned, usize, Range<usize>, LeafOrInternal>: Sync, BoxRaw<(usize, Range<usize>)>: Sync, NodeRef<Owned, usize, Vec<String>, LeafOrInternal>: Sync, BoxRaw<(usize, Vec<String>)>: Sync, BoxRaw<[RowAccess]>: Sync, RawTable<(SqlFactSite, SqlFactPosition)>: Sync, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Sync, BoxRaw<(String, Vec<String>)>: Sync, NodeRef<Owned, String, String, LeafOrInternal>: Sync, BoxRaw<(String, String)>: Sync, NodeRef<Owned, String, SetValZST, LeafOrInternal>: Sync, BoxRaw<(String, SetValZST)>: Sync, RawTable<(SqlFactSite, Vec<u32>)>: Sync, Arc<Query>: Sync, Arc<[(u32, u32)]>: Sync, NodeRef<Owned, (usize, usize), Vec<String>, LeafOrInternal>: Sync, BoxRaw<((usize, usize), Vec<String>)>: Sync, Arc<Expr>: Sync, Arc<Vec<SqlTransformedColumnProbeFact>>: Sync, BoxRaw<SqlTransformedColumnUseFact>: Sync, BoxRaw<Expr>: Sync, BoxRaw<Query>: Sync, BoxRaw<ReplaceSelectElement>: Sync, BoxRaw<DataType>: Sync, BoxRaw<KeyValueOptions>: Sync, BoxRaw<TableSample>: Sync, BoxRaw<TableWithJoins>: Sync, BoxRaw<TableFactor>: Sync, BoxRaw<MatchRecognizePattern>: Sync, BoxRaw<RepetitionQuantifier>: Sync, BoxRaw<Statement>: Sync, Arc<BTreeMap<(u32, u32), u32>>: Sync,

§

impl Unpin for SqlStatementFileFacts

§

impl UnsafeUnpin for SqlStatementFileFacts
where *const u8 is !null: UnsafeUnpin, PhantomData<InventoryLockFact>: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, PhantomData<(Location, State)>: UnsafeUnpin, PhantomData<DdlEvent>: UnsafeUnpin, PhantomData<RowAccess>: UnsafeUnpin, PhantomData<StatementLockCheck>: UnsafeUnpin, PhantomData<CatalogTriggerWrite>: UnsafeUnpin, PhantomData<Option<String>>: UnsafeUnpin, PhantomData<Vec<AdvisoryKey>>: UnsafeUnpin, *const LeafNode<usize, CteWriteLink> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(usize, CteWriteLink)>>: UnsafeUnpin, *const LeafNode<usize, Range<usize>> is !null: UnsafeUnpin, PhantomData<Box<(usize, Range<usize>)>>: UnsafeUnpin, PhantomData<ShareStatement>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const [RowAccess] is !null: UnsafeUnpin, PhantomData<[RowAccess]>: UnsafeUnpin, PhantomData<(SqlFactSite, SqlFactPosition)>: UnsafeUnpin, PhantomData<LockingSelectMetadata>: UnsafeUnpin, PhantomData<SqlConflictInsertFact>: UnsafeUnpin, PhantomData<u32>: UnsafeUnpin, PhantomData<(SqlFactSite, Vec<u32>)>: UnsafeUnpin, PhantomData<(usize, String, SqlFactSite)>: UnsafeUnpin, PhantomData<SqlStatementKind>: UnsafeUnpin, PhantomData<SqlSettingUse>: UnsafeUnpin, PhantomData<SqlPolicyClauseUse>: UnsafeUnpin, PhantomData<SqlFunctionCallFact>: UnsafeUnpin, PhantomData<SqlWriteFact>: UnsafeUnpin, PhantomData<SqlJsonWriteFact>: UnsafeUnpin, PhantomData<SqlDuplicateKeyedLookupFact>: UnsafeUnpin, PhantomData<SqlViewUseFact>: UnsafeUnpin, PhantomData<SqlGroupingQuery>: UnsafeUnpin, PhantomData<SqlInsertFact>: UnsafeUnpin, PhantomData<SqlSelectFact>: UnsafeUnpin, *const LeafNode<(usize, usize), Vec<String>> is !null: UnsafeUnpin, PhantomData<Box<((usize, usize), Vec<String>)>>: UnsafeUnpin, PhantomData<Vec<SqlRelationPredicateFact>>: UnsafeUnpin, PhantomData<SqlTriggerFact>: UnsafeUnpin, PhantomData<SqlStarProjectionFact>: UnsafeUnpin, PhantomData<SqlColumnUseFact>: UnsafeUnpin, PhantomData<SqlTransformedColumnUseFact>: UnsafeUnpin, PhantomData<SqlOffsetFact>: UnsafeUnpin, PhantomData<SqlBoundFact>: UnsafeUnpin, PhantomData<SqlLifecycleBatch>: UnsafeUnpin, PhantomData<(usize, usize, usize)>: UnsafeUnpin, PhantomData<SqlLimitFact>: UnsafeUnpin, PhantomData<SqlSweepFact>: UnsafeUnpin, PhantomData<SqlQueryShapeFact>: UnsafeUnpin, PhantomData<SqlUnanalyzableStatement>: UnsafeUnpin,

§

impl UnwindSafe for SqlStatementFileFacts

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
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<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

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

Source§

type Error = !

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.