pub struct InsertParser<'a> { /* private fields */ }Expand description
Parser for MySQL INSERT statements
Implementations§
Source§impl<'a> InsertParser<'a>
impl<'a> InsertParser<'a>
Sourcepub fn new(stmt: &'a [u8]) -> Self
pub fn new(stmt: &'a [u8]) -> Self
Create a new parser for an INSERT statement (defaults to MySQL escaping)
Sourcepub fn with_schema(self, schema: &'a TableSchema) -> Self
pub fn with_schema(self, schema: &'a TableSchema) -> Self
Set the table schema for PK/FK extraction
Sourcepub fn with_dialect(self, dialect: SqlDialect) -> Self
pub fn with_dialect(self, dialect: SqlDialect) -> Self
Set the dialect so string values are unescaped correctly (bug #3).
Sourcepub fn with_extraction(self, extraction: RowExtraction) -> Self
pub fn with_extraction(self, extraction: RowExtraction) -> Self
Choose how much per-row derived data to compute (default: RowExtraction::Full).
Sourcepub fn parse_rows(&mut self) -> Result<Vec<ParsedRow>>
pub fn parse_rows(&mut self) -> Result<Vec<ParsedRow>>
Parse all rows from the INSERT statement, collecting them into a Vec.
A thin collecting adapter over InsertParser::parse_rows_visit.
Auto Trait Implementations§
impl<'a> Freeze for InsertParser<'a>
impl<'a> RefUnwindSafe for InsertParser<'a>
impl<'a> Send for InsertParser<'a>
impl<'a> Sync for InsertParser<'a>
impl<'a> Unpin for InsertParser<'a>
impl<'a> UnsafeUnpin for InsertParser<'a>
impl<'a> UnwindSafe for InsertParser<'a>
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> 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