@hdnax/sqlingo.js 0.0.4 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +8 -14
  3. package/README.npm.md +8 -14
  4. package/README.repo.md +1 -2
  5. package/dist/chunk-2YNOERAO.cjs +2 -0
  6. package/dist/chunk-2YNOERAO.cjs.map +1 -0
  7. package/dist/chunk-2Z3O2CFM.cjs +19 -0
  8. package/dist/chunk-2Z3O2CFM.cjs.map +1 -0
  9. package/dist/chunk-4ZMKB6PV.cjs +2 -0
  10. package/dist/chunk-4ZMKB6PV.cjs.map +1 -0
  11. package/dist/chunk-53OWF4GG.js +2 -0
  12. package/dist/chunk-53OWF4GG.js.map +1 -0
  13. package/dist/chunk-C4CLTVOW.cjs +2 -0
  14. package/dist/chunk-C4CLTVOW.cjs.map +1 -0
  15. package/dist/chunk-DOKMTZYO.cjs +4 -0
  16. package/dist/chunk-DOKMTZYO.cjs.map +1 -0
  17. package/dist/chunk-FCGUTI7Y.js +2 -0
  18. package/dist/chunk-FCGUTI7Y.js.map +1 -0
  19. package/dist/chunk-IPCIXWCY.js +2 -0
  20. package/dist/chunk-IPCIXWCY.js.map +1 -0
  21. package/dist/chunk-KCNOE4DZ.js +19 -0
  22. package/dist/chunk-KCNOE4DZ.js.map +1 -0
  23. package/dist/chunk-NRJHX2GZ.js +2 -0
  24. package/dist/chunk-NRJHX2GZ.js.map +1 -0
  25. package/dist/chunk-O2J5RKBN.js +2 -0
  26. package/dist/chunk-O2J5RKBN.js.map +1 -0
  27. package/dist/chunk-PXUASP5I.js +2 -0
  28. package/dist/chunk-PXUASP5I.js.map +1 -0
  29. package/dist/chunk-R7C3ZHVK.cjs +2 -0
  30. package/dist/chunk-R7C3ZHVK.cjs.map +1 -0
  31. package/dist/chunk-UHWHUDLE.cjs +2 -0
  32. package/dist/chunk-UHWHUDLE.cjs.map +1 -0
  33. package/dist/chunk-WRNYJ54A.cjs +2 -0
  34. package/dist/chunk-WRNYJ54A.cjs.map +1 -0
  35. package/dist/chunk-XZQFOICX.cjs +3 -0
  36. package/dist/chunk-XZQFOICX.cjs.map +1 -0
  37. package/dist/chunk-YLOQRUXC.js +2 -0
  38. package/dist/chunk-YLOQRUXC.js.map +1 -0
  39. package/dist/chunk-YSS2WVCM.cjs +2 -0
  40. package/dist/chunk-YSS2WVCM.cjs.map +1 -0
  41. package/dist/chunk-Z5V6VOIN.js +3 -0
  42. package/dist/chunk-Z5V6VOIN.js.map +1 -0
  43. package/dist/chunk-ZBFGQPJR.js +4 -0
  44. package/dist/chunk-ZBFGQPJR.js.map +1 -0
  45. package/dist/dialects/athena.cjs +2 -0
  46. package/dist/dialects/athena.cjs.map +1 -0
  47. package/dist/dialects/athena.d.cts +66 -0
  48. package/dist/dialects/athena.d.ts +66 -0
  49. package/dist/dialects/athena.js +2 -0
  50. package/dist/dialects/athena.js.map +1 -0
  51. package/dist/dialects/bigquery.cjs +3 -0
  52. package/dist/dialects/bigquery.cjs.map +1 -0
  53. package/dist/dialects/bigquery.d.cts +651 -0
  54. package/dist/dialects/bigquery.d.ts +651 -0
  55. package/dist/dialects/bigquery.js +3 -0
  56. package/dist/dialects/bigquery.js.map +1 -0
  57. package/dist/dialects/clickhouse.cjs +2 -0
  58. package/dist/dialects/clickhouse.cjs.map +1 -0
  59. package/dist/dialects/clickhouse.d.cts +634 -0
  60. package/dist/dialects/clickhouse.d.ts +634 -0
  61. package/dist/dialects/clickhouse.js +2 -0
  62. package/dist/dialects/clickhouse.js.map +1 -0
  63. package/dist/dialects/databricks.cjs +2 -0
  64. package/dist/dialects/databricks.cjs.map +1 -0
  65. package/dist/dialects/databricks.d.cts +484 -0
  66. package/dist/dialects/databricks.d.ts +484 -0
  67. package/dist/dialects/databricks.js +2 -0
  68. package/dist/dialects/databricks.js.map +1 -0
  69. package/dist/dialects/doris.cjs +2 -0
  70. package/dist/dialects/doris.cjs.map +1 -0
  71. package/dist/dialects/doris.d.cts +484 -0
  72. package/dist/dialects/doris.d.ts +484 -0
  73. package/dist/dialects/doris.js +2 -0
  74. package/dist/dialects/doris.js.map +1 -0
  75. package/dist/dialects/dremio.cjs +2 -0
  76. package/dist/dialects/dremio.cjs.map +1 -0
  77. package/dist/dialects/dremio.d.cts +522 -0
  78. package/dist/dialects/dremio.d.ts +522 -0
  79. package/dist/dialects/dremio.js +2 -0
  80. package/dist/dialects/dremio.js.map +1 -0
  81. package/dist/dialects/drill.cjs +2 -0
  82. package/dist/dialects/drill.cjs.map +1 -0
  83. package/dist/dialects/drill.d.cts +512 -0
  84. package/dist/dialects/drill.d.ts +512 -0
  85. package/dist/dialects/drill.js +2 -0
  86. package/dist/dialects/drill.js.map +1 -0
  87. package/dist/dialects/druid.cjs +2 -0
  88. package/dist/dialects/druid.cjs.map +1 -0
  89. package/dist/dialects/druid.d.cts +17 -0
  90. package/dist/dialects/druid.d.ts +17 -0
  91. package/dist/dialects/druid.js +2 -0
  92. package/dist/dialects/druid.js.map +1 -0
  93. package/dist/dialects/duckdb.cjs +86 -0
  94. package/dist/dialects/duckdb.cjs.map +1 -0
  95. package/dist/dialects/duckdb.d.cts +756 -0
  96. package/dist/dialects/duckdb.d.ts +756 -0
  97. package/dist/dialects/duckdb.js +86 -0
  98. package/dist/dialects/duckdb.js.map +1 -0
  99. package/dist/dialects/dune.cjs +2 -0
  100. package/dist/dialects/dune.cjs.map +1 -0
  101. package/dist/dialects/dune.d.cts +21 -0
  102. package/dist/dialects/dune.d.ts +21 -0
  103. package/dist/dialects/dune.js +2 -0
  104. package/dist/dialects/dune.js.map +1 -0
  105. package/dist/dialects/exasol.cjs +2 -0
  106. package/dist/dialects/exasol.cjs.map +1 -0
  107. package/dist/dialects/exasol.d.cts +507 -0
  108. package/dist/dialects/exasol.d.ts +507 -0
  109. package/dist/dialects/exasol.js +2 -0
  110. package/dist/dialects/exasol.js.map +1 -0
  111. package/dist/dialects/fabric.cjs +2 -0
  112. package/dist/dialects/fabric.cjs.map +1 -0
  113. package/dist/dialects/fabric.d.cts +463 -0
  114. package/dist/dialects/fabric.d.ts +463 -0
  115. package/dist/dialects/fabric.js +2 -0
  116. package/dist/dialects/fabric.js.map +1 -0
  117. package/dist/dialects/hive.cjs +2 -0
  118. package/dist/dialects/hive.cjs.map +1 -0
  119. package/dist/dialects/hive.d.cts +585 -0
  120. package/dist/dialects/hive.d.ts +585 -0
  121. package/dist/dialects/hive.js +2 -0
  122. package/dist/dialects/hive.js.map +1 -0
  123. package/dist/dialects/materialize.cjs +2 -0
  124. package/dist/dialects/materialize.cjs.map +1 -0
  125. package/dist/dialects/materialize.d.cts +890 -0
  126. package/dist/dialects/materialize.d.ts +890 -0
  127. package/dist/dialects/materialize.js +2 -0
  128. package/dist/dialects/materialize.js.map +1 -0
  129. package/dist/dialects/mysql.cjs +2 -0
  130. package/dist/dialects/mysql.cjs.map +1 -0
  131. package/dist/dialects/mysql.d.cts +292 -0
  132. package/dist/dialects/mysql.d.ts +292 -0
  133. package/dist/dialects/mysql.js +2 -0
  134. package/dist/dialects/mysql.js.map +1 -0
  135. package/dist/dialects/oracle.cjs +2 -0
  136. package/dist/dialects/oracle.cjs.map +1 -0
  137. package/dist/dialects/oracle.d.cts +539 -0
  138. package/dist/dialects/oracle.d.ts +539 -0
  139. package/dist/dialects/oracle.js +2 -0
  140. package/dist/dialects/oracle.js.map +1 -0
  141. package/dist/dialects/postgres.cjs +2 -0
  142. package/dist/dialects/postgres.cjs.map +1 -0
  143. package/dist/dialects/postgres.d.cts +587 -0
  144. package/dist/dialects/postgres.d.ts +587 -0
  145. package/dist/dialects/postgres.js +2 -0
  146. package/dist/dialects/postgres.js.map +1 -0
  147. package/dist/dialects/presto.cjs +2 -0
  148. package/dist/dialects/presto.cjs.map +1 -0
  149. package/dist/dialects/presto.d.cts +173 -0
  150. package/dist/dialects/presto.d.ts +173 -0
  151. package/dist/dialects/presto.js +2 -0
  152. package/dist/dialects/presto.js.map +1 -0
  153. package/dist/dialects/prql.cjs +2 -0
  154. package/dist/dialects/prql.cjs.map +1 -0
  155. package/dist/dialects/prql.d.cts +496 -0
  156. package/dist/dialects/prql.d.ts +496 -0
  157. package/dist/dialects/prql.js +2 -0
  158. package/dist/dialects/prql.js.map +1 -0
  159. package/dist/dialects/redshift.cjs +2 -0
  160. package/dist/dialects/redshift.cjs.map +1 -0
  161. package/dist/dialects/redshift.d.cts +132 -0
  162. package/dist/dialects/redshift.d.ts +132 -0
  163. package/dist/dialects/redshift.js +2 -0
  164. package/dist/dialects/redshift.js.map +1 -0
  165. package/dist/dialects/risingwave.cjs +2 -0
  166. package/dist/dialects/risingwave.cjs.map +1 -0
  167. package/dist/dialects/risingwave.d.cts +478 -0
  168. package/dist/dialects/risingwave.d.ts +478 -0
  169. package/dist/dialects/risingwave.js +2 -0
  170. package/dist/dialects/risingwave.js.map +1 -0
  171. package/dist/dialects/singlestore.cjs +2 -0
  172. package/dist/dialects/singlestore.cjs.map +1 -0
  173. package/dist/dialects/singlestore.d.cts +73 -0
  174. package/dist/dialects/singlestore.d.ts +73 -0
  175. package/dist/dialects/singlestore.js +2 -0
  176. package/dist/dialects/singlestore.js.map +1 -0
  177. package/dist/dialects/snowflake.cjs +3 -0
  178. package/dist/dialects/snowflake.cjs.map +1 -0
  179. package/dist/dialects/snowflake.d.cts +320 -0
  180. package/dist/dialects/snowflake.d.ts +320 -0
  181. package/dist/dialects/snowflake.js +3 -0
  182. package/dist/dialects/snowflake.js.map +1 -0
  183. package/dist/dialects/solr.cjs +2 -0
  184. package/dist/dialects/solr.cjs.map +1 -0
  185. package/dist/dialects/solr.d.cts +458 -0
  186. package/dist/dialects/solr.d.ts +458 -0
  187. package/dist/dialects/solr.js +2 -0
  188. package/dist/dialects/solr.js.map +1 -0
  189. package/dist/dialects/spark.cjs +2 -0
  190. package/dist/dialects/spark.cjs.map +1 -0
  191. package/dist/dialects/spark.d.cts +484 -0
  192. package/dist/dialects/spark.d.ts +484 -0
  193. package/dist/dialects/spark.js +2 -0
  194. package/dist/dialects/spark.js.map +1 -0
  195. package/dist/dialects/spark2.cjs +2 -0
  196. package/dist/dialects/spark2.cjs.map +1 -0
  197. package/dist/dialects/spark2.d.cts +486 -0
  198. package/dist/dialects/spark2.d.ts +486 -0
  199. package/dist/dialects/spark2.js +2 -0
  200. package/dist/dialects/spark2.js.map +1 -0
  201. package/dist/dialects/sqlite.cjs +2 -0
  202. package/dist/dialects/sqlite.cjs.map +1 -0
  203. package/dist/dialects/sqlite.d.cts +510 -0
  204. package/dist/dialects/sqlite.d.ts +510 -0
  205. package/dist/dialects/sqlite.js +2 -0
  206. package/dist/dialects/sqlite.js.map +1 -0
  207. package/dist/dialects/starrocks.cjs +2 -0
  208. package/dist/dialects/starrocks.cjs.map +1 -0
  209. package/dist/dialects/starrocks.d.cts +518 -0
  210. package/dist/dialects/starrocks.d.ts +518 -0
  211. package/dist/dialects/starrocks.js +2 -0
  212. package/dist/dialects/starrocks.js.map +1 -0
  213. package/dist/dialects/tableau.cjs +2 -0
  214. package/dist/dialects/tableau.cjs.map +1 -0
  215. package/dist/dialects/tableau.d.cts +466 -0
  216. package/dist/dialects/tableau.d.ts +466 -0
  217. package/dist/dialects/tableau.js +2 -0
  218. package/dist/dialects/tableau.js.map +1 -0
  219. package/dist/dialects/teradata.cjs +2 -0
  220. package/dist/dialects/teradata.cjs.map +1 -0
  221. package/dist/dialects/teradata.d.cts +539 -0
  222. package/dist/dialects/teradata.d.ts +539 -0
  223. package/dist/dialects/teradata.js +2 -0
  224. package/dist/dialects/teradata.js.map +1 -0
  225. package/dist/dialects/trino.cjs +2 -0
  226. package/dist/dialects/trino.cjs.map +1 -0
  227. package/dist/dialects/trino.d.cts +465 -0
  228. package/dist/dialects/trino.d.ts +465 -0
  229. package/dist/dialects/trino.js +2 -0
  230. package/dist/dialects/trino.js.map +1 -0
  231. package/dist/dialects/tsql.cjs +2 -0
  232. package/dist/dialects/tsql.cjs.map +1 -0
  233. package/dist/dialects/tsql.d.cts +703 -0
  234. package/dist/dialects/tsql.d.ts +703 -0
  235. package/dist/dialects/tsql.js +2 -0
  236. package/dist/dialects/tsql.js.map +1 -0
  237. package/dist/index.cjs +5 -25
  238. package/dist/index.cjs.map +1 -1
  239. package/dist/index.d.cts +3 -14178
  240. package/dist/index.d.ts +3 -14178
  241. package/dist/index.js +5 -25
  242. package/dist/index.js.map +1 -1
  243. package/dist/tokens-VcMD09XM.d.cts +15805 -0
  244. package/dist/tokens-VcMD09XM.d.ts +15805 -0
  245. package/package.json +171 -5
@@ -0,0 +1,507 @@
1
+ import { c as Dialect, d as Dialects, a0 as NormalizationStrategy, aH as NullOrdering, m as Tokenizer, _ as TokenPair, l as TokenType, i as Parser, E as Expression, ax as DateExpr, aD as TimestampExpr, G as Generator, $ as DataTypeExprKind, b5 as DataTypeExpr, cy as IfExpr, cz as CollateExpr, cA as RankExpr, cB as ConvertTimezoneExpr } from '../tokens-VcMD09XM.js';
2
+
3
+ declare class ExasolTokenizer extends Tokenizer {
4
+ static get IDENTIFIERS(): TokenPair[];
5
+ static get ORIGINAL_KEYWORDS(): Record<string, TokenType>;
6
+ }
7
+ declare class ExasolParser extends Parser {
8
+ static get ID_VAR_TOKENS(): Set<TokenType>;
9
+ static get NO_PAREN_FUNCTIONS(): {
10
+ lParen?: typeof Expression | undefined;
11
+ rParen?: typeof Expression | undefined;
12
+ lBracket?: typeof Expression | undefined;
13
+ rBracket?: typeof Expression | undefined;
14
+ lBrace?: typeof Expression | undefined;
15
+ rBrace?: typeof Expression | undefined;
16
+ comma?: typeof Expression | undefined;
17
+ dot?: typeof Expression | undefined;
18
+ dash?: typeof Expression | undefined;
19
+ plus?: typeof Expression | undefined;
20
+ colon?: typeof Expression | undefined;
21
+ dotcolon?: typeof Expression | undefined;
22
+ dcolon?: typeof Expression | undefined;
23
+ dcolondollar?: typeof Expression | undefined;
24
+ dcolonpercent?: typeof Expression | undefined;
25
+ dcolonqmark?: typeof Expression | undefined;
26
+ dqmark?: typeof Expression | undefined;
27
+ semicolon?: typeof Expression | undefined;
28
+ star?: typeof Expression | undefined;
29
+ backslash?: typeof Expression | undefined;
30
+ slash?: typeof Expression | undefined;
31
+ lt?: typeof Expression | undefined;
32
+ lte?: typeof Expression | undefined;
33
+ gt?: typeof Expression | undefined;
34
+ gte?: typeof Expression | undefined;
35
+ not?: typeof Expression | undefined;
36
+ eq?: typeof Expression | undefined;
37
+ neq?: typeof Expression | undefined;
38
+ nullsafeEq?: typeof Expression | undefined;
39
+ colonEq?: typeof Expression | undefined;
40
+ colonGt?: typeof Expression | undefined;
41
+ ncolonGt?: typeof Expression | undefined;
42
+ and?: typeof Expression | undefined;
43
+ or?: typeof Expression | undefined;
44
+ amp?: typeof Expression | undefined;
45
+ dpipe?: typeof Expression | undefined;
46
+ pipeGt?: typeof Expression | undefined;
47
+ pipe?: typeof Expression | undefined;
48
+ pipeSlash?: typeof Expression | undefined;
49
+ dpipeSlash?: typeof Expression | undefined;
50
+ caret?: typeof Expression | undefined;
51
+ caretAt?: typeof Expression | undefined;
52
+ tilde?: typeof Expression | undefined;
53
+ arrow?: typeof Expression | undefined;
54
+ darrow?: typeof Expression | undefined;
55
+ farrow?: typeof Expression | undefined;
56
+ hash?: typeof Expression | undefined;
57
+ hashArrow?: typeof Expression | undefined;
58
+ dhashArrow?: typeof Expression | undefined;
59
+ lrArrow?: typeof Expression | undefined;
60
+ dat?: typeof Expression | undefined;
61
+ ltAt?: typeof Expression | undefined;
62
+ atGt?: typeof Expression | undefined;
63
+ dollar?: typeof Expression | undefined;
64
+ parameter?: typeof Expression | undefined;
65
+ session?: typeof Expression | undefined;
66
+ sessionParameter?: typeof Expression | undefined;
67
+ sessionUser?: typeof Expression | undefined;
68
+ damp?: typeof Expression | undefined;
69
+ ampLt?: typeof Expression | undefined;
70
+ ampGt?: typeof Expression | undefined;
71
+ adjacent?: typeof Expression | undefined;
72
+ xor?: typeof Expression | undefined;
73
+ dstar?: typeof Expression | undefined;
74
+ qmarkAmp?: typeof Expression | undefined;
75
+ qmarkPipe?: typeof Expression | undefined;
76
+ hashDash?: typeof Expression | undefined;
77
+ exclamation?: typeof Expression | undefined;
78
+ uriStart?: typeof Expression | undefined;
79
+ blockStart?: typeof Expression | undefined;
80
+ blockEnd?: typeof Expression | undefined;
81
+ space?: typeof Expression | undefined;
82
+ break?: typeof Expression | undefined;
83
+ string?: typeof Expression | undefined;
84
+ number?: typeof Expression | undefined;
85
+ identifier?: typeof Expression | undefined;
86
+ database?: typeof Expression | undefined;
87
+ column?: typeof Expression | undefined;
88
+ columnDef?: typeof Expression | undefined;
89
+ schema?: typeof Expression | undefined;
90
+ table?: typeof Expression | undefined;
91
+ warehouse?: typeof Expression | undefined;
92
+ stage?: typeof Expression | undefined;
93
+ streamlit?: typeof Expression | undefined;
94
+ var?: typeof Expression | undefined;
95
+ bitString?: typeof Expression | undefined;
96
+ hexString?: typeof Expression | undefined;
97
+ byteString?: typeof Expression | undefined;
98
+ nationalString?: typeof Expression | undefined;
99
+ rawString?: typeof Expression | undefined;
100
+ heredocString?: typeof Expression | undefined;
101
+ unicodeString?: typeof Expression | undefined;
102
+ bit?: typeof Expression | undefined;
103
+ boolean?: typeof Expression | undefined;
104
+ tinyint?: typeof Expression | undefined;
105
+ utinyint?: typeof Expression | undefined;
106
+ smallint?: typeof Expression | undefined;
107
+ usmallint?: typeof Expression | undefined;
108
+ mediumint?: typeof Expression | undefined;
109
+ umediumint?: typeof Expression | undefined;
110
+ int?: typeof Expression | undefined;
111
+ uint?: typeof Expression | undefined;
112
+ bigint?: typeof Expression | undefined;
113
+ ubigint?: typeof Expression | undefined;
114
+ bignum?: typeof Expression | undefined;
115
+ int128?: typeof Expression | undefined;
116
+ uint128?: typeof Expression | undefined;
117
+ int256?: typeof Expression | undefined;
118
+ uint256?: typeof Expression | undefined;
119
+ float?: typeof Expression | undefined;
120
+ double?: typeof Expression | undefined;
121
+ udouble?: typeof Expression | undefined;
122
+ decimal?: typeof Expression | undefined;
123
+ decimal32?: typeof Expression | undefined;
124
+ decimal64?: typeof Expression | undefined;
125
+ decimal128?: typeof Expression | undefined;
126
+ decimal256?: typeof Expression | undefined;
127
+ decfloat?: typeof Expression | undefined;
128
+ udecimal?: typeof Expression | undefined;
129
+ bigdecimal?: typeof Expression | undefined;
130
+ char?: typeof Expression | undefined;
131
+ nchar?: typeof Expression | undefined;
132
+ varchar?: typeof Expression | undefined;
133
+ nvarchar?: typeof Expression | undefined;
134
+ bpchar?: typeof Expression | undefined;
135
+ text?: typeof Expression | undefined;
136
+ mediumtext?: typeof Expression | undefined;
137
+ longtext?: typeof Expression | undefined;
138
+ blob?: typeof Expression | undefined;
139
+ mediumblob?: typeof Expression | undefined;
140
+ longblob?: typeof Expression | undefined;
141
+ tinyblob?: typeof Expression | undefined;
142
+ tinytext?: typeof Expression | undefined;
143
+ name?: typeof Expression | undefined;
144
+ binary?: typeof Expression | undefined;
145
+ varbinary?: typeof Expression | undefined;
146
+ json?: typeof Expression | undefined;
147
+ jsonb?: typeof Expression | undefined;
148
+ time?: typeof Expression | undefined;
149
+ timetz?: typeof Expression | undefined;
150
+ timeNs?: typeof Expression | undefined;
151
+ timestamp?: typeof Expression | undefined;
152
+ timestamptz?: typeof Expression | undefined;
153
+ timestampltz?: typeof Expression | undefined;
154
+ timestampntz?: typeof Expression | undefined;
155
+ timestampS?: typeof Expression | undefined;
156
+ timestampMs?: typeof Expression | undefined;
157
+ timestampNs?: typeof Expression | undefined;
158
+ datetime?: typeof Expression | undefined;
159
+ datetime2?: typeof Expression | undefined;
160
+ datetime64?: typeof Expression | undefined;
161
+ smalldatetime?: typeof Expression | undefined;
162
+ date?: typeof Expression | undefined;
163
+ date32?: typeof Expression | undefined;
164
+ int4range?: typeof Expression | undefined;
165
+ int4multirange?: typeof Expression | undefined;
166
+ int8range?: typeof Expression | undefined;
167
+ int8multirange?: typeof Expression | undefined;
168
+ numrange?: typeof Expression | undefined;
169
+ nummultirange?: typeof Expression | undefined;
170
+ tsrange?: typeof Expression | undefined;
171
+ tsmultirange?: typeof Expression | undefined;
172
+ tstzrange?: typeof Expression | undefined;
173
+ tstzmultirange?: typeof Expression | undefined;
174
+ daterange?: typeof Expression | undefined;
175
+ datemultirange?: typeof Expression | undefined;
176
+ uuid?: typeof Expression | undefined;
177
+ geography?: typeof Expression | undefined;
178
+ geographypoint?: typeof Expression | undefined;
179
+ nullable?: typeof Expression | undefined;
180
+ geometry?: typeof Expression | undefined;
181
+ point?: typeof Expression | undefined;
182
+ ring?: typeof Expression | undefined;
183
+ linestring?: typeof Expression | undefined;
184
+ localtime?: typeof Expression | undefined;
185
+ localtimestamp?: typeof Expression | undefined;
186
+ systimestamp: typeof Expression;
187
+ multilinestring?: typeof Expression | undefined;
188
+ polygon?: typeof Expression | undefined;
189
+ multipolygon?: typeof Expression | undefined;
190
+ hllsketch?: typeof Expression | undefined;
191
+ hstore?: typeof Expression | undefined;
192
+ super?: typeof Expression | undefined;
193
+ serial?: typeof Expression | undefined;
194
+ smallserial?: typeof Expression | undefined;
195
+ bigserial?: typeof Expression | undefined;
196
+ xml?: typeof Expression | undefined;
197
+ year?: typeof Expression | undefined;
198
+ userdefined?: typeof Expression | undefined;
199
+ money?: typeof Expression | undefined;
200
+ smallmoney?: typeof Expression | undefined;
201
+ rowversion?: typeof Expression | undefined;
202
+ image?: typeof Expression | undefined;
203
+ variant?: typeof Expression | undefined;
204
+ object?: typeof Expression | undefined;
205
+ inet?: typeof Expression | undefined;
206
+ ipaddress?: typeof Expression | undefined;
207
+ ipprefix?: typeof Expression | undefined;
208
+ ipv4?: typeof Expression | undefined;
209
+ ipv6?: typeof Expression | undefined;
210
+ enum?: typeof Expression | undefined;
211
+ enum8?: typeof Expression | undefined;
212
+ enum16?: typeof Expression | undefined;
213
+ fixedstring?: typeof Expression | undefined;
214
+ lowcardinality?: typeof Expression | undefined;
215
+ nested?: typeof Expression | undefined;
216
+ aggregatefunction?: typeof Expression | undefined;
217
+ simpleaggregatefunction?: typeof Expression | undefined;
218
+ tdigest?: typeof Expression | undefined;
219
+ unknown?: typeof Expression | undefined;
220
+ vector?: typeof Expression | undefined;
221
+ dynamic?: typeof Expression | undefined;
222
+ void?: typeof Expression | undefined;
223
+ alias?: typeof Expression | undefined;
224
+ alter?: typeof Expression | undefined;
225
+ all?: typeof Expression | undefined;
226
+ anti?: typeof Expression | undefined;
227
+ any?: typeof Expression | undefined;
228
+ apply?: typeof Expression | undefined;
229
+ array?: typeof Expression | undefined;
230
+ asc?: typeof Expression | undefined;
231
+ asof?: typeof Expression | undefined;
232
+ attach?: typeof Expression | undefined;
233
+ autoIncrement?: typeof Expression | undefined;
234
+ begin?: typeof Expression | undefined;
235
+ between?: typeof Expression | undefined;
236
+ bulkCollectInto?: typeof Expression | undefined;
237
+ cache?: typeof Expression | undefined;
238
+ case?: typeof Expression | undefined;
239
+ characterSet?: typeof Expression | undefined;
240
+ clusterBy?: typeof Expression | undefined;
241
+ collate?: typeof Expression | undefined;
242
+ command?: typeof Expression | undefined;
243
+ comment?: typeof Expression | undefined;
244
+ commit?: typeof Expression | undefined;
245
+ connectBy?: typeof Expression | undefined;
246
+ constraint?: typeof Expression | undefined;
247
+ copy?: typeof Expression | undefined;
248
+ create?: typeof Expression | undefined;
249
+ cross?: typeof Expression | undefined;
250
+ cube?: typeof Expression | undefined;
251
+ currentDate?: typeof Expression | undefined;
252
+ currentDatetime?: typeof Expression | undefined;
253
+ currentSchema?: typeof Expression | undefined;
254
+ currentTime?: typeof Expression | undefined;
255
+ currentTimestamp?: typeof Expression | undefined;
256
+ currentUser?: typeof Expression | undefined;
257
+ currentRole?: typeof Expression | undefined;
258
+ currentCatalog?: typeof Expression | undefined;
259
+ declare?: typeof Expression | undefined;
260
+ default?: typeof Expression | undefined;
261
+ delete?: typeof Expression | undefined;
262
+ desc?: typeof Expression | undefined;
263
+ describe?: typeof Expression | undefined;
264
+ detach?: typeof Expression | undefined;
265
+ dictionary?: typeof Expression | undefined;
266
+ distinct?: typeof Expression | undefined;
267
+ distributeBy?: typeof Expression | undefined;
268
+ div?: typeof Expression | undefined;
269
+ drop?: typeof Expression | undefined;
270
+ else?: typeof Expression | undefined;
271
+ end?: typeof Expression | undefined;
272
+ escape?: typeof Expression | undefined;
273
+ except?: typeof Expression | undefined;
274
+ execute?: typeof Expression | undefined;
275
+ exists?: typeof Expression | undefined;
276
+ false?: typeof Expression | undefined;
277
+ fetch?: typeof Expression | undefined;
278
+ file?: typeof Expression | undefined;
279
+ fileFormat?: typeof Expression | undefined;
280
+ filter?: typeof Expression | undefined;
281
+ final?: typeof Expression | undefined;
282
+ first?: typeof Expression | undefined;
283
+ for?: typeof Expression | undefined;
284
+ force?: typeof Expression | undefined;
285
+ foreignKey?: typeof Expression | undefined;
286
+ format?: typeof Expression | undefined;
287
+ from?: typeof Expression | undefined;
288
+ full?: typeof Expression | undefined;
289
+ function?: typeof Expression | undefined;
290
+ get?: typeof Expression | undefined;
291
+ glob?: typeof Expression | undefined;
292
+ global?: typeof Expression | undefined;
293
+ grant?: typeof Expression | undefined;
294
+ groupBy?: typeof Expression | undefined;
295
+ groupingSets?: typeof Expression | undefined;
296
+ having?: typeof Expression | undefined;
297
+ hint?: typeof Expression | undefined;
298
+ ignore?: typeof Expression | undefined;
299
+ ilike?: typeof Expression | undefined;
300
+ in?: typeof Expression | undefined;
301
+ index?: typeof Expression | undefined;
302
+ indexedBy?: typeof Expression | undefined;
303
+ inner?: typeof Expression | undefined;
304
+ insert?: typeof Expression | undefined;
305
+ install?: typeof Expression | undefined;
306
+ intersect?: typeof Expression | undefined;
307
+ interval?: typeof Expression | undefined;
308
+ into?: typeof Expression | undefined;
309
+ introducer?: typeof Expression | undefined;
310
+ irlike?: typeof Expression | undefined;
311
+ is?: typeof Expression | undefined;
312
+ isnull?: typeof Expression | undefined;
313
+ join?: typeof Expression | undefined;
314
+ joinMarker?: typeof Expression | undefined;
315
+ keep?: typeof Expression | undefined;
316
+ key?: typeof Expression | undefined;
317
+ kill?: typeof Expression | undefined;
318
+ language?: typeof Expression | undefined;
319
+ lateral?: typeof Expression | undefined;
320
+ left?: typeof Expression | undefined;
321
+ like?: typeof Expression | undefined;
322
+ limit?: typeof Expression | undefined;
323
+ list?: typeof Expression | undefined;
324
+ load?: typeof Expression | undefined;
325
+ lock?: typeof Expression | undefined;
326
+ map?: typeof Expression | undefined;
327
+ match?: typeof Expression | undefined;
328
+ matchCondition?: typeof Expression | undefined;
329
+ matchRecognize?: typeof Expression | undefined;
330
+ memberOf?: typeof Expression | undefined;
331
+ merge?: typeof Expression | undefined;
332
+ mod?: typeof Expression | undefined;
333
+ model?: typeof Expression | undefined;
334
+ natural?: typeof Expression | undefined;
335
+ next?: typeof Expression | undefined;
336
+ nothing?: typeof Expression | undefined;
337
+ notnull?: typeof Expression | undefined;
338
+ null?: typeof Expression | undefined;
339
+ objectIdentifier?: typeof Expression | undefined;
340
+ offset?: typeof Expression | undefined;
341
+ on?: typeof Expression | undefined;
342
+ only?: typeof Expression | undefined;
343
+ operator?: typeof Expression | undefined;
344
+ orderBy?: typeof Expression | undefined;
345
+ orderSiblingsBy?: typeof Expression | undefined;
346
+ ordered?: typeof Expression | undefined;
347
+ ordinality?: typeof Expression | undefined;
348
+ out?: typeof Expression | undefined;
349
+ inout?: typeof Expression | undefined;
350
+ outer?: typeof Expression | undefined;
351
+ over?: typeof Expression | undefined;
352
+ overlaps?: typeof Expression | undefined;
353
+ overwrite?: typeof Expression | undefined;
354
+ partition?: typeof Expression | undefined;
355
+ partitionBy?: typeof Expression | undefined;
356
+ percent?: typeof Expression | undefined;
357
+ pivot?: typeof Expression | undefined;
358
+ placeholder?: typeof Expression | undefined;
359
+ positional?: typeof Expression | undefined;
360
+ pragma?: typeof Expression | undefined;
361
+ prewhere?: typeof Expression | undefined;
362
+ primaryKey?: typeof Expression | undefined;
363
+ procedure?: typeof Expression | undefined;
364
+ properties?: typeof Expression | undefined;
365
+ pseudoType?: typeof Expression | undefined;
366
+ put?: typeof Expression | undefined;
367
+ qualify?: typeof Expression | undefined;
368
+ quote?: typeof Expression | undefined;
369
+ qdcolon?: typeof Expression | undefined;
370
+ range?: typeof Expression | undefined;
371
+ recursive?: typeof Expression | undefined;
372
+ refresh?: typeof Expression | undefined;
373
+ rename?: typeof Expression | undefined;
374
+ replace?: typeof Expression | undefined;
375
+ returning?: typeof Expression | undefined;
376
+ revoke?: typeof Expression | undefined;
377
+ references?: typeof Expression | undefined;
378
+ right?: typeof Expression | undefined;
379
+ rlike?: typeof Expression | undefined;
380
+ rollback?: typeof Expression | undefined;
381
+ rollup?: typeof Expression | undefined;
382
+ row?: typeof Expression | undefined;
383
+ rows?: typeof Expression | undefined;
384
+ select?: typeof Expression | undefined;
385
+ semi?: typeof Expression | undefined;
386
+ separator?: typeof Expression | undefined;
387
+ sequence?: typeof Expression | undefined;
388
+ serdeProperties?: typeof Expression | undefined;
389
+ set?: typeof Expression | undefined;
390
+ settings?: typeof Expression | undefined;
391
+ show?: typeof Expression | undefined;
392
+ similarTo?: typeof Expression | undefined;
393
+ some?: typeof Expression | undefined;
394
+ sortBy?: typeof Expression | undefined;
395
+ soundsLike?: typeof Expression | undefined;
396
+ startWith?: typeof Expression | undefined;
397
+ storageIntegration?: typeof Expression | undefined;
398
+ straightJoin?: typeof Expression | undefined;
399
+ struct?: typeof Expression | undefined;
400
+ summarize?: typeof Expression | undefined;
401
+ tableSample?: typeof Expression | undefined;
402
+ tag?: typeof Expression | undefined;
403
+ temporary?: typeof Expression | undefined;
404
+ top?: typeof Expression | undefined;
405
+ then?: typeof Expression | undefined;
406
+ true?: typeof Expression | undefined;
407
+ truncate?: typeof Expression | undefined;
408
+ uncache?: typeof Expression | undefined;
409
+ union?: typeof Expression | undefined;
410
+ unnest?: typeof Expression | undefined;
411
+ unpivot?: typeof Expression | undefined;
412
+ update?: typeof Expression | undefined;
413
+ use?: typeof Expression | undefined;
414
+ using?: typeof Expression | undefined;
415
+ values?: typeof Expression | undefined;
416
+ variadic?: typeof Expression | undefined;
417
+ view?: typeof Expression | undefined;
418
+ semanticView?: typeof Expression | undefined;
419
+ volatile?: typeof Expression | undefined;
420
+ when?: typeof Expression | undefined;
421
+ where?: typeof Expression | undefined;
422
+ window?: typeof Expression | undefined;
423
+ with?: typeof Expression | undefined;
424
+ unique?: typeof Expression | undefined;
425
+ utcDate?: typeof Expression | undefined;
426
+ utcTime?: typeof Expression | undefined;
427
+ utcTimestamp?: typeof Expression | undefined;
428
+ versionSnapshot?: typeof Expression | undefined;
429
+ timestampSnapshot?: typeof Expression | undefined;
430
+ option?: typeof Expression | undefined;
431
+ sink?: typeof Expression | undefined;
432
+ source?: typeof Expression | undefined;
433
+ analyze?: typeof Expression | undefined;
434
+ namespace?: typeof Expression | undefined;
435
+ export?: typeof Expression | undefined;
436
+ hiveTokenStream?: typeof Expression | undefined;
437
+ };
438
+ static get FUNCTIONS(): Record<string, (args: Expression[], options: {
439
+ dialect: Dialect;
440
+ }) => Expression>;
441
+ static get CONSTRAINT_PARSERS(): Partial<Record<string, (this: Parser, ...args: unknown[]) => Expression | Expression[] | undefined>>;
442
+ static get FUNC_TOKENS(): Set<TokenType>;
443
+ static get FUNCTION_PARSERS(): Partial<Record<string, (this: Parser) => Expression | undefined>>;
444
+ static get ODBC_DATETIME_LITERALS(): {
445
+ d: typeof DateExpr;
446
+ ts: typeof TimestampExpr;
447
+ };
448
+ parseColumn(): Expression | undefined;
449
+ static get TABLE_ALIAS_TOKENS(): Set<TokenType>;
450
+ }
451
+ declare class ExasolGenerator extends Generator {
452
+ static get AFTER_HAVING_MODIFIER_TRANSFORMS(): Map<string, (this: Generator, e: Expression) => string>;
453
+ static SUPPORTS_DECODE_CASE: boolean;
454
+ static readonly SELECT_KINDS: string[];
455
+ static TRY_SUPPORTED: boolean;
456
+ static SUPPORTS_UESCAPE: boolean;
457
+ static SUPPORTS_CONVERT_TIMEZONE: boolean;
458
+ static get STRING_TYPE_MAPPING(): Map<DataTypeExprKind, string>;
459
+ static get TYPE_MAPPING(): Map<string, string>;
460
+ dataTypeSql(expression: DataTypeExpr): string;
461
+ static get ORIGINAL_TRANSFORMS(): Map<typeof Expression, (this: Generator, e: any) => string>;
462
+ ifSql(expression: IfExpr): string;
463
+ collateSql(expression: CollateExpr): string;
464
+ rankSql(expression: RankExpr): string;
465
+ convertTimezoneSql(expression: ConvertTimezoneExpr): string;
466
+ }
467
+ declare class Exasol extends Dialect {
468
+ static DIALECT_NAME: Dialects;
469
+ static get NORMALIZATION_STRATEGY(): NormalizationStrategy;
470
+ static get SUPPORTS_USER_DEFINED_TYPES(): boolean;
471
+ static get SUPPORTS_SEMI_ANTI_JOIN(): boolean;
472
+ static get SUPPORTS_COLUMN_JOIN_MARKS(): boolean;
473
+ static get NULL_ORDERING(): NullOrdering;
474
+ static get CONCAT_COALESCE(): boolean;
475
+ static get TIME_MAPPING(): {
476
+ yyyy: string;
477
+ YYYY: string;
478
+ yy: string;
479
+ YY: string;
480
+ mm: string;
481
+ MM: string;
482
+ MONTH: string;
483
+ MON: string;
484
+ dd: string;
485
+ DD: string;
486
+ DAY: string;
487
+ DY: string;
488
+ H12: string;
489
+ H24: string;
490
+ HH: string;
491
+ ID: string;
492
+ vW: string;
493
+ IW: string;
494
+ vYYY: string;
495
+ IYYY: string;
496
+ MI: string;
497
+ SS: string;
498
+ uW: string;
499
+ UW: string;
500
+ Z: string;
501
+ };
502
+ static Tokenizer: typeof ExasolTokenizer;
503
+ static Parser: typeof ExasolParser;
504
+ static Generator: typeof ExasolGenerator;
505
+ }
506
+
507
+ export { Exasol };
@@ -0,0 +1,2 @@
1
+ import{$c as x,$f as J,Bk as Bt,Bo as lt,Ca as b,Ce as Ct,Cg as Gt,Dh as qt,Ep as zt,Fh as Yt,Gg as Ht,Hl as Kt,Ic as P,Ik as ct,Je as v,Ke as _t,Kk as ut,Kl as Xt,Kp as Jt,Lh as rt,Lm as St,Mp as ht,Nc as k,Nl as $t,Ol as Wt,Pe as Mt,Pl as Tt,Po as vt,Qf as Pt,Qh as wt,Qq as tr,Rj as at,Rq as rr,Sn as ft,Tb as F,Te as z,U as mt,Wd as y,We as Lt,Wp as jt,Xq as Rt,Zh as et,_b as Ot,_i as it,a as _,b as M,bi as nt,c as L,ca as u,d as i,eh as Ut,eo as G,fe as dt,fl as q,gk as ot,gl as Y,hc as V,hk as Et,in as Zt,iq as m,kc as Dt,kh as bt,kp as H,kq as It,li as st,lp as w,mm as pt,op as At,pp as o,ql as Ft,r as a,rb as D,tl as Vt,ue as K,uh as j,ve as X,we as $,wh as Q,xe as W,xh as tt,xl as kt,xq as Qt,ye as Z,yh as yt,za as R}from"../chunk-KCNOE4DZ.js";var xt=new Set(["DAY","WEEK","MONTH","YEAR","HOUR","MINUTE","SECOND"]);function Hr(r){let e=r.text("length")==="256"?"HASH_SHA256":"HASH_SHA512";return this.func(e,[r.args.this])}function er(r){let n=r.text("unit").toUpperCase()||"DAY";return xt.has(n)?this.func(`${n}S_BETWEEN`,[r.args.this,r.args.expression]):(this.unsupported(`'${n}' is not supported in Exasol.`),this.functionFallbackSql(r))}function Ur(r){let n=new _t({this:u(r,0),expression:lt()});return new it({this:n,true:x.number(0),false:u(r,0)})}function br(r){let n=new Ct({this:u(r,0),expression:x.number(0)});return new it({this:n,true:lt(),false:u(r,0)})}function yr(r){if(r instanceof y){let n={};r.args.expressions?.forEach(s=>{if(s instanceof V){let c=s.args.alias;c instanceof D&&(n[c.name]=c.args.quoted||!1)}});let t=r.find(F)?.args.this;t instanceof D&&t.name.toUpperCase()==="LOCAL"&&!t.args.quoted&&t.replace(G(t.name.toUpperCase(),{quoted:!0}));let E=(s,c)=>{if(s instanceof P&&!s.args.table){let T=s.args.this.name;if(T in c)return new P({this:G(T,{quoted:c[T]}),table:G("LOCAL",{quoted:!1})})}return s};["where","group","having"].forEach(s=>{let c=r.args[s];c instanceof b&&r.setArgKey(s,c.transform(T=>E(T,n)))});let f={},h=[];r.args.expressions?.forEach(s=>{if(s instanceof V){let c=s.args.this?.transform(p=>E(p,f));s.setArgKey("this",c);let T=s.args.alias;T instanceof D&&(f[T.name]=T.args.quoted||!1),h.push(s)}else h.push(s.transform(c=>E(c,f)))}),r.setArgKey("expressions",h)}return r}function Lr(r,n){let e=n.text("unit"),t=n.args.this instanceof Gt?n.args.this.args.this:n.args.this,E=this.sql(t);return t instanceof x&&t.isString&&(E=r==="TIMESTAMP"?`${r} '${(t.args.this??"").replace("T"," ")}'`:`DATE '${t.args.this??""}'`),`DATE_TRUNC('${e}', ${E})`}function qr(r){return Lr.call(this,"DATE",r)}function nr(r){return Lr.call(this,"TIMESTAMP",r)}function sr(r){return r instanceof Ht&&r.text("expression").toUpperCase()==="UTF8_LCASE"}function Yr(r){let n=r.args.this,e=r.args.delimiter,t=e instanceof b?e:x.number(e??0),E=r.args.count,f=this.sql(r,"count"),h=E instanceof x&&E.isNumber?parseFloat(E.args.this??"0"):0,s=this.sql(n);if(h===0)return this.func("SUBSTR",[s,"1","0"]);let c=h<0,T=c?"-1":"1",p=c?this.func("ABS",[f]):f,N=this.sql(t),C=this.func("INSTR",[n instanceof b&&sr(n)?this.func("LOWER",[s]):s,sr(t)?this.func("LOWER",[N]):N,T,p]),U=this.func("NULLIF",[C,"0"]);if(c){let Gr=this.func("NVL",[`${U} + ${this.func("LENGTH",[N])}`,T]);return this.func("SUBSTR",[s,Gr])}let Pr=this.func("NVL",[`${U} - 1`,this.func("LENGTH",[s])]);return this.func("SUBSTR",[s,T,Pr])}function wr(r){if(!(r instanceof y))return r;let n=r.args.expressions||[],e=p=>p instanceof Ot&&!p.args.this,t=!1,E=null;for(let p of n){let N=e(p);if(N&&E===null?E=p:N||(t=!0),E&&t)break}if(!(E&&t))return r;let f=mt(r);if(!f||!f.selectedSources||Object.keys(f.selectedSources).length===0)return r;let h=[];for(let[p,N]of Object.entries(f.selectedSources)){let[C]=N,U=C instanceof F&&C.args.this instanceof D?C.args.this.copy():G(p);h.push(U)}let s=E,c=h.map(p=>new P({this:s.copy(),table:p})),T=[];for(let p of n)e(p)?T.push(...c):T.push(p);return r.setArgKey("expressions",T),r}function gt(r){let n=r.args.expression instanceof dt?r.args.expression:null,e=(n?n.text("unit")||"DAY":r.text("unit")||"DAY").toUpperCase();if(!xt.has(e))return this.unsupported(`'${e}' is not supported in Exasol.`),this.functionFallbackSql(r);if(!r.args.expression)return this.functionFallbackSql(r);let t=r.args.expression;if(n){if(!n.args.this)return this.functionFallbackSql(r);t=n.args.this}return r instanceof Q&&(t=new Lt({this:t})),this.func(`ADD_${e}S`,[r.args.this,t])}var ir,ar,or,B,O=class extends(or=Rt,ar=[a],ir=[a],or){static get IDENTIFIERS(){return['"',["[","]"]]}static get ORIGINAL_KEYWORDS(){let e={...Rt.KEYWORDS,USER:"currentUser",ENDIF:"end","LONG VARCHAR":"text",SEPARATOR:"separator",SYSTIMESTAMP:"systimestamp"};return delete e.DIV,e}};B=_(or),i(B,10,"IDENTIFIERS",ar,O),i(B,10,"ORIGINAL_KEYWORDS",ir,O),M(B,O),L(B,3,O);var Er,cr,ur,Tr,pr,Sr,fr,lr,Ar,I,A=class extends(Ar=R,lr=[a],fr=[a],Sr=[a],pr=[a],Tr=[a],ur=[a],cr=[a],Er=[a],Ar){static get ID_VAR_TOKENS(){return new Set([...R.ID_VAR_TOKENS,"sessionUser","currentCatalog","straightJoin"])}static get NO_PAREN_FUNCTIONS(){let e={systimestamp:Ut,...R.NO_PAREN_FUNCTIONS};return delete e.localtime,delete e.localtimestamp,e}static get FUNCTIONS(){return(()=>{let e={...R.FUNCTIONS,BIT_AND:m(K),BIT_OR:m($),BIT_XOR:m(Z),BIT_NOT:t=>new z({this:u(t,0)}),BIT_LSHIFT:m(X),BIT_RSHIFT:m(W),DATE_TRUNC:t=>new nt({this:u(t,1),unit:u(t,0)}),DIV:m(v),EVERY:t=>new pt({this:u(t,0)}),EDIT_DISTANCE:t=>at.fromArgList(t),HASH_SHA:t=>q.fromArgList(t),HASH_SHA1:t=>q.fromArgList(t),HASH_MD5:t=>ot.fromArgList(t),HASHTYPE_MD5:t=>Et.fromArgList(t),REGEXP_SUBSTR:t=>ct.fromArgList(t),REGEXP_REPLACE:t=>new ut({this:u(t,0),expression:u(t,1),replacement:u(t,2),position:u(t,3),occurrence:u(t,4)}),HASH_SHA256:t=>new Y({this:u(t,0),length:x.number(256)}),HASH_SHA512:t=>new Y({this:u(t,0),length:x.number(512)}),TRUNC:t=>It(t,{dialect:"exasol"}),TRUNCATE:t=>It(t,{dialect:"exasol"}),VAR_POP:t=>ft.fromArgList(t),APPROXIMATE_COUNT_DISTINCT:t=>St.fromArgList(t),TO_CHAR:t=>rr(t,{dialect:"exasol"}),TO_DATE:Jt(Tt,{dialect:"exasol"}),CONVERT_TZ:t=>new J({timestamp:t[0],sourceTz:u(t,1),targetTz:t[2],options:[u(t,3)]}),NULLIFZERO:br,ZEROIFNULL:Ur,WEEKOFYEAR:t=>rt.fromArgList(t)};return xt.forEach(t=>{e[`ADD_${t}S`]=ht(j,void 0,{defaultUnit:t}),e[`${t}S_BETWEEN`]=ht(tt,void 0,{defaultUnit:t})}),e})()}static get CONSTRAINT_PARSERS(){return{...R.CONSTRAINT_PARSERS,COMMENT:function(){return this.expression(k,{this:this.match("is")&&this.parseString()})}}}static get FUNC_TOKENS(){return new Set([...R.FUNC_TOKENS,"systimestamp"])}static get FUNCTION_PARSERS(){return{...R.FUNCTION_PARSERS,...Object.fromEntries(["GROUP_CONCAT","LISTAGG"].map(e=>[e,function(){return this.parseGroupConcat()}]))}}static get ODBC_DATETIME_LITERALS(){return{d:st,ts:et}}parseColumn(){let e=super.parseColumn();if(!(e instanceof P))return e;let t=e.args.table;return t instanceof D&&t.name.toUpperCase()==="LOCAL"&&!t.args.quoted&&e.setArgKey("table",void 0),e}static get TABLE_ALIAS_TOKENS(){return new Set([...R.TABLE_ALIAS_TOKENS,"straightJoin"])}};I=_(Ar),i(I,10,"ID_VAR_TOKENS",lr,A),i(I,10,"NO_PAREN_FUNCTIONS",fr,A),i(I,10,"FUNCTIONS",Sr,A),i(I,10,"CONSTRAINT_PARSERS",pr,A),i(I,10,"FUNC_TOKENS",Tr,A),i(I,10,"FUNCTION_PARSERS",ur,A),i(I,10,"ODBC_DATETIME_LITERALS",cr,A),i(I,10,"TABLE_ALIAS_TOKENS",Er,A),M(I,A),L(I,3,A);var hr,Ir,Rr,gr,Nr,d,l=class l extends(Nr=w,gr=[a],Rr=[a],Ir=[a],hr=[a],Nr){static get AFTER_HAVING_MODIFIER_TRANSFORMS(){let e=new Map(super.AFTER_HAVING_MODIFIER_TRANSFORMS);return["cluster","distribute","sort"].forEach(t=>e.delete(t)),e}static get STRING_TYPE_MAPPING(){return new Map([["blob","VARCHAR"],["longblob","VARCHAR"],["longtext","VARCHAR"],["mediumblob","VARCHAR"],["mediumtext","VARCHAR"],["tinyblob","VARCHAR"],["tinytext","VARCHAR"],["text","LONG VARCHAR"],["varbinary","VARCHAR"]])}static get TYPE_MAPPING(){return new Map([...w.TYPE_MAPPING,...l.STRING_TYPE_MAPPING,["tinyint","SMALLINT"],["mediumint","INT"],["decimal32","DECIMAL"],["decimal64","DECIMAL"],["decimal128","DECIMAL"],["decimal256","DECIMAL"],["datetime","TIMESTAMP"],["timestamptz","TIMESTAMP"],["timestampltz","TIMESTAMP"],["timestampntz","TIMESTAMP"]])}dataTypeSql(e){return e.isType(["timestampltz"])?"TIMESTAMP WITH LOCAL TIME ZONE":super.dataTypeSql(e)}static get ORIGINAL_TRANSFORMS(){return new Map([...w.TRANSFORMS,[pt,o("EVERY")],[K,o("BIT_AND")],[$,o("BIT_OR")],[z,o("BIT_NOT")],[X,o("BIT_LSHIFT")],[W,o("BIT_RSHIFT")],[Z,o("BIT_XOR")],[tt,function(t){return er.call(this,t)}],[j,function(t){return gt.call(this,t)}],[$t,function(t){return gt.call(this,t)}],[Q,function(t){return gt.call(this,t)}],[v,o("DIV")],[Wt,function(t){return er.call(this,t)}],[yt,function(t){return qr.call(this,t)}],[Yt,function(t){return`CAST(TO_CHAR(${this.sql(t,"this")}, 'D') AS INTEGER)`}],[qt,function(t){return nr.call(this,t)}],[Zt,function(t){return tr.call(this,t,{funcName:"LISTAGG",withinGroup:!0})}],[at,function(t){return H.call(this,t,"insCost","delCost","subCost","maxDist"),o("EDIT_DISTANCE").call(this,t)}],[Mt,o("MOD")],[J,function(t){return this.func("CONVERT_TZ",[t.args.timestamp,t.args.sourceTz,t.args.targetTz,...t.args.options??[]])}],[ct,function(t){return H.call(this,t,"parameters","group"),o("REGEXP_SUBSTR").call(this,t)}],[ut,function(t){return H.call(this,t,"modifiers"),o("REGEXP_REPLACE").call(this,t)}],[ft,o("VAR_POP")],[St,function(t){return H.call(this,t,"accuracy"),o("APPROXIMATE_COUNT_DISTINCT").call(this,t)}],[Pt,function(t){return this.func("TO_CHAR",[t.args.this,this.formatTime(t)])}],[Tt,function(t){return this.func("TO_DATE",[t.args.this,this.formatTime(t)])}],[Kt,function(t){return this.func("TO_CHAR",[t.args.this,this.formatTime(t)])}],[Xt,function(t){return jt.call(this,t)}],[nt,function(t){return nr.call(this,t)}],[kt,function(t){return this.func("TO_DATE",[t.args.this,this.formatTime(t)])}],[bt,()=>"CURRENT_USER"],[Dt,function(t){return this.func("CONVERT_TZ",[t.args.this,"'UTC'",t.args.zone])}],[Vt,function(t){return zt.call(this,t,{funcName:"INSTR",supportsPosition:!0,supportsOccurrence:!0})}],[q,o("HASH_SHA")],[Y,function(t){return Hr.call(this,t)}],[ot,o("HASH_MD5")],[Et,o("HASHTYPE_MD5")],[k,function(t){return`COMMENT IS ${this.sql(t,"this")}`}],[y,vt([wr,yr])],[Ft,function(t){return Yr.call(this,t)}],[rt,o("WEEK")],[st,o("TO_DATE")],[et,o("TO_TIMESTAMP")],[Bt,function(t){return`CEIL(MONTH(TO_DATE(${this.sql(t,"this")}))/3)`}],[wt,Qt]])}ifSql(e){let t=this.sql(e,"this"),E=this.sql(e,"true"),f=this.sql(e,"false");return`IF ${t} THEN ${E} ELSE ${f} ENDIF`}collateSql(e){return this.sql(e.args.this)}rankSql(e){return e.args.expressions&&0<e.args.expressions.length&&this.unsupported("Exasol does not support arguments in RANK"),this.func("RANK",[])}convertTimezoneSql(e){let t=e.args.timestamp,E=e.args.sourceTz,f=e.args.targetTz,h=e.args.options;return this.func("CONVERT_TZ",[t,E,f,...h??[]])}};d=_(Nr),i(d,10,"AFTER_HAVING_MODIFIER_TRANSFORMS",gr,l),i(d,10,"STRING_TYPE_MAPPING",Rr,l),i(d,10,"TYPE_MAPPING",Ir,l),i(d,10,"ORIGINAL_TRANSFORMS",hr,l),M(d,l),L(d,3,l),l.SUPPORTS_DECODE_CASE=!1,l.SELECT_KINDS=[],l.TRY_SUPPORTED=!1,l.SUPPORTS_UESCAPE=!1,l.SUPPORTS_CONVERT_TIMEZONE=!0;var Nt=l,xr,mr,Or,Dr,dr,Cr,_r,Mr,g,S=class extends(Mr=At,_r=[a],Cr=[a],dr=[a],Dr=[a],Or=[a],mr=[a],xr=[a],Mr){static get NORMALIZATION_STRATEGY(){return"uppercase"}static get SUPPORTS_USER_DEFINED_TYPES(){return!1}static get SUPPORTS_SEMI_ANTI_JOIN(){return!1}static get SUPPORTS_COLUMN_JOIN_MARKS(){return!0}static get NULL_ORDERING(){return"nulls_are_last"}static get CONCAT_COALESCE(){return!0}static get TIME_MAPPING(){return{yyyy:"%Y",YYYY:"%Y",yy:"%y",YY:"%y",mm:"%m",MM:"%m",MONTH:"%B",MON:"%b",dd:"%d",DD:"%d",DAY:"%A",DY:"%a",H12:"%I",H24:"%H",HH:"%H",ID:"%u",vW:"%V",IW:"%V",vYYY:"%G",IYYY:"%G",MI:"%M",SS:"%S",uW:"%W",UW:"%U",Z:"%z"}}};g=_(Mr),i(g,10,"NORMALIZATION_STRATEGY",_r,S),i(g,10,"SUPPORTS_USER_DEFINED_TYPES",Cr,S),i(g,10,"SUPPORTS_SEMI_ANTI_JOIN",dr,S),i(g,10,"SUPPORTS_COLUMN_JOIN_MARKS",Dr,S),i(g,10,"NULL_ORDERING",Or,S),i(g,10,"CONCAT_COALESCE",mr,S),i(g,10,"TIME_MAPPING",xr,S),M(g,S),L(g,3,S),S.DIALECT_NAME="exasol",S.Tokenizer=O,S.Parser=A,S.Generator=Nt;At.register("exasol",S);export{S as Exasol};
2
+ //# sourceMappingURL=exasol.js.map