pub struct Tokenizer<'a> { /* private fields */ }
Expand description
SQL Tokenizer
Implementations§
source§impl<'a> Tokenizer<'a>
impl<'a> Tokenizer<'a>
sourcepub fn new(dialect: &'a dyn Dialect, query: &'a str) -> Self
pub fn new(dialect: &'a dyn Dialect, query: &'a str) -> Self
Create a new SQL tokenizer for the specified SQL statement
sourcepub fn tokenize(&mut self) -> Result<Vec<Token>, TokenizerError>
pub fn tokenize(&mut self) -> Result<Vec<Token>, TokenizerError>
Tokenize the statement and produce a vector of tokens
sourcepub fn tokenize_with_location(
&mut self
) -> Result<(Vec<TokenWithLocation>, Location), TokenizerError>
pub fn tokenize_with_location( &mut self ) -> Result<(Vec<TokenWithLocation>, Location), TokenizerError>
Tokenize the statement and produce a vector of tokens with location information