{"id":13495743,"url":"https://github.com/DerekStride/tree-sitter-sql","last_synced_at":"2025-03-28T16:33:16.749Z","repository":{"id":43385736,"uuid":"346549593","full_name":"DerekStride/tree-sitter-sql","owner":"DerekStride","description":"SQL grammar for tree-sitter","archived":false,"fork":false,"pushed_at":"2025-03-11T13:46:18.000Z","size":54888,"stargazers_count":173,"open_issues_count":21,"forks_count":64,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-23T19:02:50.555Z","etag":null,"topics":["sql","tree-sitter","tree-sitter-parser"],"latest_commit_sha":null,"homepage":"http://derek.stride.host/tree-sitter-sql/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DerekStride.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-11T02:06:56.000Z","updated_at":"2025-03-19T17:20:40.000Z","dependencies_parsed_at":"2023-12-14T19:55:08.005Z","dependency_job_id":"f33f8469-307e-4473-9c2b-08c1ab5b5fd8","html_url":"https://github.com/DerekStride/tree-sitter-sql","commit_stats":{"total_commits":404,"total_committers":23,"mean_commits":"17.565217391304348","dds":0.6732673267326732,"last_synced_commit":"7a001064fb24f8dda35f473836f2664b5fea134d"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerekStride%2Ftree-sitter-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerekStride%2Ftree-sitter-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerekStride%2Ftree-sitter-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerekStride%2Ftree-sitter-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DerekStride","download_url":"https://codeload.github.com/DerekStride/tree-sitter-sql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246063214,"owners_count":20717770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sql","tree-sitter","tree-sitter-parser"],"created_at":"2024-07-31T19:01:37.810Z","updated_at":"2025-03-28T16:33:16.260Z","avatar_url":"https://github.com/DerekStride.png","language":"JavaScript","readme":"# tree-sitter-sql\n\n[![Build/test](https://github.com/derekstride/tree-sitter-sql/actions/workflows/ci.yml/badge.svg)](https://github.com/derekstride/tree-sitter-sql/actions/workflows/ci.yml)\n[![GitHub Pages](https://github.com/DerekStride/tree-sitter-sql/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/DerekStride/tree-sitter-sql/actions/workflows/gh-pages.yml)\n[![npm package version](https://img.shields.io/npm/v/%40derekstride/tree-sitter-sql?logo=npm\u0026color=brightgreen)](https://www.npmjs.com/package/@derekstride/tree-sitter-sql)\n\n\nA general/permissive SQL grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).\n\n## Installation\n\n**We don't commit the generated parser files to the `main` branch.** Instead, you can find them on the\n[gh-pages](https://github.com/DerekStride/tree-sitter-sql/tree/gh-pages) branch. We're open to feedback \u0026 encourage you\nto [open an issue](https://github.com/DerekStride/tree-sitter-sql/issues/new) to discuss any problems.\n\nThey are also hosted on the [GitHub pages site](https://derek.stride.host/tree-sitter-sql/) and available for download\nhere:\n[github://derekstride/tree-sitter-sql/gh-pages.tar.gz](https://github.com/DerekStride/tree-sitter-sql/archive/refs/heads/gh-pages.tar.gz).\n\n*Plugin maintainers ensure to specify the `HEAD` (or a specific revision) of the `gh-pages` branch when integrating\nwith this project.*\n\n### Step 1: Download the parser files\n\n**Using `git`**\n```bash\ngit clone https://github.com/DerekStride/tree-sitter-sql.git\ncd tree-sitter-sql\ngit checkout gh-pages\n```\n\n**Using `curl`**\n```bash\ncurl -LO https://github.com/DerekStride/tree-sitter-sql/archive/refs/heads/gh-pages.tar.gz\ntar -xzf gh-pages.tar.gz\ncd tree-sitter-sql-gh-pages\n```\n\n### Step 2: Compile the Parser\n\nTree-sitter parsers need to be compiled as a shared-object / dynamic-library, you can enable this by passing the\n`-shared` \u0026 `-fPIC` flags to your compiler.\n\n```bash\ncc -shared -fPIC -I./src src/parser.c src/scanner.c -o sql.so\n```\n\n### Using [cargo](https://crates.io/crates/tree-sitter-sequel)\n\n```bash\ncargo add tree-sitter-sequel\n```\n\n### Using [npm](https://www.npmjs.com/package/@derekstride/tree-sitter-sql)\n\n```bash\nnpm i @derekstride/tree-sitter-sql\n```\n\n### Using [pip](https://pypi.org/project/tree-sitter-sql/0.3.5/)\n\n```bash\npip install tree-sitter-sql\n```\n\n## Development\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for documentation on how to set up the project for development.\n\n## Features\n\nFor a complete list of features see the the [tests](test/corpus)\n\n## References\n\n* [Wikipedia#SQL_syntax](https://en.wikipedia.org/wiki/SQL_syntax) - I consulted wikipedia for naming conventions,\n  though I may not have been strict early on in the prototyping.\n* [Phoenix Language Reference](https://forcedotcom.github.io/phoenix/index.html) - A reference diagram.\n* [SQLite's railroad diagram for expr](https://www.sqlite.org/lang_expr.html) - Another reference diagram.\n* [Postgresql syntax documentation](https://www.postgresql.org/docs/current/sql-commands.html)\n* [Mariadb syntax documentation](https://mariadb.com/kb/en/sql-statements-structure/)\n\n### Other projects\n\n* https://github.com/m-novikov/tree-sitter-sql\n* https://github.com/tjdevries/tree-sitter-sql\n* https://github.com/dhcmrlchtdj/tree-sitter-sqlite\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDerekStride%2Ftree-sitter-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDerekStride%2Ftree-sitter-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDerekStride%2Ftree-sitter-sql/lists"}