pub struct LintDocument<'a> {
pub sql: &'a str,
pub source_sql: Option<&'a str>,
pub source_statement_ranges: Vec<Option<Range<usize>>>,
pub dialect: Dialect,
pub statements: Vec<LintStatement<'a>>,
pub tokens: Vec<LintToken>,
pub raw_tokens: Vec<TokenWithSpan>,
pub noqa: NoqaMap,
pub parser_fallback_used: bool,
pub tokenizer_fallback_used: bool,
}Expand description
Normalized lint input model for a single SQL source.
Fields§
§sql: &'a str§source_sql: Option<&'a str>§source_statement_ranges: Vec<Option<Range<usize>>>§dialect: Dialect§statements: Vec<LintStatement<'a>>§tokens: Vec<LintToken>§raw_tokens: Vec<TokenWithSpan>§noqa: NoqaMap§parser_fallback_used: bool§tokenizer_fallback_used: boolImplementations§
Source§impl<'a> LintDocument<'a>
impl<'a> LintDocument<'a>
Sourcepub fn new(
sql: &'a str,
dialect: Dialect,
statements: Vec<LintStatement<'a>>,
) -> Self
pub fn new( sql: &'a str, dialect: Dialect, statements: Vec<LintStatement<'a>>, ) -> Self
Build a lint document from source SQL and parsed statements.
Sourcepub fn new_with_parser_fallback(
sql: &'a str,
dialect: Dialect,
statements: Vec<LintStatement<'a>>,
parser_fallback_used: bool,
) -> Self
pub fn new_with_parser_fallback( sql: &'a str, dialect: Dialect, statements: Vec<LintStatement<'a>>, parser_fallback_used: bool, ) -> Self
Build a lint document with parser fallback provenance metadata.
Sourcepub fn new_with_parser_fallback_and_source(
sql: &'a str,
source_sql: Option<&'a str>,
dialect: Dialect,
statements: Vec<LintStatement<'a>>,
parser_fallback_used: bool,
source_statement_ranges: Option<Vec<Option<Range<usize>>>>,
) -> Self
pub fn new_with_parser_fallback_and_source( sql: &'a str, source_sql: Option<&'a str>, dialect: Dialect, statements: Vec<LintStatement<'a>>, parser_fallback_used: bool, source_statement_ranges: Option<Vec<Option<Range<usize>>>>, ) -> Self
Build a lint document with parser fallback metadata and optional untemplated source mapping.
Auto Trait Implementations§
impl<'a> Freeze for LintDocument<'a>
impl<'a> RefUnwindSafe for LintDocument<'a>
impl<'a> Send for LintDocument<'a>
impl<'a> Sync for LintDocument<'a>
impl<'a> Unpin for LintDocument<'a>
impl<'a> UnsafeUnpin for LintDocument<'a>
impl<'a> UnwindSafe for LintDocument<'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