3 releases

0.3.5 Aug 9, 2024
0.3.3 Jul 30, 2024
0.3.2 Jul 26, 2024

#125 in Text editors

Download history 480/week @ 2024-07-29 830/week @ 2024-08-05 559/week @ 2024-08-12 397/week @ 2024-08-19 354/week @ 2024-08-26 489/week @ 2024-09-02 293/week @ 2024-09-09 480/week @ 2024-09-16 409/week @ 2024-09-23 391/week @ 2024-09-30 307/week @ 2024-10-07 462/week @ 2024-10-14 489/week @ 2024-10-21 830/week @ 2024-10-28 410/week @ 2024-11-04 431/week @ 2024-11-11

2,279 downloads per month
Used in ast-grep-language

MIT license

14MB
549K SLoC

C 548K SLoC // 0.0% comments JavaScript 648 SLoC // 0.8% comments Scheme 446 SLoC Rust 36 SLoC // 0.2% comments

tree-sitter-sql

Build/test GitHub Pages npm package version

A general/permissive SQL grammar for tree-sitter.

Installation

We don't commit the generated parser files to the main branch. Instead, you can find them on the gh-pages branch. We're open to feedback & encourage you to open an issue to discuss any problems.

They are also hosted on the GitHub pages site and available for download here: github://derekstride/tree-sitter-sql/gh-pages.tar.gz.

Plugin maintainers ensure to specify the HEAD (or a specific revision) of the gh-pages branch when integrating with this project.

Step 1: Download the parser files

Using git

git clone https://github.com/DerekStride/tree-sitter-sql.git
cd tree-sitter-sql
git checkout gh-pages

Using curl

curl -LO https://github.com/DerekStride/tree-sitter-sql/archive/refs/heads/gh-pages.tar.gz
tar -xzf gh-pages.tar.gz
cd tree-sitter-sql-gh-pages

Step 2: Compile the Parser

Tree-sitter parsers need to be compiled as a shared-object / dynamic-library, you can enable this by passing the -shared & -fPIC flags to your compiler.

cc -shared -fPIC -I./src src/parser.c src/scanner.c -o sql.so

Using Cargo

cargo add tree-sitter-sequel

Using NPM

npm i @derekstride/tree-sitter-sql

Development

See CONTRIBUTING.md for documentation on how to set up the project for development.

Features

For a complete list of features see the the tests

References

Other projects

Dependencies

~2.8–4MB
~78K SLoC