pub struct CommonParser;
Expand description
collection of common used parsers
Implementations§
Source§impl CommonParser
impl CommonParser
pub fn sql_keyword(i: &str) -> IResult<&str, &str, ParseSQLError<&str>>
Sourcepub fn opt_index_name(
i: &str,
) -> IResult<&str, Option<String>, ParseSQLError<&str>>
pub fn opt_index_name( i: &str, ) -> IResult<&str, Option<String>, ParseSQLError<&str>>
[index_name]
pub fn index_col_name( i: &str, ) -> IResult<&str, (Column, Option<u16>, Option<OrderType>), ParseSQLError<&str>>
Sourcepub fn opt_delimited<I: Clone, O1, O2, O3, E: ParseError<I>, F, G, H>(
first: F,
second: G,
third: H,
) -> impl FnMut(I) -> IResult<I, O2, E>
pub fn opt_delimited<I: Clone, O1, O2, O3, E: ParseError<I>, F, G, H>( first: F, second: G, third: H, ) -> impl FnMut(I) -> IResult<I, O2, E>
first and third are opt
pub fn precision( i: &str, ) -> IResult<&str, (u8, Option<u8>), ParseSQLError<&str>>
pub fn delim_digit(i: &str) -> IResult<&str, &str, ParseSQLError<&str>>
pub fn sql_identifier(i: &str) -> IResult<&str, &str, ParseSQLError<&str>>
pub fn unsigned_number(i: &str) -> IResult<&str, u64, ParseSQLError<&str>>
pub fn eof<I: Copy + InputLength, E: ParseError<I>>( input: I, ) -> IResult<I, I, E>
pub fn statement_terminator(i: &str) -> IResult<&str, (), ParseSQLError<&str>>
pub fn as_alias(i: &str) -> IResult<&str, &str, ParseSQLError<&str>>
pub fn ws_sep_comma(i: &str) -> IResult<&str, &str, ParseSQLError<&str>>
Sourcepub fn parse_comment(i: &str) -> IResult<&str, String, ParseSQLError<&str>>
pub fn parse_comment(i: &str) -> IResult<&str, String, ParseSQLError<&str>>
Parse rule for a comment part. COMMENT ‘comment content’ or COMMENT “comment content”
Sourcepub fn parse_if_exists(
i: &str,
) -> IResult<&str, Option<&str>, ParseSQLError<&str>>
pub fn parse_if_exists( i: &str, ) -> IResult<&str, Option<&str>, ParseSQLError<&str>>
IF EXISTS
Sourcepub fn parse_quoted_string(
i: &str,
) -> IResult<&str, String, ParseSQLError<&str>>
pub fn parse_quoted_string( i: &str, ) -> IResult<&str, String, ParseSQLError<&str>>
extract String quoted by '
or "
Sourcepub fn parse_quoted_string_value_with_key(
i: &str,
key: String,
) -> IResult<&str, String, ParseSQLError<&str>>
pub fn parse_quoted_string_value_with_key( i: &str, key: String, ) -> IResult<&str, String, ParseSQLError<&str>>
extract value from key [=] 'value'
or key [=] "value"
Sourcepub fn parse_string_value_with_key(
i: &str,
key: String,
) -> IResult<&str, String, ParseSQLError<&str>>
pub fn parse_string_value_with_key( i: &str, key: String, ) -> IResult<&str, String, ParseSQLError<&str>>
extract value from key [=] value
Sourcepub fn parse_digit_value_with_key(
i: &str,
key: String,
) -> IResult<&str, String, ParseSQLError<&str>>
pub fn parse_digit_value_with_key( i: &str, key: String, ) -> IResult<&str, String, ParseSQLError<&str>>
extract value from key [=] value
Sourcepub fn parse_default_value_with_key(
i: &str,
key: String,
) -> IResult<&str, DefaultOrZeroOrOne, ParseSQLError<&str>>
pub fn parse_default_value_with_key( i: &str, key: String, ) -> IResult<&str, DefaultOrZeroOrOne, ParseSQLError<&str>>
extract value from key [=] {DEFAULT | 0 | 1}
Auto Trait Implementations§
impl Freeze for CommonParser
impl RefUnwindSafe for CommonParser
impl Send for CommonParser
impl Sync for CommonParser
impl Unpin for CommonParser
impl UnwindSafe for CommonParser
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