sqlite3_tokenizer

Crates.iosqlite3_tokenizer
lib.rssqlite3_tokenizer
version0.1.0
sourcesrc
created_at2015-06-07 01:50:18.694387
updated_at2015-12-11 23:56:18.321051
descriptionTokenizes SQL strings as SQLite would
homepagehttps://github.com/PeterReid/sqlite3_tokenizer
repositoryhttps://github.com/PeterReid/sqlite3_tokenizer
max_upload_size
id2329
size51,178
Peter Reid (PeterReid)

documentation

https://PeterReid.github.io/sqlite3_tokenizer

README

This crate provides Tokenizer, which iterates over tokens in a SQL string as SQLite would.

Example

extern crate sqlite3_tokenizer;

use sqlite3_tokenizer::Tokenizer;

fn main() {
    for token in Tokenizer::new("SELECT * FROM t") {
        println!("Token of kind {:?} is written {:?}", token.kind, token.text);
    }
}

outputs

Token of kind Select is written "SELECT"
Token of kind Space is written " "
Token of kind Star is written "*"
Token of kind Space is written " "
Token of kind From is written "FROM"
Token of kind Space is written " "
Token of kind Id is written "t"
Commit count: 3

cargo fmt