tree-sitter-sql
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
Using pip
pip install 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
- Wikipedia#SQL_syntax - I consulted wikipedia for naming conventions, though I may not have been strict early on in the prototyping.
- Phoenix Language Reference - A reference diagram.
- SQLite's railroad diagram for expr - Another reference diagram.
- Postgresql syntax documentation
- Mariadb syntax documentation
Other projects
Metadata
Release files for tree-sitter-sql 0.3.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tree_sitter_sql-0.3.12.tar.gz | 2.7 MB | Without provenance | Details for tree_sitter_sql-0.3.12.tar.gz |
Built distributions (wheels)
Total release size: 10.2 MB
Release files / tree_sitter_sql-0.3.12.tar.gz
| Download URL | tree_sitter_sql-0.3.12.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7441ba9f495f9db80d77a3fbfc9fcae144067722ac2f6cddc7c882f72def32f0
|
|
BLAKE2b-256 checksum How to use checksums |
3e3fdbb10042fb8bb7cd24bf189067610d2023d74666e48bfdf5ef097402d91e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_sql-0.3.12-cp310-abi3-win_arm64.whl
| Download URL | tree_sitter_sql-0.3.12-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 893.7 kB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
194e3b73d247e1a2b56647de4254d8c5f404681f944fa7e52fae4f4b0609ae11
|
|
BLAKE2b-256 checksum How to use checksums |
906f41e9e6c975df2f2d04a29eedec0a0a3b605026a72bf9961480d1d1eff2a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_sql-0.3.12-cp310-abi3-win_amd64.whl
| Download URL | tree_sitter_sql-0.3.12-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 893.3 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b1b432ac9b0676ad7ebd56d9a5b118f9919d1c821d1f3d74942450927e3f5dad
|
|
BLAKE2b-256 checksum How to use checksums |
0619b8665fbc21bc8b302d0885a0634993dd523d981532985d91564153fac651
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_sql-0.3.12-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | tree_sitter_sql-0.3.12-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 956.4 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b1a70298e3f8324c06ee31af863d614299a945546048b4d0ba1e0cc030f90f0b
|
|
BLAKE2b-256 checksum How to use checksums |
c657c4e835afd473d86f79ecab88081c35e814aba2696a55e2068a2135320236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_sql-0.3.12-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | tree_sitter_sql-0.3.12-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 957.6 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a621339de92c7a78df8ed630636be43a9e6665d0ecc130be8699abb6a1d543af
|
|
BLAKE2b-256 checksum How to use checksums |
399f08bd44d33a6293309eb5c7664453228689af1b53b804e0cb0a1f2f6b5200
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_sql-0.3.12-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tree_sitter_sql-0.3.12-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 957.5 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
975f6dfb17adec14dfd62e22c582c22d3d89c8a9e6aa4b32fd90f55d7244e2f5
|
|
BLAKE2b-256 checksum How to use checksums |
991d56d97f058dfd85f9fb812e7d6e0e89dde0bf765815bf7a15705238e89344
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_sql-0.3.12-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | tree_sitter_sql-0.3.12-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 958.1 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
05eae36833872814541328e6539e5950a6bae5479f455193aacf313e40cd37af
|
|
BLAKE2b-256 checksum How to use checksums |
b5aab317e62f2718be83bb402bc58e30537b1f5bba54ee2f8fc9100fd4d58449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_sql-0.3.12-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | tree_sitter_sql-0.3.12-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 995.2 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6a9e169a7e92f6cbf2ec13a996eded9b9db5c5d3c3d29aea257b8d82beb8899c
|
|
BLAKE2b-256 checksum How to use checksums |
0fc72ea3cceb8d27a9746279d8cbaf6a37c9191dd753b6d2b3bc764501893ab2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_sql-0.3.12-cp310-abi3-macosx_10_9_x86_64.whl
| Download URL | tree_sitter_sql-0.3.12-cp310-abi3-macosx_10_9_x86_64.whl |
|---|---|
| Size | 898.9 kB |
| Tags | CPython 3.10 abi3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
93f0e0f8fe4370cf96bfd9abb7fc98c7b968024c556588f200dd034f09af63f2
|
|
BLAKE2b-256 checksum How to use checksums |
4e59e95bc6ffd3e40f22a32504e67fc54808910e2db52caaa5cd6a7a74487bc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for tree-sitter-sql 0.3.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.