Skip to main content

QailUsage

Struct QailUsage 

Source
pub struct QailUsage {
Show 14 fields pub file: String, pub line: usize, pub column: usize, pub table: String, pub is_dynamic_table: bool, pub columns: Vec<String>, pub action: String, pub related_tables: Vec<String>, pub is_cte_ref: bool, pub has_rls: bool, pub rls_policy_delegated: bool, pub has_explicit_tenant_scope: bool, pub file_uses_super_admin: bool, pub scope_errors: Vec<String>,
}
Expand description

Extracted QAIL usage from source code

Fields§

§file: String

Source file path.

§line: usize

Line number (1-indexed).

§column: usize

Column number (1-indexed) where Qail::... constructor starts.

§table: String

Table name referenced.

§is_dynamic_table: bool

True when table name came from a dynamic expression instead of a compile-time string literal.

§columns: Vec<String>

Column names referenced.

§action: String

CRUD action (GET, SET, ADD, DEL, PUT).

§related_tables: Vec<String>

Additional static tables referenced by the chain.

This is used for secondary relation slots such as MERGE USING table.

§is_cte_ref: bool

Whether this references a CTE rather than a real table.

§has_rls: bool

Whether this query chain includes .with_rls( call

§rls_policy_delegated: bool

Whether the chain delegates isolation to DB policies via .with_rls_policy(. Distinct from has_rls: delegation is an explicit declaration that no AST predicate is expected, so the “scopes nothing” audit must not fire on it.

§has_explicit_tenant_scope: bool

Whether this query chain has explicit tenant scope condition (e.g. .eq("tenant_id", ...) or .is_null("tenant_id")).

§file_uses_super_admin: bool

Whether the containing file uses SuperAdminToken::for_system_process(). When true AND the queried table is tenant-scoped, the build emits a warning: the query may bypass tenant isolation.

§scope_errors: Vec<String>

Qualifier-scope violations found at scan time: GROUP BY / DISTINCT ON entries whose table. qualifier is neither the FROM table, a joined table, a declared alias, nor a visible CTE. These compile and pass schema-existence validation but fail at runtime (42P01-class), so the build must fail instead.

Trait Implementations§

Source§

impl Debug for QailUsage

Source§

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

Formats the value using the given formatter. Read more

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> ColumnValue<Value> for T

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