Skip to main content

SqlStatementFileFacts

Struct SqlStatementFileFacts 

Source
pub struct SqlStatementFileFacts {
Show 23 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 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>§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) -> Self

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

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

impl Default for SqlStatementFileFacts

Source§

fn default() -> Self

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

impl Eq for SqlStatementFileFacts

Source§

impl PartialEq for SqlStatementFileFacts

Source§

fn eq(&self, other: &Self) -> 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§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, 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> 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.