pub struct SqlModelParser;Expand description
Fast-path SQL Model template parser extracting {{ ref(...) }} and {{ source(...) }} references.
Implementations§
Source§impl SqlModelParser
impl SqlModelParser
Sourcepub fn parse_frontmatter(
raw: &str,
) -> Result<(Option<StagingFrontmatter>, String)>
pub fn parse_frontmatter( raw: &str, ) -> Result<(Option<StagingFrontmatter>, String)>
Extracts YAML frontmatter and pure SQL content from raw model text.
If a --- block is present, YAML must parse successfully or this returns an error
(no silent fallback that leaves --- in the SQL body).
Sourcepub fn extract_dependencies(sql: &str) -> Result<Vec<DependencyRef>>
pub fn extract_dependencies(sql: &str) -> Result<Vec<DependencyRef>>
Fast-path extraction of all model and source dependencies from raw model SQL.
Auto Trait Implementations§
impl Freeze for SqlModelParser
impl RefUnwindSafe for SqlModelParser
impl Send for SqlModelParser
impl Sync for SqlModelParser
impl Unpin for SqlModelParser
impl UnsafeUnpin for SqlModelParser
impl UnwindSafe for SqlModelParser
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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