pub struct ScriptParser { /* private fields */ }
Expand description
Parses SQL scripts into individual statements using GO as separator
Implementations§
Source§impl ScriptParser
impl ScriptParser
Sourcepub fn data_file_hint(&self) -> Option<&str>
pub fn data_file_hint(&self) -> Option<&str>
Get the data file hint if present
Sourcepub fn parse_statements(&self) -> Vec<String>
pub fn parse_statements(&self) -> Vec<String>
Parse the script into individual SQL statements GO must be on its own line (case-insensitive) Returns a vector of SQL statements to execute
Sourcepub fn parse_and_validate(&self) -> Result<Vec<String>>
pub fn parse_and_validate(&self) -> Result<Vec<String>>
Parse and validate that all statements are valid SQL Returns the statements or an error if any are invalid
Auto Trait Implementations§
impl Freeze for ScriptParser
impl RefUnwindSafe for ScriptParser
impl Send for ScriptParser
impl Sync for ScriptParser
impl Unpin for ScriptParser
impl UnwindSafe for ScriptParser
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
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