Function mz_sql_parser::lexer::lex

source ·
pub fn lex(query: &str) -> Result<Vec<(Token, usize)>, ParserError>
Expand description

Lexes a SQL query.

Returns a list of tokens alongside their corresponding byte offset in the input string. Returns an error if the SQL query is lexically invalid.

See the module documentation for more information about the lexical structure of SQL.