30 releases
0.8.0 | May 26, 2024 |
---|---|
0.6.0 | Oct 11, 2023 |
0.4.2 | Jul 29, 2023 |
0.2.0 | Feb 6, 2023 |
0.0.8 | Jun 26, 2022 |
#150 in Text editors
1,910 downloads per month
33MB
888K
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.8–4MB
~76K SLoC