Commit Graph

73 Commits (2bce477da0ea67d496b44cd6b2dbb2a99cfccae3)

Author SHA1 Message Date
Maksim Novikov 2bce477da0
Add COMMENT ON statement support 2022-06-12 15:50:06 +07:00
Maksim Novikov aabbcf3fe3
Add support for more statements
* ALTER SCHEMA
* ALTER TABLE ... OWNER TO ...
* CREATE EXTENSION ... [SCHEMA, VERSION, CASCADE]
* CREATE FUNCTION LANGUAGE as quoted string
2022-06-12 15:28:30 +07:00
Maksim Novikov 14e8ba8839
Support double quote escaping in strings 2022-06-12 14:48:49 +07:00
Maksim Novikov c3d3b38557
Intorduce external parser for dollar quoted strings
PostgreSQL supports stings of the following format $TAG$mycontent$TAG$
https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING

These strings often used to define a function body.
2022-06-12 11:03:02 +07:00
Maksim Novikov 5378bc74cc
Quoted nested names support
Co-authored-by: Tim Luo <shiwen@merico.dev>
2022-06-11 22:43:59 +07:00
Maksim Novikov 736b7e7539
Interpret function body as string
Building syntax tree should be solved via language injection
https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection
2022-06-11 16:17:13 +07:00
Maksim Novikov 7ccb93e4cc
Transaction statements 2022-06-11 16:01:54 +07:00
Maksim Novikov 7335711c4f
Improve CREATE INDEX support 2022-06-11 16:01:53 +07:00
Maksim Novikov a21f3d2587
Extend INSERT and ALTER TABLE support 2022-06-11 16:01:20 +07:00
Maksim Novikov 0d3cde974e
Improve mathematical expressions support
Co-authored-by: Tim Luo <shiwen@merico.dev>
2022-06-11 11:06:08 +07:00
Maksim Novikov 8219f6745c
Improve intervals support 2022-05-15 14:32:16 +07:00
Maksim Novikov d7406cf948
Allow dotted name in sequences 2022-05-15 12:31:57 +07:00
Maksim Novikov b0aa939771
Fix opclass in indexes 2022-05-15 12:28:16 +07:00
Maksim Novikov 7447b20b2e
Add initial alter table support 2022-05-15 12:20:13 +07:00
Maksim Novikov 0acec47237
Add sequence support 2022-05-15 11:22:10 +07:00
Maksim Novikov c59f7164e0
Add pg commands fix create temporary table 2022-05-14 17:34:01 +07:00
Maksim Novikov 1d4d62d60f
Add create role and drop statements 2022-05-14 17:20:48 +07:00
Maksim Novikov 21d5911f5f
Add create extension 2022-05-14 17:04:24 +07:00
Maksim Novikov 38b2783652
Fix null constaint in create type 2022-05-14 16:59:59 +07:00
Maksim Novikov 5c5d85191d
Fix standalone on delete constraint 2022-05-14 16:45:56 +07:00
Maksim Novikov 95b344c93d
Add EXCLUDE constraint 2022-05-14 16:26:13 +07:00
Maksim Novikov 3747eea88c
Add interval recognition 2022-05-14 16:23:27 +07:00
Maksim Novikov fc59772dd0
Support aliases without explicit AS keyword 2022-04-17 11:40:43 +07:00
Maksim Novikov fee6b4f1ae
Merge branch 'feat/add-support-for-schema' into punctuation 2022-04-17 10:37:27 +07:00
Maksim Novikov c5650de5cd
Initial punctuation support 2022-04-15 14:36:45 +07:00
Maksim Novikov a3c09983f4
Handle asterisk expressions 2022-04-15 13:57:46 +07:00
Maksim Novikov fd109c3077
Fix comparison operator precedence 2022-04-15 12:42:14 +07:00
Maksim Novikov b63e81bf37
Improve boolean highlighting. Closes: #4 2022-04-15 12:31:33 +07:00
Cédric Fabianski 1eb656e013
chore: add tests 2022-02-14 12:45:53 +07:00
Cédric Fabianski f77d4567f2
fix: add support for direction constraints in column definition 2021-09-24 14:34:17 +07:00
Cédric Fabianski 2a1fbdaad9
add support for schema
A table_reference can be `my_table` or `public.my_table`.
This PR allows this while also keeping the schema and the table name
separated.
2021-09-24 14:34:15 +07:00
Maksim Novikov 13116346dc
Add array element access operation 2021-07-04 16:25:12 +07:00
Maksim Novikov 535a3d535d
Expand function hints support 2021-07-04 16:20:20 +07:00
Maksim Novikov 47669d7b0c
Add set statement 2021-07-04 16:03:05 +07:00
Maksim Novikov 24b77f1d71
Add grant statement 2021-07-04 15:55:00 +07:00
Maksim Novikov 9f4175ff60
Add create schema statement 2021-07-04 15:41:11 +07:00
Maksim Novikov 75c90a8372
Reformat statements file 2021-07-04 15:38:21 +07:00
Maksim Novikov 294fdc7078
Add joins support 2021-07-04 15:28:54 +07:00
Maksim Novikov b9dd37a469
Add table highlights test 2021-07-04 15:04:01 +07:00
Maksim Novikov fd2485dcf2
Expand builtin types highlighting 2021-07-04 13:09:53 +07:00
Maksim Novikov 0cec221bc5
Parse create or replace function 2021-07-04 12:52:29 +07:00
Maksim Novikov f0111311ee
Add buitlin types highlighting 2021-07-04 11:53:40 +07:00
Maksim Novikov b526c83d6c
Be more permissive with multiword keywords 2021-07-04 10:53:16 +07:00
Maksim Novikov 97fbb79a26
Add intial support for insert statements 2021-07-03 21:16:43 +07:00
Maksim Novikov e82c5aeb95
Add update highlight test 2021-07-03 21:05:08 +07:00
Maksim Novikov 37b403f257
Add support for update statements 2021-07-03 20:58:07 +07:00
Maksim Novikov 3bbf6df064
Add select subexpressions 2021-06-19 18:19:43 +07:00
Maksim Novikov 9be3c470f1
Add test and examples for function 2021-06-06 15:47:36 +07:00
Maksim Novikov 0544af85d9
Add initial function body parsing 2021-06-06 15:47:18 +07:00
Maksim Novikov a380e770b9
Add tests for lowercase sytnax 2021-06-06 13:20:39 +07:00