28 releases
new 0.7.0 | May 12, 2024 |
---|---|
0.6.0 | Oct 11, 2023 |
0.5.0 | Aug 13, 2023 |
0.4.2 | Jul 29, 2023 |
0.0.8 | Jun 26, 2022 |
#101 in Text editors
364 downloads per month
33MB
887K
SLoC
tree-sitter for GoogleSQL (SQL dialect in BigQuery)
GoogleSQL(formerly known as StandardSQL) parser available in many programming language such as Rust, Node and so on. You could try out the demo on Github Pages
References
-
ZetaSQL: https://github.com/google/zetasql/blob/master/docs/README.md
-
Other SQL Dialect Projects:
Development
Running tests
npm install --also=dev
npm test
Debbuging
npm run parse <your sql file.sql>
outputs a syntax tree
lib.rs
:
This crate provides SqlBigquery language support for the tree-sitter parsing library.
Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:
let code = r#"
"#;
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_sql_bigquery::language()).expect("Error loading SqlBigquery grammar");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());
Dependencies
~2.7–4MB
~71K SLoC