pub struct LintCtx<'a> {
pub src: DialectId,
pub dst: Option<DialectId>,
pub stmt_index: usize,
pub stmt_span: Span,
pub source_text: &'a str,
pub schema: &'a Schema,
}Expand description
Per-statement context passed to every rule callback.
Fields§
§src: DialectId§dst: Option<DialectId>§stmt_index: usize§stmt_span: SpanBest-effort span covering the whole statement; used as a fallback
when a rule emits a diagnostic on a node whose own .span() is
Span::empty(). May itself be empty for statements whose
Spanned impl is unimplemented upstream (Drop/Set/Comment/…).
source_text: &'a strOriginal source text — formatters use this for snippet rendering.
schema: &'a SchemaSchema model derived from CREATE TABLE statements in the input.
Empty when no CREATE TABLE was present. Rules consult this to
refine schema-blind heuristics (NOT NULL info to suppress
SQLT0505/SQLT0400, column-existence checks for SQLT0900).
Auto Trait Implementations§
impl<'a> Freeze for LintCtx<'a>
impl<'a> RefUnwindSafe for LintCtx<'a>
impl<'a> Send for LintCtx<'a>
impl<'a> Sync for LintCtx<'a>
impl<'a> Unpin for LintCtx<'a>
impl<'a> UnsafeUnpin for LintCtx<'a>
impl<'a> UnwindSafe for LintCtx<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more