mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
feat(sql): MariaDB/MySQL syntax, Apache Hive syntax, unified builtin functions, floats, negative integers (#6041)
* feat(sql): MariaDB/MySQL table options `COLLATE`, `CHARACTER SET`, `ENGINE` Upstream changes:286e10c5bc...30e15d45dc
* feat(sql): Optional `COLUMN` in `ALTER TABLE` Upstream changes:30e15d45dc...c508e6044a
* feat(sql): Add `UNSIGNED` support, refactor numeric types Upstream changes:c508e6044a...2d1d5b68a1
* feat(sql): Add support for Apache Spark create Hive table Upstream changes:2d1d5b68a1...7be06f4d5e
* feat(sql): Add support for signed and unsigned floating point literals Upstream changes: https://github.com/DerekStride/tree-sitter-sql/pull/92/files * feat(sql): Add interval data type Upstream changes:13d375dea3...7b4bcd0394
* feat(sql): Add support for DROP INDEX Upstream changes:7b4bcd0394...173d6feb50
* feat(sql): Add MariaDB/MySQL `ALTER TABLE ... CHANGE|MODIFY ... [FIRST|AFTER]` syntax Upstream changes:173d6feb50...0d7a121b2a
* feat(sql): Extract fields from Apache Hive storage location and row format Upstream changes:0d7a121b2a...d2f0f6695f
* feat(sql): Fix unified built-in functions Upstream changes:d2f0f6695f...e4e43ba742
* feat(sql): Support negative integers Upstream changes:e4e43ba742...3a3f92b29c
* rework(sql): Improve `@constant.numeric` regex
This commit is contained in:
parent
8043959265
commit
6494fc1daf
@ -1434,7 +1434,7 @@ injection-regex = "sql"
|
|||||||
|
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "sql"
|
name = "sql"
|
||||||
source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "286e10c5bc5d1703ee8f9afb351165a9a6182be1" }
|
source = { git = "https://github.com/DerekStride/tree-sitter-sql", rev = "3a3f92b29c880488a08bc2baaf1aca6432ec3380" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "gdscript"
|
name = "gdscript"
|
||||||
|
@ -1,20 +1,17 @@
|
|||||||
(keyword_btree) @function.builtin
|
|
||||||
(keyword_hash) @function.builtin
|
|
||||||
(keyword_gist) @function.builtin
|
|
||||||
(keyword_spgist) @function.builtin
|
|
||||||
(keyword_gin) @function.builtin
|
|
||||||
(keyword_brin) @function.builtin
|
|
||||||
|
|
||||||
(cast
|
[
|
||||||
name: (identifier) @function.builtin)
|
(keyword_btree)
|
||||||
|
(keyword_hash)
|
||||||
|
(keyword_gist)
|
||||||
|
(keyword_spgist)
|
||||||
|
(keyword_gin)
|
||||||
|
(keyword_brin)
|
||||||
|
|
||||||
(count
|
(cast)
|
||||||
name: (identifier) @function.builtin)
|
(count)
|
||||||
|
(group_concat)
|
||||||
(keyword_group_concat) @function.builtin
|
(invocation)
|
||||||
|
] @function.builtin
|
||||||
(invocation
|
|
||||||
name: (identifier) @function.builtin)
|
|
||||||
|
|
||||||
(table_reference
|
(table_reference
|
||||||
name: (identifier) @namespace)
|
name: (identifier) @namespace)
|
||||||
@ -57,7 +54,7 @@
|
|||||||
] @constant.builtin
|
] @constant.builtin
|
||||||
|
|
||||||
((literal) @constant.numeric
|
((literal) @constant.numeric
|
||||||
(#match? @constant.numeric "^(-?\d*\.?\d*)$"))
|
(#match? @constant.numeric "^-?\\d*\\.?\\d*$"))
|
||||||
|
|
||||||
(literal) @string
|
(literal) @string
|
||||||
|
|
||||||
@ -92,6 +89,8 @@
|
|||||||
(keyword_primary)
|
(keyword_primary)
|
||||||
(keyword_create)
|
(keyword_create)
|
||||||
(keyword_alter)
|
(keyword_alter)
|
||||||
|
(keyword_change)
|
||||||
|
(keyword_modify)
|
||||||
(keyword_drop)
|
(keyword_drop)
|
||||||
(keyword_add)
|
(keyword_add)
|
||||||
(keyword_table)
|
(keyword_table)
|
||||||
@ -119,8 +118,12 @@
|
|||||||
(keyword_if)
|
(keyword_if)
|
||||||
(keyword_exists)
|
(keyword_exists)
|
||||||
(keyword_auto_increment)
|
(keyword_auto_increment)
|
||||||
|
(keyword_collate)
|
||||||
|
(keyword_character)
|
||||||
|
(keyword_engine)
|
||||||
(keyword_default)
|
(keyword_default)
|
||||||
(keyword_cascade)
|
(keyword_cascade)
|
||||||
|
(keyword_restrict)
|
||||||
(keyword_with)
|
(keyword_with)
|
||||||
(keyword_no)
|
(keyword_no)
|
||||||
(keyword_data)
|
(keyword_data)
|
||||||
@ -144,6 +147,7 @@
|
|||||||
(keyword_over)
|
(keyword_over)
|
||||||
(keyword_nulls)
|
(keyword_nulls)
|
||||||
(keyword_first)
|
(keyword_first)
|
||||||
|
(keyword_after)
|
||||||
(keyword_last)
|
(keyword_last)
|
||||||
(keyword_window)
|
(keyword_window)
|
||||||
(keyword_range)
|
(keyword_range)
|
||||||
@ -170,6 +174,37 @@
|
|||||||
(keyword_like)
|
(keyword_like)
|
||||||
(keyword_similar)
|
(keyword_similar)
|
||||||
(keyword_preserve)
|
(keyword_preserve)
|
||||||
|
(keyword_unsigned)
|
||||||
|
(keyword_zerofill)
|
||||||
|
|
||||||
|
(keyword_external)
|
||||||
|
(keyword_stored)
|
||||||
|
(keyword_cached)
|
||||||
|
(keyword_uncached)
|
||||||
|
(keyword_replication)
|
||||||
|
(keyword_tblproperties)
|
||||||
|
(keyword_compute)
|
||||||
|
(keyword_stats)
|
||||||
|
(keyword_location)
|
||||||
|
(keyword_partitioned)
|
||||||
|
(keyword_comment)
|
||||||
|
(keyword_sort)
|
||||||
|
(keyword_format)
|
||||||
|
(keyword_delimited)
|
||||||
|
(keyword_fields)
|
||||||
|
(keyword_terminated)
|
||||||
|
(keyword_escaped)
|
||||||
|
(keyword_lines)
|
||||||
|
|
||||||
|
(keyword_parquet)
|
||||||
|
(keyword_rcfile)
|
||||||
|
(keyword_csv)
|
||||||
|
(keyword_textfile)
|
||||||
|
(keyword_avro)
|
||||||
|
(keyword_sequencefile)
|
||||||
|
(keyword_orc)
|
||||||
|
(keyword_avro)
|
||||||
|
(keyword_jsonfile)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
[
|
[
|
||||||
@ -193,9 +228,11 @@
|
|||||||
(keyword_smallserial)
|
(keyword_smallserial)
|
||||||
(keyword_serial)
|
(keyword_serial)
|
||||||
(keyword_bigserial)
|
(keyword_bigserial)
|
||||||
(keyword_smallint)
|
|
||||||
(keyword_int)
|
|
||||||
|
|
||||||
|
(tinyint)
|
||||||
|
(smallint)
|
||||||
|
(mediumint)
|
||||||
|
(int)
|
||||||
(bigint)
|
(bigint)
|
||||||
(decimal)
|
(decimal)
|
||||||
(numeric)
|
(numeric)
|
||||||
@ -222,6 +259,8 @@
|
|||||||
(keyword_timestamp)
|
(keyword_timestamp)
|
||||||
(keyword_timestamptz)
|
(keyword_timestamptz)
|
||||||
|
|
||||||
|
(keyword_interval)
|
||||||
|
|
||||||
(keyword_geometry)
|
(keyword_geometry)
|
||||||
(keyword_geography)
|
(keyword_geography)
|
||||||
(keyword_box2d)
|
(keyword_box2d)
|
||||||
|
Loading…
Reference in New Issue
Block a user