From bf1160acd04ef75d22bc27a834b4351411bba07a Mon Sep 17 00:00:00 2001 From: emrberk Date: Tue, 9 Sep 2025 12:53:16 +0300 Subject: [PATCH 1/5] Add new keywords and functions --- src/functions.ts | 3 +++ src/keywords.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/functions.ts b/src/functions.ts index e79e3b5..feddf0d 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -228,6 +228,8 @@ export default [ "to_uppercase", "to_utc", "to_uuid", + "today", + "tomorrow", "touch", "transpose", "trim", @@ -244,4 +246,5 @@ export default [ "within", "vwap", "year", + "yesterday", ] diff --git a/src/keywords.ts b/src/keywords.ts index a706931..ccf0af2 100644 --- a/src/keywords.ts +++ b/src/keywords.ts @@ -71,6 +71,7 @@ export default [ "immediate", "in", "include", + "incremental", "index", "inner", "insert", @@ -86,6 +87,7 @@ export default [ "length", "level", "limit", + "linear", "list", "lock", "lt", @@ -119,6 +121,7 @@ export default [ "pivot", "preceding", "prepare", + "prev", "primary", "public", "range", From 37024d908aad4276550625bdaa84e1c0aebc146c Mon Sep 17 00:00:00 2001 From: emrberk Date: Tue, 9 Sep 2025 17:33:30 +0300 Subject: [PATCH 2/5] add other keywords, functions, and introduce keywords --- src/constants.ts | 44 +++++++++++++++++++++++++++++++++++++++++++- src/dataTypes.ts | 2 ++ src/functions.ts | 41 +++++++++++++++++++++++++++++++++++++++++ src/keywords.ts | 39 +++++++++++++++++++++++---------------- 4 files changed, 109 insertions(+), 17 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 538f3e8..f9e99eb 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1 +1,43 @@ -export default ["false", "true"] +export default [ + "asc", + "brotli", + "complete", + "day", + "days", + "desc", + "false", + "gzip", + "hour", + "hours", + "http", + "ilp", + "immediate", + "incremental", + "jwk", + "linear", + "lz0", + "lz4", + "lz4_raw", + "manual", + "minutes", + "month", + "months", + "nan", + "native", + "none", + "null", + "parquet", + "pgwire", + "prepare", + "prev", + "rest", + "skip_column", + "skip_row", + "snappy", + "true", + "uncompressed", + "week", + "year", + "years", + "zstd", +] diff --git a/src/dataTypes.ts b/src/dataTypes.ts index e85ed30..ae0df34 100644 --- a/src/dataTypes.ts +++ b/src/dataTypes.ts @@ -8,6 +8,7 @@ export default [ "float", "geohash", "int", + "integer", "interval", "ipv4", "long", @@ -18,4 +19,5 @@ export default [ "symbol", "timestamp", "uuid", + "varchar", ] diff --git a/src/functions.ts b/src/functions.ts index feddf0d..033993e 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -11,9 +11,15 @@ export default [ "array_avg", "array_count", "array_cum_sum", + "array_max", + "array_min", "array_position", + "array_stddev", + "array_stddev_pop", + "array_stddev_samp", "array_sum", "and", + "approx_median", "approx_percentile", "asin", "atan", @@ -30,8 +36,11 @@ export default [ "coalesce", "commitLag", "concat", + "corr", "cos", "cot", + "covar_pop", + "covar_samp", "count", "count_distinct", "current_database", @@ -46,11 +55,16 @@ export default [ "day_of_week_sunday_first", "days_in_month", "degrees", + "dense_rank", + "dim_length", "dot_product", "dump_memory_usage", "dump_thread_stacks", + "exp", "extract", "first", + "first_not_null", + "first_not_null_value", "first_value", "flatten", "floor", @@ -58,23 +72,33 @@ export default [ "format", "format_type", "functions", + "generate_series", + "greatest", "haversine_dist_deg", "headers", "hour", + "hydrate_table_metadata", "ifnull", "ilike", "in", "information_schema._pg_expandarray", + "interval_end", + "interval_start", "insertion_point", "isOrdered", "is_leap_year", "isnull", + "json_extract", "keywords", "ksum", + "l2price", "lag", "last", + "last_not_null", + "last_value", "lcase", "lead", + "least", "left", "len", "length", @@ -91,6 +115,7 @@ export default [ "matmul", "max", "maxUncommittedRows", + "md5", "memory_metrics", "micros", "mid", @@ -152,10 +177,16 @@ export default [ "pi", "position", "power", + "query_activity", + "quote_ident", "radians", "rank", + "read_parquet", "reader_pool", "regexp_replace", + "regr_intercept", + "regr_slope", + "reload_config", "reload_tls", "replace", "right", @@ -165,6 +196,7 @@ export default [ "rnd_char", "rnd_date", "rnd_double", + "rnd_double_array", "rnd_float", "rnd_geohash", "rnd_int", @@ -190,17 +222,23 @@ export default [ "server_version", "session_user", "shift", + "sha1", + "sha256", "show", "simulate_crash", + "sign", "sin", "size_pretty", "split_part", + "spread", + "spread_bps", "sqrt", "starts_with", "stddev", "stddev_pop", "stddev_samp", "string_agg", + "string_distinct_agg", "strpos", "substring", "sum", @@ -242,8 +280,11 @@ export default [ "variance", "version", "wal_tables", + "wal_transactions", "week_of_year", "within", + "wmid", + "writer_pool", "vwap", "year", "yesterday", diff --git a/src/keywords.ts b/src/keywords.ts index ccf0af2..d2d2271 100644 --- a/src/keywords.ts +++ b/src/keywords.ts @@ -1,22 +1,25 @@ export default [ + "abort", "account", "accounts", "add", + "alias", "align", "all", "alter", "and", "any", "as", - "asc", "asof", "assume", "attach", "atomic", "backup", "base", + "batch", "between", "by", + "bypass", "cache", "calendar", "capacity", @@ -24,14 +27,18 @@ export default [ "case", "cast", "cancel", + "checkpoint", "column", "columns", - "complete", + "compression_codec", + "compression_level", + "convert", "copy", "create", "cross", "current", "dedup", + "data_page_size", "database", "declare", "deferred", @@ -40,22 +47,26 @@ export default [ "default", "delay", "delete", + "delimiter", "disable", - "desc", "distinct", "drop", "else", "enable", "end", + "error", "every", "except", "exclude", + "exclusive", "exists", "exit", "explain", + "external", "fill", "first", "for", + "format", "foreign", "following", "from", @@ -67,11 +78,8 @@ export default [ "http", "if", "ignore", - "ilp", - "immediate", "in", "include", - "incremental", "index", "inner", "insert", @@ -79,7 +87,6 @@ export default [ "into", "isolation", "join", - "jwk", "key", "keys", "latest", @@ -87,24 +94,21 @@ export default [ "length", "level", "limit", - "linear", "list", "lock", "lt", - "manual", "materialized", - "nan", "natural", "no", "nocache", - "none", "not", - "null", "nulls", + "o3MaxLag", "observation", "offset", "on", "only", + "option", "or", "order", "others", @@ -112,16 +116,15 @@ export default [ "over", "owned", "param", + "parameters", + "parquet_version", "partition", "partitions", "password", "period", "permissions", - "pgwire", "pivot", "preceding", - "prepare", - "prev", "primary", "public", "range", @@ -132,11 +135,11 @@ export default [ "rename", "repair", "respect", - "rest", "resume", "revoke", "right", "range", + "row_group_size", "row", "rows", "sample", @@ -144,10 +147,12 @@ export default [ "set", "service", "show", + "skip", "snapshot", "splice", "squash", "start", + "statistics_enabled", "system", "table", "tables", @@ -171,7 +176,9 @@ export default [ "upsert", "vacuum", "values", + "verification", "view", + "volume", "wal", "when", "where", From 3d87024ffdd303c9cadf47126f2099e23f9437ff Mon Sep 17 00:00:00 2001 From: emrberk Date: Tue, 9 Sep 2025 17:40:44 +0300 Subject: [PATCH 3/5] small corrections --- src/constants.ts | 2 +- src/functions.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index f9e99eb..924dff8 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -15,9 +15,9 @@ export default [ "incremental", "jwk", "linear", - "lz0", "lz4", "lz4_raw", + "lzo", "manual", "minutes", "month", diff --git a/src/functions.ts b/src/functions.ts index 033993e..7fcaf74 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -3,6 +3,7 @@ export default [ "<<=", ">>", ">>=", + "_query_trace", "VARCHAR", "abs", "acos", From 67be66fc15aa13f94e371c38510a0d6c80d83614 Mon Sep 17 00:00:00 2001 From: emrberk Date: Wed, 10 Sep 2025 15:13:02 +0300 Subject: [PATCH 4/5] more constants --- src/constants.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/constants.ts b/src/constants.ts index 924dff8..e5cc9ce 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -19,10 +19,15 @@ export default [ "lz4_raw", "lzo", "manual", + "millisecond", + "milliseconds", + "minute", "minutes", "month", "months", "nan", + "nanosecond", + "nanoseconds", "native", "none", "null", @@ -31,12 +36,15 @@ export default [ "prepare", "prev", "rest", + "second", + "seconds", "skip_column", "skip_row", "snappy", "true", "uncompressed", "week", + "weeks", "year", "years", "zstd", From c323ccf459b1e4fc26126d788622100bb3674c66 Mon Sep 17 00:00:00 2001 From: emrberk Date: Wed, 10 Sep 2025 15:40:37 +0300 Subject: [PATCH 5/5] add timestamp_ns --- src/dataTypes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dataTypes.ts b/src/dataTypes.ts index ae0df34..0712338 100644 --- a/src/dataTypes.ts +++ b/src/dataTypes.ts @@ -18,6 +18,7 @@ export default [ "string", "symbol", "timestamp", + "timestamp_ns", "uuid", "varchar", ]