mz_sql_parser::parser

Trait ParserStatementErrorMapper

Source
trait ParserStatementErrorMapper<T> {
    // Required methods
    fn map_parser_err(
        self,
        statement_kind: StatementKind,
    ) -> Result<T, ParserStatementError>;
    fn map_no_statement_parser_err(self) -> Result<T, ParserStatementError>;
}

Required Methods§

Source

fn map_parser_err( self, statement_kind: StatementKind, ) -> Result<T, ParserStatementError>

Wrap a ParserError within a ParserStatementError alongside the provided StatementKind

Source

fn map_no_statement_parser_err(self) -> Result<T, ParserStatementError>

Wrap a ParserError within a ParserStatementError without an accompanying StatementKind.

This should be used when we do not know what specific statement is being parsed.

Implementations on Foreign Types§

Source§

impl<T> ParserStatementErrorMapper<T> for Result<T, ParserError>

Implementors§