tree-sitter-sql icon indicating copy to clipboard operation
tree-sitter-sql copied to clipboard

SQL syntax highlighting for tree-sitter

Results 41 tree-sitter-sql issues
Sort by recently updated
recently updated
newest added

Hi @m-novikov , is there something I can do to help merging PRs more efficiently? Please let me know if you have any feedback or suggestions :)

Improved the ALTER TABLE statement to fully support it according to doc https://www.postgresql.org/docs/current/sql-altertable.html

Supported the ALTER TYPE statement according to https://www.postgresql.org/docs/current/sql-altertype.html

Support row constructors according to https://www.postgresql.org/docs/current/sql-expressions.html#SQL-SYNTAX-ROW-CONSTRUCTORS

Support array constructors according to https://www.postgresql.org/docs/current/sql-expressions.html#SQL-SYNTAX-ARRAY-CONSTRUCTORS

Currently, the parser accepts any kind of input provided there are some parts of PostgreSQL and MySQL. We probably should use approach from https://github.com/tree-sitter/tree-sitter-typescript and have main grammar file with...

It's not currently possible to produce grammar that would correctly parse the following test case: ``` SELECT interval; SELECT interval '1 minute'; ``` Issue: https://github.com/tree-sitter/tree-sitter/issues/1746 Possibly related https://github.com/tree-sitter/tree-sitter/pull/1635

This is needed for integration in [Lapce](lapce.dev/)

In PostgreSQL 14+ a new language mode is available to define a function: - https://www.postgresql.org/docs/14/sql-createfunction.html Explanation: > Allow SQL-language functions and procedures to use SQL-standard function bodies Here's an example...

```sql CREATE FUNCTION add() RETURNS integer AS 'select 1;' LANGUAGE SQL; ``` We get `MISSING identifier` but it's perfectly valid to have a function without a parameter.