tree-sitter-sql
tree-sitter-sql copied to clipboard
SQL grammar for tree-sitter
## What The main goal of this PR is to wrap the the select expression items in a new `term` node. This allows us to properly attribute the `alias` to...
I believe the following should be valid sql, but as you can see it isn't correctly parsed: ```sql CREATE TABLE test ( name TEXT UNIQUE ); ``` ```(program ; [0,...
Curious what the thoughts are on supporting a trailing comma in SQL? Snowflake just announced [support](https://docs.snowflake.com/en/release-notes/2024/8_11#select-supports-trailing-commas) for this in their dialect. Example: ```sql SELECT emp_id, name, dept, FROM employees; ```...
# What Adds support for [`ON DUPLICATE KEY UPDATE `](https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html). Ref: [Grammar Definition](https://dev.mysql.com/doc/refman/8.0/en/insert.html).
# What Currently the only assets included on the release are the source files (see https://github.com/DerekStride/tree-sitter-sql/releases/tag/v0.2.0). We should generate & add the parser files to the release as well. We...
I'm using [sqlc](https://github.com/sqlc-dev/sqlc) where multiple queries are written in a single sql file, from which code is then generated. Arguments are written as `$1`, `$2` and so on. The dollar...
Airport pairing.
Given the following Postgres SQL function: ```sql CREATE OR REPLACE FUNCTION start_task(p_task_name VARCHAR) RETURNS sessions AS $$ DECLARE task_id INTEGER; task_row RECORD; session_record sessions; BEGIN -- Look for any ongoing...
Now (5660d80) the state_count = 13456 roughly doubling, the size of the binary is 1.8Mo previously 1.2Mo. Either ```diff index 69d0a1d..2421aa2 100644 --- a/grammar.js +++ b/grammar.js @@ -1216,7 +1216,7 @@...
https://www.postgresql.org/docs/current/sql-expressions.html#FIELD-SELECTION