{"id":13495832,"url":"https://github.com/m-novikov/tree-sitter-sql","last_synced_at":"2025-04-12T22:34:28.938Z","repository":{"id":37006002,"uuid":"372213083","full_name":"m-novikov/tree-sitter-sql","owner":"m-novikov","description":"SQL syntax highlighting for tree-sitter","archived":false,"fork":false,"pushed_at":"2024-03-06T11:55:08.000Z","size":20807,"stargazers_count":115,"open_issues_count":39,"forks_count":33,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T01:57:20.285Z","etag":null,"topics":["grammar","parser","sql","syntax","syntax-highlighting","tree-sitter"],"latest_commit_sha":null,"homepage":"","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/m-novikov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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-05-30T12:49:56.000Z","updated_at":"2025-03-18T15:56:04.000Z","dependencies_parsed_at":"2024-01-16T09:53:29.177Z","dependency_job_id":"79e4bf7f-9245-45e3-a887-05d67ecbdf02","html_url":"https://github.com/m-novikov/tree-sitter-sql","commit_stats":{"total_commits":160,"total_committers":7,"mean_commits":"22.857142857142858","dds":0.2875,"last_synced_commit":"63cd04238b18c7f55987465b3252597da47b6924"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-novikov%2Ftree-sitter-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-novikov%2Ftree-sitter-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-novikov%2Ftree-sitter-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-novikov%2Ftree-sitter-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-novikov","download_url":"https://codeload.github.com/m-novikov/tree-sitter-sql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248640852,"owners_count":21138104,"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":["grammar","parser","sql","syntax","syntax-highlighting","tree-sitter"],"created_at":"2024-07-31T19:01:38.686Z","updated_at":"2025-04-12T22:34:28.915Z","avatar_url":"https://github.com/m-novikov.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![Node.js CI](https://github.com/m-novikov/tree-sitter-sql/actions/workflows/node.js.yml/badge.svg)](https://github.com/m-novikov/tree-sitter-sql/actions/workflows/node.js.yml)\n\n# SQL syntax for tree-sitter\n\nThis project initially focuses on PostgreSQL flavor of SQL\n\n## Try it out\n\nYou can try out the parser here: [Tree Sitter SQL Playground](https://m-novikov.github.io/tree-sitter-sql/)\n\n## Development\n\nInstall [pre-commit](https://pre-commit.com/#install) and run `pre-commit install` in the root of this repo. This will ensure\nthat code follows code style of this repo.\n\nFile describing grammar is [grammar.js](./grammar.js)\n\nEvery time the grammar file changes code generation needs to be run by invoking `npm run gen`\n\n`npm test` command automatically performs code generation\n\nTests files are located in [test/corpus](./test/corpus)\n\n[Here](https://tree-sitter.github.io/tree-sitter/creating-parsers#command-test) is the documentation on test file syntax\n\n### Running tests\n\n```\nnpm install --also=dev\nnpm test\n```\n\n### Debbuging\n\n* `npm run parse \u003cfile.sql\u003e` outputs a syntax tree\n* `npm run extract-error \u003cfile.sql\u003e` shows first offending line\n\n### Goals\n\nThis parser is supposed to be used in text editors. As a result:\n\n* it's very lax in what it considers valid SQL parse\n* adding extra nodes to have convenient selection anchors is okay\n\n### Other projects\n\n* https://github.com/DerekStride/tree-sitter-sql\n* https://github.com/dhcmrlchtdj/tree-sitter-sqlite\n* \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-novikov%2Ftree-sitter-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-novikov%2Ftree-sitter-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-novikov%2Ftree-sitter-sql/lists"}