Skip to content

Commit 07d21ee

Browse files
authored
Add new keywords and functions (#50)
* Add new keywords and functions * add other keywords, functions, and introduce keywords * small corrections * more constants * add timestamp_ns
1 parent 7a84fe3 commit 07d21ee

File tree

4 files changed

+122
-14
lines changed

4 files changed

+122
-14
lines changed

src/constants.ts

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
export default ["false", "true"]
1+
export default [
2+
"asc",
3+
"brotli",
4+
"complete",
5+
"day",
6+
"days",
7+
"desc",
8+
"false",
9+
"gzip",
10+
"hour",
11+
"hours",
12+
"http",
13+
"ilp",
14+
"immediate",
15+
"incremental",
16+
"jwk",
17+
"linear",
18+
"lz4",
19+
"lz4_raw",
20+
"lzo",
21+
"manual",
22+
"millisecond",
23+
"milliseconds",
24+
"minute",
25+
"minutes",
26+
"month",
27+
"months",
28+
"nan",
29+
"nanosecond",
30+
"nanoseconds",
31+
"native",
32+
"none",
33+
"null",
34+
"parquet",
35+
"pgwire",
36+
"prepare",
37+
"prev",
38+
"rest",
39+
"second",
40+
"seconds",
41+
"skip_column",
42+
"skip_row",
43+
"snappy",
44+
"true",
45+
"uncompressed",
46+
"week",
47+
"weeks",
48+
"year",
49+
"years",
50+
"zstd",
51+
]

src/dataTypes.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default [
88
"float",
99
"geohash",
1010
"int",
11+
"integer",
1112
"interval",
1213
"ipv4",
1314
"long",
@@ -17,5 +18,7 @@ export default [
1718
"string",
1819
"symbol",
1920
"timestamp",
21+
"timestamp_ns",
2022
"uuid",
23+
"varchar",
2124
]

src/functions.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export default [
33
"<<=",
44
">>",
55
">>=",
6+
"_query_trace",
67
"VARCHAR",
78
"abs",
89
"acos",
@@ -11,9 +12,15 @@ export default [
1112
"array_avg",
1213
"array_count",
1314
"array_cum_sum",
15+
"array_max",
16+
"array_min",
1417
"array_position",
18+
"array_stddev",
19+
"array_stddev_pop",
20+
"array_stddev_samp",
1521
"array_sum",
1622
"and",
23+
"approx_median",
1724
"approx_percentile",
1825
"asin",
1926
"atan",
@@ -30,8 +37,11 @@ export default [
3037
"coalesce",
3138
"commitLag",
3239
"concat",
40+
"corr",
3341
"cos",
3442
"cot",
43+
"covar_pop",
44+
"covar_samp",
3545
"count",
3646
"count_distinct",
3747
"current_database",
@@ -46,35 +56,50 @@ export default [
4656
"day_of_week_sunday_first",
4757
"days_in_month",
4858
"degrees",
59+
"dense_rank",
60+
"dim_length",
4961
"dot_product",
5062
"dump_memory_usage",
5163
"dump_thread_stacks",
64+
"exp",
5265
"extract",
5366
"first",
67+
"first_not_null",
68+
"first_not_null_value",
5469
"first_value",
5570
"flatten",
5671
"floor",
5772
"flush_query_cache",
5873
"format",
5974
"format_type",
6075
"functions",
76+
"generate_series",
77+
"greatest",
6178
"haversine_dist_deg",
6279
"headers",
6380
"hour",
81+
"hydrate_table_metadata",
6482
"ifnull",
6583
"ilike",
6684
"in",
6785
"information_schema._pg_expandarray",
86+
"interval_end",
87+
"interval_start",
6888
"insertion_point",
6989
"isOrdered",
7090
"is_leap_year",
7191
"isnull",
92+
"json_extract",
7293
"keywords",
7394
"ksum",
95+
"l2price",
7496
"lag",
7597
"last",
98+
"last_not_null",
99+
"last_value",
76100
"lcase",
77101
"lead",
102+
"least",
78103
"left",
79104
"len",
80105
"length",
@@ -91,6 +116,7 @@ export default [
91116
"matmul",
92117
"max",
93118
"maxUncommittedRows",
119+
"md5",
94120
"memory_metrics",
95121
"micros",
96122
"mid",
@@ -152,10 +178,16 @@ export default [
152178
"pi",
153179
"position",
154180
"power",
181+
"query_activity",
182+
"quote_ident",
155183
"radians",
156184
"rank",
185+
"read_parquet",
157186
"reader_pool",
158187
"regexp_replace",
188+
"regr_intercept",
189+
"regr_slope",
190+
"reload_config",
159191
"reload_tls",
160192
"replace",
161193
"right",
@@ -165,6 +197,7 @@ export default [
165197
"rnd_char",
166198
"rnd_date",
167199
"rnd_double",
200+
"rnd_double_array",
168201
"rnd_float",
169202
"rnd_geohash",
170203
"rnd_int",
@@ -190,17 +223,23 @@ export default [
190223
"server_version",
191224
"session_user",
192225
"shift",
226+
"sha1",
227+
"sha256",
193228
"show",
194229
"simulate_crash",
230+
"sign",
195231
"sin",
196232
"size_pretty",
197233
"split_part",
234+
"spread",
235+
"spread_bps",
198236
"sqrt",
199237
"starts_with",
200238
"stddev",
201239
"stddev_pop",
202240
"stddev_samp",
203241
"string_agg",
242+
"string_distinct_agg",
204243
"strpos",
205244
"substring",
206245
"sum",
@@ -228,6 +267,8 @@ export default [
228267
"to_uppercase",
229268
"to_utc",
230269
"to_uuid",
270+
"today",
271+
"tomorrow",
231272
"touch",
232273
"transpose",
233274
"trim",
@@ -240,8 +281,12 @@ export default [
240281
"variance",
241282
"version",
242283
"wal_tables",
284+
"wal_transactions",
243285
"week_of_year",
244286
"within",
287+
"wmid",
288+
"writer_pool",
245289
"vwap",
246290
"year",
291+
"yesterday",
247292
]

0 commit comments

Comments
 (0)