sqlingo 0.8.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 (283) hide show
  1. package/CHANGELOG.md +242 -0
  2. package/COPYRIGHT_NOTICE +31 -0
  3. package/LICENSE +21 -0
  4. package/README.md +189 -0
  5. package/README.npm.md +189 -0
  6. package/README.repo.md +132 -0
  7. package/dist/chunk-3OVM5ZRR.js +2 -0
  8. package/dist/chunk-3OVM5ZRR.js.map +1 -0
  9. package/dist/chunk-457OPBHX.js +2 -0
  10. package/dist/chunk-457OPBHX.js.map +1 -0
  11. package/dist/chunk-47UFIVIO.cjs +2 -0
  12. package/dist/chunk-47UFIVIO.cjs.map +1 -0
  13. package/dist/chunk-5E2DDDMJ.cjs +2 -0
  14. package/dist/chunk-5E2DDDMJ.cjs.map +1 -0
  15. package/dist/chunk-5JXGMU6K.js +2 -0
  16. package/dist/chunk-5JXGMU6K.js.map +1 -0
  17. package/dist/chunk-6EWE2PXX.cjs +2 -0
  18. package/dist/chunk-6EWE2PXX.cjs.map +1 -0
  19. package/dist/chunk-AKDNSOG6.js +2 -0
  20. package/dist/chunk-AKDNSOG6.js.map +1 -0
  21. package/dist/chunk-AYV6C6YU.cjs +19 -0
  22. package/dist/chunk-AYV6C6YU.cjs.map +1 -0
  23. package/dist/chunk-C4ZR72YB.cjs +3 -0
  24. package/dist/chunk-C4ZR72YB.cjs.map +1 -0
  25. package/dist/chunk-DGV6NM76.js +2 -0
  26. package/dist/chunk-DGV6NM76.js.map +1 -0
  27. package/dist/chunk-DW3ISHFW.js +3 -0
  28. package/dist/chunk-DW3ISHFW.js.map +1 -0
  29. package/dist/chunk-FCFBBB5S.cjs +2 -0
  30. package/dist/chunk-FCFBBB5S.cjs.map +1 -0
  31. package/dist/chunk-FYYDDWAY.cjs +2 -0
  32. package/dist/chunk-FYYDDWAY.cjs.map +1 -0
  33. package/dist/chunk-GFWBSTYA.js +2 -0
  34. package/dist/chunk-GFWBSTYA.js.map +1 -0
  35. package/dist/chunk-HQEUEZZE.cjs +2 -0
  36. package/dist/chunk-HQEUEZZE.cjs.map +1 -0
  37. package/dist/chunk-I36ZOBUW.cjs +2 -0
  38. package/dist/chunk-I36ZOBUW.cjs.map +1 -0
  39. package/dist/chunk-KNRQDMQ7.js +4 -0
  40. package/dist/chunk-KNRQDMQ7.js.map +1 -0
  41. package/dist/chunk-KYKSQHLH.cjs +2 -0
  42. package/dist/chunk-KYKSQHLH.cjs.map +1 -0
  43. package/dist/chunk-KZSNUA4U.js +2 -0
  44. package/dist/chunk-KZSNUA4U.js.map +1 -0
  45. package/dist/chunk-LDIWFKFA.cjs +2 -0
  46. package/dist/chunk-LDIWFKFA.cjs.map +1 -0
  47. package/dist/chunk-NBRX75ID.js +2 -0
  48. package/dist/chunk-NBRX75ID.js.map +1 -0
  49. package/dist/chunk-NKPY5IG3.js +2 -0
  50. package/dist/chunk-NKPY5IG3.js.map +1 -0
  51. package/dist/chunk-NMAMNFRD.js +2 -0
  52. package/dist/chunk-NMAMNFRD.js.map +1 -0
  53. package/dist/chunk-O4K6VGOH.cjs +2 -0
  54. package/dist/chunk-O4K6VGOH.cjs.map +1 -0
  55. package/dist/chunk-OGPS63WZ.cjs +2 -0
  56. package/dist/chunk-OGPS63WZ.cjs.map +1 -0
  57. package/dist/chunk-OOA5D6BW.cjs +2 -0
  58. package/dist/chunk-OOA5D6BW.cjs.map +1 -0
  59. package/dist/chunk-PC37XGLS.js +2 -0
  60. package/dist/chunk-PC37XGLS.js.map +1 -0
  61. package/dist/chunk-PGKNO72J.js +2 -0
  62. package/dist/chunk-PGKNO72J.js.map +1 -0
  63. package/dist/chunk-PVJGPE3V.cjs +2 -0
  64. package/dist/chunk-PVJGPE3V.cjs.map +1 -0
  65. package/dist/chunk-QEXGYHWM.cjs +2 -0
  66. package/dist/chunk-QEXGYHWM.cjs.map +1 -0
  67. package/dist/chunk-QWCG55SR.js +2 -0
  68. package/dist/chunk-QWCG55SR.js.map +1 -0
  69. package/dist/chunk-R2XOYY2B.js +2 -0
  70. package/dist/chunk-R2XOYY2B.js.map +1 -0
  71. package/dist/chunk-RGKTYIN3.js +19 -0
  72. package/dist/chunk-RGKTYIN3.js.map +1 -0
  73. package/dist/chunk-SPWMHIMC.js +2 -0
  74. package/dist/chunk-SPWMHIMC.js.map +1 -0
  75. package/dist/chunk-UMJ6E4XD.cjs +4 -0
  76. package/dist/chunk-UMJ6E4XD.cjs.map +1 -0
  77. package/dist/chunk-USYIWEPI.cjs +2 -0
  78. package/dist/chunk-USYIWEPI.cjs.map +1 -0
  79. package/dist/chunk-WRG5B5DZ.js +2 -0
  80. package/dist/chunk-WRG5B5DZ.js.map +1 -0
  81. package/dist/chunk-Y2ZD6UO6.cjs +2 -0
  82. package/dist/chunk-Y2ZD6UO6.cjs.map +1 -0
  83. package/dist/dialects/athena.cjs +2 -0
  84. package/dist/dialects/athena.cjs.map +1 -0
  85. package/dist/dialects/athena.d.cts +66 -0
  86. package/dist/dialects/athena.d.ts +66 -0
  87. package/dist/dialects/athena.js +2 -0
  88. package/dist/dialects/athena.js.map +1 -0
  89. package/dist/dialects/bigquery.cjs +3 -0
  90. package/dist/dialects/bigquery.cjs.map +1 -0
  91. package/dist/dialects/bigquery.d.cts +665 -0
  92. package/dist/dialects/bigquery.d.ts +665 -0
  93. package/dist/dialects/bigquery.js +3 -0
  94. package/dist/dialects/bigquery.js.map +1 -0
  95. package/dist/dialects/clickhouse.cjs +2 -0
  96. package/dist/dialects/clickhouse.cjs.map +1 -0
  97. package/dist/dialects/clickhouse.d.cts +660 -0
  98. package/dist/dialects/clickhouse.d.ts +660 -0
  99. package/dist/dialects/clickhouse.js +2 -0
  100. package/dist/dialects/clickhouse.js.map +1 -0
  101. package/dist/dialects/databricks.cjs +2 -0
  102. package/dist/dialects/databricks.cjs.map +1 -0
  103. package/dist/dialects/databricks.d.cts +495 -0
  104. package/dist/dialects/databricks.d.ts +495 -0
  105. package/dist/dialects/databricks.js +2 -0
  106. package/dist/dialects/databricks.js.map +1 -0
  107. package/dist/dialects/doris.cjs +2 -0
  108. package/dist/dialects/doris.cjs.map +1 -0
  109. package/dist/dialects/doris.d.cts +494 -0
  110. package/dist/dialects/doris.d.ts +494 -0
  111. package/dist/dialects/doris.js +2 -0
  112. package/dist/dialects/doris.js.map +1 -0
  113. package/dist/dialects/dremio.cjs +2 -0
  114. package/dist/dialects/dremio.cjs.map +1 -0
  115. package/dist/dialects/dremio.d.cts +532 -0
  116. package/dist/dialects/dremio.d.ts +532 -0
  117. package/dist/dialects/dremio.js +2 -0
  118. package/dist/dialects/dremio.js.map +1 -0
  119. package/dist/dialects/drill.cjs +2 -0
  120. package/dist/dialects/drill.cjs.map +1 -0
  121. package/dist/dialects/drill.d.cts +522 -0
  122. package/dist/dialects/drill.d.ts +522 -0
  123. package/dist/dialects/drill.js +2 -0
  124. package/dist/dialects/drill.js.map +1 -0
  125. package/dist/dialects/druid.cjs +2 -0
  126. package/dist/dialects/druid.cjs.map +1 -0
  127. package/dist/dialects/druid.d.cts +17 -0
  128. package/dist/dialects/druid.d.ts +17 -0
  129. package/dist/dialects/druid.js +2 -0
  130. package/dist/dialects/druid.js.map +1 -0
  131. package/dist/dialects/duckdb.cjs +101 -0
  132. package/dist/dialects/duckdb.cjs.map +1 -0
  133. package/dist/dialects/duckdb.d.cts +795 -0
  134. package/dist/dialects/duckdb.d.ts +795 -0
  135. package/dist/dialects/duckdb.js +101 -0
  136. package/dist/dialects/duckdb.js.map +1 -0
  137. package/dist/dialects/dune.cjs +2 -0
  138. package/dist/dialects/dune.cjs.map +1 -0
  139. package/dist/dialects/dune.d.cts +21 -0
  140. package/dist/dialects/dune.d.ts +21 -0
  141. package/dist/dialects/dune.js +2 -0
  142. package/dist/dialects/dune.js.map +1 -0
  143. package/dist/dialects/exasol.cjs +2 -0
  144. package/dist/dialects/exasol.cjs.map +1 -0
  145. package/dist/dialects/exasol.d.cts +524 -0
  146. package/dist/dialects/exasol.d.ts +524 -0
  147. package/dist/dialects/exasol.js +2 -0
  148. package/dist/dialects/exasol.js.map +1 -0
  149. package/dist/dialects/fabric.cjs +2 -0
  150. package/dist/dialects/fabric.cjs.map +1 -0
  151. package/dist/dialects/fabric.d.cts +473 -0
  152. package/dist/dialects/fabric.d.ts +473 -0
  153. package/dist/dialects/fabric.js +2 -0
  154. package/dist/dialects/fabric.js.map +1 -0
  155. package/dist/dialects/hive.cjs +2 -0
  156. package/dist/dialects/hive.cjs.map +1 -0
  157. package/dist/dialects/hive.d.cts +602 -0
  158. package/dist/dialects/hive.d.ts +602 -0
  159. package/dist/dialects/hive.js +2 -0
  160. package/dist/dialects/hive.js.map +1 -0
  161. package/dist/dialects/materialize.cjs +2 -0
  162. package/dist/dialects/materialize.cjs.map +1 -0
  163. package/dist/dialects/materialize.d.cts +910 -0
  164. package/dist/dialects/materialize.d.ts +910 -0
  165. package/dist/dialects/materialize.js +2 -0
  166. package/dist/dialects/materialize.js.map +1 -0
  167. package/dist/dialects/mysql.cjs +2 -0
  168. package/dist/dialects/mysql.cjs.map +1 -0
  169. package/dist/dialects/mysql.d.cts +294 -0
  170. package/dist/dialects/mysql.d.ts +294 -0
  171. package/dist/dialects/mysql.js +2 -0
  172. package/dist/dialects/mysql.js.map +1 -0
  173. package/dist/dialects/oracle.cjs +2 -0
  174. package/dist/dialects/oracle.cjs.map +1 -0
  175. package/dist/dialects/oracle.d.cts +550 -0
  176. package/dist/dialects/oracle.d.ts +550 -0
  177. package/dist/dialects/oracle.js +2 -0
  178. package/dist/dialects/oracle.js.map +1 -0
  179. package/dist/dialects/postgres.cjs +2 -0
  180. package/dist/dialects/postgres.cjs.map +1 -0
  181. package/dist/dialects/postgres.d.cts +598 -0
  182. package/dist/dialects/postgres.d.ts +598 -0
  183. package/dist/dialects/postgres.js +2 -0
  184. package/dist/dialects/postgres.js.map +1 -0
  185. package/dist/dialects/presto.cjs +2 -0
  186. package/dist/dialects/presto.cjs.map +1 -0
  187. package/dist/dialects/presto.d.cts +176 -0
  188. package/dist/dialects/presto.d.ts +176 -0
  189. package/dist/dialects/presto.js +2 -0
  190. package/dist/dialects/presto.js.map +1 -0
  191. package/dist/dialects/prql.cjs +2 -0
  192. package/dist/dialects/prql.cjs.map +1 -0
  193. package/dist/dialects/prql.d.cts +506 -0
  194. package/dist/dialects/prql.d.ts +506 -0
  195. package/dist/dialects/prql.js +2 -0
  196. package/dist/dialects/prql.js.map +1 -0
  197. package/dist/dialects/redshift.cjs +2 -0
  198. package/dist/dialects/redshift.cjs.map +1 -0
  199. package/dist/dialects/redshift.d.cts +141 -0
  200. package/dist/dialects/redshift.d.ts +141 -0
  201. package/dist/dialects/redshift.js +2 -0
  202. package/dist/dialects/redshift.js.map +1 -0
  203. package/dist/dialects/risingwave.cjs +2 -0
  204. package/dist/dialects/risingwave.cjs.map +1 -0
  205. package/dist/dialects/risingwave.d.cts +488 -0
  206. package/dist/dialects/risingwave.d.ts +488 -0
  207. package/dist/dialects/risingwave.js +2 -0
  208. package/dist/dialects/risingwave.js.map +1 -0
  209. package/dist/dialects/singlestore.cjs +2 -0
  210. package/dist/dialects/singlestore.cjs.map +1 -0
  211. package/dist/dialects/singlestore.d.cts +73 -0
  212. package/dist/dialects/singlestore.d.ts +73 -0
  213. package/dist/dialects/singlestore.js +2 -0
  214. package/dist/dialects/singlestore.js.map +1 -0
  215. package/dist/dialects/snowflake.cjs +3 -0
  216. package/dist/dialects/snowflake.cjs.map +1 -0
  217. package/dist/dialects/snowflake.d.cts +326 -0
  218. package/dist/dialects/snowflake.d.ts +326 -0
  219. package/dist/dialects/snowflake.js +3 -0
  220. package/dist/dialects/snowflake.js.map +1 -0
  221. package/dist/dialects/solr.cjs +2 -0
  222. package/dist/dialects/solr.cjs.map +1 -0
  223. package/dist/dialects/solr.d.cts +468 -0
  224. package/dist/dialects/solr.d.ts +468 -0
  225. package/dist/dialects/solr.js +2 -0
  226. package/dist/dialects/solr.js.map +1 -0
  227. package/dist/dialects/spark.cjs +2 -0
  228. package/dist/dialects/spark.cjs.map +1 -0
  229. package/dist/dialects/spark.d.cts +500 -0
  230. package/dist/dialects/spark.d.ts +500 -0
  231. package/dist/dialects/spark.js +2 -0
  232. package/dist/dialects/spark.js.map +1 -0
  233. package/dist/dialects/spark2.cjs +2 -0
  234. package/dist/dialects/spark2.cjs.map +1 -0
  235. package/dist/dialects/spark2.d.cts +497 -0
  236. package/dist/dialects/spark2.d.ts +497 -0
  237. package/dist/dialects/spark2.js +2 -0
  238. package/dist/dialects/spark2.js.map +1 -0
  239. package/dist/dialects/sqlite.cjs +2 -0
  240. package/dist/dialects/sqlite.cjs.map +1 -0
  241. package/dist/dialects/sqlite.d.cts +521 -0
  242. package/dist/dialects/sqlite.d.ts +521 -0
  243. package/dist/dialects/sqlite.js +2 -0
  244. package/dist/dialects/sqlite.js.map +1 -0
  245. package/dist/dialects/starrocks.cjs +2 -0
  246. package/dist/dialects/starrocks.cjs.map +1 -0
  247. package/dist/dialects/starrocks.d.cts +529 -0
  248. package/dist/dialects/starrocks.d.ts +529 -0
  249. package/dist/dialects/starrocks.js +2 -0
  250. package/dist/dialects/starrocks.js.map +1 -0
  251. package/dist/dialects/tableau.cjs +2 -0
  252. package/dist/dialects/tableau.cjs.map +1 -0
  253. package/dist/dialects/tableau.d.cts +476 -0
  254. package/dist/dialects/tableau.d.ts +476 -0
  255. package/dist/dialects/tableau.js +2 -0
  256. package/dist/dialects/tableau.js.map +1 -0
  257. package/dist/dialects/teradata.cjs +2 -0
  258. package/dist/dialects/teradata.cjs.map +1 -0
  259. package/dist/dialects/teradata.d.cts +549 -0
  260. package/dist/dialects/teradata.d.ts +549 -0
  261. package/dist/dialects/teradata.js +2 -0
  262. package/dist/dialects/teradata.js.map +1 -0
  263. package/dist/dialects/trino.cjs +2 -0
  264. package/dist/dialects/trino.cjs.map +1 -0
  265. package/dist/dialects/trino.d.cts +475 -0
  266. package/dist/dialects/trino.d.ts +475 -0
  267. package/dist/dialects/trino.js +2 -0
  268. package/dist/dialects/trino.js.map +1 -0
  269. package/dist/dialects/tsql.cjs +2 -0
  270. package/dist/dialects/tsql.cjs.map +1 -0
  271. package/dist/dialects/tsql.d.cts +719 -0
  272. package/dist/dialects/tsql.d.ts +719 -0
  273. package/dist/dialects/tsql.js +2 -0
  274. package/dist/dialects/tsql.js.map +1 -0
  275. package/dist/index.cjs +26 -0
  276. package/dist/index.cjs.map +1 -0
  277. package/dist/index.d.cts +257 -0
  278. package/dist/index.d.ts +257 -0
  279. package/dist/index.js +26 -0
  280. package/dist/index.js.map +1 -0
  281. package/dist/tokens-DOFGCO-T.d.cts +21871 -0
  282. package/dist/tokens-DOFGCO-T.d.ts +21871 -0
  283. package/package.json +267 -0
@@ -0,0 +1,524 @@
1
+ import { D as Dialect, a as Dialects, N as NormalizationStrategy, a5 as NullOrdering, d as Tokenizer, e as TokenPair, f as TokenType, g as Parser, E as Expression, X as DateExpr, a1 as TimestampExpr, ch as JsonExtractExpr, h as Generator, i as DataTypeExprKind, aA as DataTypeExpr, ci as IfExpr, cj as CollateExpr, be as RegexpLikeExpr, ck as RankExpr, cl as DenseRankExpr, cm as ConvertTimezoneExpr } from '../tokens-DOFGCO-T.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
+ dotcaret?: typeof Expression | undefined;
23
+ dcolon?: typeof Expression | undefined;
24
+ dcolondollar?: typeof Expression | undefined;
25
+ dcolonpercent?: typeof Expression | undefined;
26
+ dcolonqmark?: typeof Expression | undefined;
27
+ dqmark?: typeof Expression | undefined;
28
+ semicolon?: typeof Expression | undefined;
29
+ star?: typeof Expression | undefined;
30
+ backslash?: typeof Expression | undefined;
31
+ slash?: typeof Expression | undefined;
32
+ lt?: typeof Expression | undefined;
33
+ lte?: typeof Expression | undefined;
34
+ gt?: typeof Expression | undefined;
35
+ gte?: typeof Expression | undefined;
36
+ not?: typeof Expression | undefined;
37
+ eq?: typeof Expression | undefined;
38
+ neq?: typeof Expression | undefined;
39
+ nullsafeEq?: typeof Expression | undefined;
40
+ colonEq?: typeof Expression | undefined;
41
+ colonGt?: typeof Expression | undefined;
42
+ ncolonGt?: typeof Expression | undefined;
43
+ and?: typeof Expression | undefined;
44
+ or?: typeof Expression | undefined;
45
+ amp?: typeof Expression | undefined;
46
+ dpipe?: typeof Expression | undefined;
47
+ pipeGt?: typeof Expression | undefined;
48
+ pipe?: typeof Expression | undefined;
49
+ pipeSlash?: typeof Expression | undefined;
50
+ dpipeSlash?: typeof Expression | undefined;
51
+ caret?: typeof Expression | undefined;
52
+ caretAt?: typeof Expression | undefined;
53
+ tilde?: typeof Expression | undefined;
54
+ arrow?: typeof Expression | undefined;
55
+ darrow?: typeof Expression | undefined;
56
+ farrow?: typeof Expression | undefined;
57
+ hash?: typeof Expression | undefined;
58
+ hashArrow?: typeof Expression | undefined;
59
+ dhashArrow?: typeof Expression | undefined;
60
+ lrArrow?: typeof Expression | undefined;
61
+ dat?: typeof Expression | undefined;
62
+ ltAt?: typeof Expression | undefined;
63
+ atGt?: typeof Expression | undefined;
64
+ dollar?: typeof Expression | undefined;
65
+ parameter?: typeof Expression | undefined;
66
+ session?: typeof Expression | undefined;
67
+ sessionParameter?: typeof Expression | undefined;
68
+ sessionUser?: typeof Expression | undefined;
69
+ damp?: typeof Expression | undefined;
70
+ ampLt?: typeof Expression | undefined;
71
+ ampGt?: typeof Expression | undefined;
72
+ adjacent?: typeof Expression | undefined;
73
+ xor?: typeof Expression | undefined;
74
+ dstar?: typeof Expression | undefined;
75
+ qmarkAmp?: typeof Expression | undefined;
76
+ qmarkPipe?: typeof Expression | undefined;
77
+ hashDash?: typeof Expression | undefined;
78
+ exclamation?: typeof Expression | undefined;
79
+ uriStart?: typeof Expression | undefined;
80
+ blockStart?: typeof Expression | undefined;
81
+ blockEnd?: typeof Expression | undefined;
82
+ space?: typeof Expression | undefined;
83
+ break?: typeof Expression | undefined;
84
+ string?: typeof Expression | undefined;
85
+ number?: typeof Expression | undefined;
86
+ identifier?: typeof Expression | undefined;
87
+ database?: typeof Expression | undefined;
88
+ column?: typeof Expression | undefined;
89
+ columnDef?: typeof Expression | undefined;
90
+ schema?: typeof Expression | undefined;
91
+ table?: typeof Expression | undefined;
92
+ warehouse?: typeof Expression | undefined;
93
+ stage?: typeof Expression | undefined;
94
+ streamlit?: typeof Expression | undefined;
95
+ var?: typeof Expression | undefined;
96
+ bitString?: typeof Expression | undefined;
97
+ hexString?: typeof Expression | undefined;
98
+ byteString?: typeof Expression | undefined;
99
+ nationalString?: typeof Expression | undefined;
100
+ rawString?: typeof Expression | undefined;
101
+ heredocString?: typeof Expression | undefined;
102
+ unicodeString?: typeof Expression | undefined;
103
+ bit?: typeof Expression | undefined;
104
+ boolean?: typeof Expression | undefined;
105
+ tinyint?: typeof Expression | undefined;
106
+ utinyint?: typeof Expression | undefined;
107
+ smallint?: typeof Expression | undefined;
108
+ usmallint?: typeof Expression | undefined;
109
+ mediumint?: typeof Expression | undefined;
110
+ umediumint?: typeof Expression | undefined;
111
+ int?: typeof Expression | undefined;
112
+ uint?: typeof Expression | undefined;
113
+ bigint?: typeof Expression | undefined;
114
+ ubigint?: typeof Expression | undefined;
115
+ bignum?: typeof Expression | undefined;
116
+ int128?: typeof Expression | undefined;
117
+ uint128?: typeof Expression | undefined;
118
+ int256?: typeof Expression | undefined;
119
+ uint256?: typeof Expression | undefined;
120
+ float?: typeof Expression | undefined;
121
+ double?: typeof Expression | undefined;
122
+ udouble?: typeof Expression | undefined;
123
+ decimal?: typeof Expression | undefined;
124
+ decimal32?: typeof Expression | undefined;
125
+ decimal64?: typeof Expression | undefined;
126
+ decimal128?: typeof Expression | undefined;
127
+ decimal256?: typeof Expression | undefined;
128
+ decfloat?: typeof Expression | undefined;
129
+ udecimal?: typeof Expression | undefined;
130
+ bigdecimal?: typeof Expression | undefined;
131
+ char?: typeof Expression | undefined;
132
+ nchar?: typeof Expression | undefined;
133
+ varchar?: typeof Expression | undefined;
134
+ nvarchar?: typeof Expression | undefined;
135
+ bpchar?: typeof Expression | undefined;
136
+ text?: typeof Expression | undefined;
137
+ mediumtext?: typeof Expression | undefined;
138
+ longtext?: typeof Expression | undefined;
139
+ blob?: typeof Expression | undefined;
140
+ mediumblob?: typeof Expression | undefined;
141
+ longblob?: typeof Expression | undefined;
142
+ tinyblob?: typeof Expression | undefined;
143
+ tinytext?: typeof Expression | undefined;
144
+ name?: typeof Expression | undefined;
145
+ binary?: typeof Expression | undefined;
146
+ varbinary?: typeof Expression | undefined;
147
+ json?: typeof Expression | undefined;
148
+ jsonb?: typeof Expression | undefined;
149
+ time?: typeof Expression | undefined;
150
+ timetz?: typeof Expression | undefined;
151
+ timeNs?: typeof Expression | undefined;
152
+ timestamp?: typeof Expression | undefined;
153
+ timestamptz?: typeof Expression | undefined;
154
+ timestampltz?: typeof Expression | undefined;
155
+ timestampntz?: typeof Expression | undefined;
156
+ timestampS?: typeof Expression | undefined;
157
+ timestampMs?: typeof Expression | undefined;
158
+ timestampNs?: typeof Expression | undefined;
159
+ datetime?: typeof Expression | undefined;
160
+ datetime2?: typeof Expression | undefined;
161
+ datetime64?: typeof Expression | undefined;
162
+ smalldatetime?: typeof Expression | undefined;
163
+ date?: typeof Expression | undefined;
164
+ date32?: typeof Expression | undefined;
165
+ int4range?: typeof Expression | undefined;
166
+ int4multirange?: typeof Expression | undefined;
167
+ int8range?: typeof Expression | undefined;
168
+ int8multirange?: typeof Expression | undefined;
169
+ numrange?: typeof Expression | undefined;
170
+ nummultirange?: typeof Expression | undefined;
171
+ tsrange?: typeof Expression | undefined;
172
+ tsmultirange?: typeof Expression | undefined;
173
+ tstzrange?: typeof Expression | undefined;
174
+ tstzmultirange?: typeof Expression | undefined;
175
+ daterange?: typeof Expression | undefined;
176
+ datemultirange?: typeof Expression | undefined;
177
+ uuid?: typeof Expression | undefined;
178
+ geography?: typeof Expression | undefined;
179
+ geographypoint?: typeof Expression | undefined;
180
+ nullable?: typeof Expression | undefined;
181
+ geometry?: typeof Expression | undefined;
182
+ point?: typeof Expression | undefined;
183
+ ring?: typeof Expression | undefined;
184
+ linestring?: typeof Expression | undefined;
185
+ localtime?: typeof Expression | undefined;
186
+ localtimestamp?: typeof Expression | undefined;
187
+ systimestamp: typeof Expression;
188
+ multilinestring?: typeof Expression | undefined;
189
+ polygon?: typeof Expression | undefined;
190
+ multipolygon?: typeof Expression | undefined;
191
+ hllsketch?: typeof Expression | undefined;
192
+ hstore?: typeof Expression | undefined;
193
+ super?: typeof Expression | undefined;
194
+ serial?: typeof Expression | undefined;
195
+ smallserial?: typeof Expression | undefined;
196
+ bigserial?: typeof Expression | undefined;
197
+ xml?: typeof Expression | undefined;
198
+ year?: typeof Expression | undefined;
199
+ userdefined?: typeof Expression | undefined;
200
+ money?: typeof Expression | undefined;
201
+ smallmoney?: typeof Expression | undefined;
202
+ rowversion?: typeof Expression | undefined;
203
+ image?: typeof Expression | undefined;
204
+ variant?: typeof Expression | undefined;
205
+ object?: typeof Expression | undefined;
206
+ inet?: typeof Expression | undefined;
207
+ ipaddress?: typeof Expression | undefined;
208
+ ipprefix?: typeof Expression | undefined;
209
+ ipv4?: typeof Expression | undefined;
210
+ ipv6?: typeof Expression | undefined;
211
+ enum?: typeof Expression | undefined;
212
+ enum8?: typeof Expression | undefined;
213
+ enum16?: typeof Expression | undefined;
214
+ fixedstring?: typeof Expression | undefined;
215
+ lowcardinality?: typeof Expression | undefined;
216
+ nested?: typeof Expression | undefined;
217
+ aggregatefunction?: typeof Expression | undefined;
218
+ simpleaggregatefunction?: typeof Expression | undefined;
219
+ tdigest?: typeof Expression | undefined;
220
+ unknown?: typeof Expression | undefined;
221
+ vector?: typeof Expression | undefined;
222
+ dynamic?: typeof Expression | undefined;
223
+ void?: typeof Expression | undefined;
224
+ alias?: typeof Expression | undefined;
225
+ alter?: typeof Expression | undefined;
226
+ all?: typeof Expression | undefined;
227
+ anti?: typeof Expression | undefined;
228
+ any?: typeof Expression | undefined;
229
+ apply?: typeof Expression | undefined;
230
+ array?: typeof Expression | undefined;
231
+ asc?: typeof Expression | undefined;
232
+ asof?: typeof Expression | undefined;
233
+ attach?: typeof Expression | undefined;
234
+ autoIncrement?: typeof Expression | undefined;
235
+ begin?: typeof Expression | undefined;
236
+ between?: typeof Expression | undefined;
237
+ bulkCollectInto?: typeof Expression | undefined;
238
+ cache?: typeof Expression | undefined;
239
+ case?: typeof Expression | undefined;
240
+ characterSet?: typeof Expression | undefined;
241
+ clusterBy?: typeof Expression | undefined;
242
+ collate?: typeof Expression | undefined;
243
+ command?: typeof Expression | undefined;
244
+ comment?: typeof Expression | undefined;
245
+ commit?: typeof Expression | undefined;
246
+ connectBy?: typeof Expression | undefined;
247
+ constraint?: typeof Expression | undefined;
248
+ copy?: typeof Expression | undefined;
249
+ create?: typeof Expression | undefined;
250
+ cross?: typeof Expression | undefined;
251
+ cube?: typeof Expression | undefined;
252
+ currentDate?: typeof Expression | undefined;
253
+ currentDatetime?: typeof Expression | undefined;
254
+ currentSchema: typeof Expression;
255
+ currentTime?: typeof Expression | undefined;
256
+ currentTimestamp?: typeof Expression | undefined;
257
+ currentUser?: typeof Expression | undefined;
258
+ currentRole?: typeof Expression | undefined;
259
+ currentCatalog?: typeof Expression | undefined;
260
+ declare?: typeof Expression | undefined;
261
+ default?: typeof Expression | undefined;
262
+ delete?: typeof Expression | undefined;
263
+ desc?: typeof Expression | undefined;
264
+ describe?: typeof Expression | undefined;
265
+ detach?: typeof Expression | undefined;
266
+ dictionary?: typeof Expression | undefined;
267
+ distinct?: typeof Expression | undefined;
268
+ distributeBy?: typeof Expression | undefined;
269
+ div?: typeof Expression | undefined;
270
+ drop?: typeof Expression | undefined;
271
+ else?: typeof Expression | undefined;
272
+ end?: typeof Expression | undefined;
273
+ escape?: typeof Expression | undefined;
274
+ except?: typeof Expression | undefined;
275
+ execute?: typeof Expression | undefined;
276
+ exists?: typeof Expression | undefined;
277
+ false?: typeof Expression | undefined;
278
+ fetch?: typeof Expression | undefined;
279
+ file?: typeof Expression | undefined;
280
+ fileFormat?: typeof Expression | undefined;
281
+ filter?: typeof Expression | undefined;
282
+ final?: typeof Expression | undefined;
283
+ first?: typeof Expression | undefined;
284
+ for?: typeof Expression | undefined;
285
+ force?: typeof Expression | undefined;
286
+ foreignKey?: typeof Expression | undefined;
287
+ format?: typeof Expression | undefined;
288
+ from?: typeof Expression | undefined;
289
+ full?: typeof Expression | undefined;
290
+ function?: typeof Expression | undefined;
291
+ get?: typeof Expression | undefined;
292
+ glob?: typeof Expression | undefined;
293
+ global?: typeof Expression | undefined;
294
+ grant?: typeof Expression | undefined;
295
+ groupBy?: typeof Expression | undefined;
296
+ groupingSets?: typeof Expression | undefined;
297
+ having?: typeof Expression | undefined;
298
+ hint?: typeof Expression | undefined;
299
+ ignore?: typeof Expression | undefined;
300
+ ilike?: typeof Expression | undefined;
301
+ in?: typeof Expression | undefined;
302
+ index?: typeof Expression | undefined;
303
+ indexedBy?: typeof Expression | undefined;
304
+ inner?: typeof Expression | undefined;
305
+ insert?: typeof Expression | undefined;
306
+ install?: typeof Expression | undefined;
307
+ integration?: typeof Expression | undefined;
308
+ intersect?: typeof Expression | undefined;
309
+ interval?: typeof Expression | undefined;
310
+ into?: typeof Expression | undefined;
311
+ introducer?: typeof Expression | undefined;
312
+ irlike?: typeof Expression | undefined;
313
+ is?: typeof Expression | undefined;
314
+ isnull?: typeof Expression | undefined;
315
+ join?: typeof Expression | undefined;
316
+ joinMarker?: typeof Expression | undefined;
317
+ keep?: typeof Expression | undefined;
318
+ key?: typeof Expression | undefined;
319
+ kill?: typeof Expression | undefined;
320
+ language?: typeof Expression | undefined;
321
+ lateral?: typeof Expression | undefined;
322
+ left?: typeof Expression | undefined;
323
+ like?: typeof Expression | undefined;
324
+ limit?: typeof Expression | undefined;
325
+ list?: typeof Expression | undefined;
326
+ load?: typeof Expression | undefined;
327
+ lock?: typeof Expression | undefined;
328
+ map?: typeof Expression | undefined;
329
+ match?: typeof Expression | undefined;
330
+ matchCondition?: typeof Expression | undefined;
331
+ matchRecognize?: typeof Expression | undefined;
332
+ memberOf?: typeof Expression | undefined;
333
+ merge?: typeof Expression | undefined;
334
+ mod?: typeof Expression | undefined;
335
+ model?: typeof Expression | undefined;
336
+ natural?: typeof Expression | undefined;
337
+ next?: typeof Expression | undefined;
338
+ nothing?: typeof Expression | undefined;
339
+ notnull?: typeof Expression | undefined;
340
+ null?: typeof Expression | undefined;
341
+ objectIdentifier?: typeof Expression | undefined;
342
+ offset?: typeof Expression | undefined;
343
+ on?: typeof Expression | undefined;
344
+ only?: typeof Expression | undefined;
345
+ operator?: typeof Expression | undefined;
346
+ orderBy?: typeof Expression | undefined;
347
+ orderSiblingsBy?: typeof Expression | undefined;
348
+ ordered?: typeof Expression | undefined;
349
+ ordinality?: typeof Expression | undefined;
350
+ out?: typeof Expression | undefined;
351
+ inout?: typeof Expression | undefined;
352
+ outer?: typeof Expression | undefined;
353
+ over?: typeof Expression | undefined;
354
+ overlaps?: typeof Expression | undefined;
355
+ overwrite?: typeof Expression | undefined;
356
+ package?: typeof Expression | undefined;
357
+ partition?: typeof Expression | undefined;
358
+ partitionBy?: typeof Expression | undefined;
359
+ percent?: typeof Expression | undefined;
360
+ pivot?: typeof Expression | undefined;
361
+ placeholder?: typeof Expression | undefined;
362
+ policy?: typeof Expression | undefined;
363
+ pool?: typeof Expression | undefined;
364
+ positional?: typeof Expression | undefined;
365
+ pragma?: typeof Expression | undefined;
366
+ prewhere?: typeof Expression | undefined;
367
+ primaryKey?: typeof Expression | undefined;
368
+ procedure?: typeof Expression | undefined;
369
+ properties?: typeof Expression | undefined;
370
+ pseudoType?: typeof Expression | undefined;
371
+ put?: typeof Expression | undefined;
372
+ qualify?: typeof Expression | undefined;
373
+ quote?: typeof Expression | undefined;
374
+ qdcolon?: typeof Expression | undefined;
375
+ range?: typeof Expression | undefined;
376
+ recursive?: typeof Expression | undefined;
377
+ refresh?: typeof Expression | undefined;
378
+ rename?: typeof Expression | undefined;
379
+ replace?: typeof Expression | undefined;
380
+ returning?: typeof Expression | undefined;
381
+ revoke?: typeof Expression | undefined;
382
+ references?: typeof Expression | undefined;
383
+ right?: typeof Expression | undefined;
384
+ rlike?: typeof Expression | undefined;
385
+ role?: typeof Expression | undefined;
386
+ rollback?: typeof Expression | undefined;
387
+ rollup?: typeof Expression | undefined;
388
+ row?: typeof Expression | undefined;
389
+ rule?: typeof Expression | undefined;
390
+ rows?: typeof Expression | undefined;
391
+ select?: typeof Expression | undefined;
392
+ semi?: typeof Expression | undefined;
393
+ separator?: typeof Expression | undefined;
394
+ sequence?: typeof Expression | undefined;
395
+ serdeProperties?: typeof Expression | undefined;
396
+ set?: typeof Expression | undefined;
397
+ settings?: typeof Expression | undefined;
398
+ show?: typeof Expression | undefined;
399
+ similarTo?: typeof Expression | undefined;
400
+ some?: typeof Expression | undefined;
401
+ sortBy?: typeof Expression | undefined;
402
+ soundsLike?: typeof Expression | undefined;
403
+ sqlSecurity?: typeof Expression | undefined;
404
+ startWith?: typeof Expression | undefined;
405
+ storageIntegration?: typeof Expression | undefined;
406
+ straightJoin?: typeof Expression | undefined;
407
+ struct?: typeof Expression | undefined;
408
+ summarize?: typeof Expression | undefined;
409
+ tableSample?: typeof Expression | undefined;
410
+ tag?: typeof Expression | undefined;
411
+ temporary?: typeof Expression | undefined;
412
+ top?: typeof Expression | undefined;
413
+ then?: typeof Expression | undefined;
414
+ true?: typeof Expression | undefined;
415
+ trigger?: typeof Expression | undefined;
416
+ truncate?: typeof Expression | undefined;
417
+ uncache?: typeof Expression | undefined;
418
+ union?: typeof Expression | undefined;
419
+ unnest?: typeof Expression | undefined;
420
+ unpivot?: typeof Expression | undefined;
421
+ update?: typeof Expression | undefined;
422
+ use?: typeof Expression | undefined;
423
+ using?: typeof Expression | undefined;
424
+ values?: typeof Expression | undefined;
425
+ variadic?: typeof Expression | undefined;
426
+ view?: typeof Expression | undefined;
427
+ semanticView?: typeof Expression | undefined;
428
+ volatile?: typeof Expression | undefined;
429
+ volume?: typeof Expression | undefined;
430
+ when?: typeof Expression | undefined;
431
+ where?: typeof Expression | undefined;
432
+ window?: typeof Expression | undefined;
433
+ with?: typeof Expression | undefined;
434
+ unique?: typeof Expression | undefined;
435
+ utcDate?: typeof Expression | undefined;
436
+ utcTime?: typeof Expression | undefined;
437
+ utcTimestamp?: typeof Expression | undefined;
438
+ versionSnapshot?: typeof Expression | undefined;
439
+ timestampSnapshot?: typeof Expression | undefined;
440
+ option?: typeof Expression | undefined;
441
+ sink?: typeof Expression | undefined;
442
+ source?: typeof Expression | undefined;
443
+ analyze?: typeof Expression | undefined;
444
+ namespace?: typeof Expression | undefined;
445
+ export?: typeof Expression | undefined;
446
+ hiveTokenStream?: typeof Expression | undefined;
447
+ };
448
+ static get FUNCTIONS(): Record<string, (args: Expression[], options: {
449
+ dialect: Dialect;
450
+ }) => Expression>;
451
+ static get CONSTRAINT_PARSERS(): Partial<Record<string, (this: Parser, ...args: unknown[]) => Expression | Expression[] | undefined>>;
452
+ static get RANGE_PARSERS(): Partial<Record<TokenType, (this: Parser, thisExpr: Expression) => Expression | undefined>>;
453
+ static get FUNC_TOKENS(): Set<TokenType>;
454
+ static get FUNCTION_PARSERS(): Partial<Record<string, (this: Parser) => Expression | undefined>>;
455
+ static get ODBC_DATETIME_LITERALS(): {
456
+ d: typeof DateExpr;
457
+ ts: typeof TimestampExpr;
458
+ };
459
+ parseColumn(): Expression | undefined;
460
+ parseJsonExtract(): JsonExtractExpr;
461
+ static get TABLE_ALIAS_TOKENS(): Set<TokenType>;
462
+ }
463
+ declare class ExasolGenerator extends Generator {
464
+ static get RESERVED_KEYWORDS(): Set<string>;
465
+ static get AFTER_HAVING_MODIFIER_TRANSFORMS(): Map<string, (this: Generator, e: Expression) => string>;
466
+ static SUPPORTS_DECODE_CASE: boolean;
467
+ static readonly SELECT_KINDS: string[];
468
+ static TRY_SUPPORTED: boolean;
469
+ static SUPPORTS_UESCAPE: boolean;
470
+ static SUPPORTS_CONVERT_TIMEZONE: boolean;
471
+ static get STRING_TYPE_MAPPING(): Map<DataTypeExprKind, string>;
472
+ static get TYPE_MAPPING(): Map<string, string>;
473
+ dataTypeSql(expression: DataTypeExpr): string;
474
+ static get ORIGINAL_TRANSFORMS(): Map<typeof Expression, (this: Generator, e: any) => string>;
475
+ ifSql(expression: IfExpr): string;
476
+ collateSql(expression: CollateExpr): string;
477
+ jsonExtractSql(expression: JsonExtractExpr): string;
478
+ regexpLikeSql(expression: RegexpLikeExpr): string;
479
+ private noArgWindowFunc;
480
+ rankSql(expression: RankExpr): string;
481
+ denserankSql(expression: DenseRankExpr): string;
482
+ convertTimezoneSql(expression: ConvertTimezoneExpr): string;
483
+ }
484
+ declare class Exasol extends Dialect {
485
+ static DIALECT_NAME: Dialects;
486
+ static get NORMALIZATION_STRATEGY(): NormalizationStrategy;
487
+ static get SUPPORTS_USER_DEFINED_TYPES(): boolean;
488
+ static get SUPPORTS_SEMI_ANTI_JOIN(): boolean;
489
+ static get SUPPORTS_COLUMN_JOIN_MARKS(): boolean;
490
+ static get NULL_ORDERING(): NullOrdering;
491
+ static get CONCAT_COALESCE(): boolean;
492
+ static get TIME_MAPPING(): {
493
+ yyyy: string;
494
+ YYYY: string;
495
+ yy: string;
496
+ YY: string;
497
+ mm: string;
498
+ MM: string;
499
+ MONTH: string;
500
+ MON: string;
501
+ dd: string;
502
+ DD: string;
503
+ DAY: string;
504
+ DY: string;
505
+ H12: string;
506
+ H24: string;
507
+ HH: string;
508
+ ID: string;
509
+ vW: string;
510
+ IW: string;
511
+ vYYY: string;
512
+ IYYY: string;
513
+ MI: string;
514
+ SS: string;
515
+ uW: string;
516
+ UW: string;
517
+ Z: string;
518
+ };
519
+ static Tokenizer: typeof ExasolTokenizer;
520
+ static Parser: typeof ExasolParser;
521
+ static Generator: typeof ExasolGenerator;
522
+ }
523
+
524
+ export { Exasol };
@@ -0,0 +1,2 @@
1
+ import{$d as B,$m as Zt,$v as le,Bo as ut,Cm as Xt,Cr as ie,Dm as $t,Dr as ae,Fj as J,Fr as gt,Fv as G,Fw as I,Gj as Ut,Gv as k,Hm as tt,Hs as mt,Hw as Rt,Ia as Lt,If as P,Im as et,Jv as ue,Ke as Y,Kn as ct,Ku as xt,Mj as Ht,Mv as l,Oe as Pt,Pi as wt,Pr as St,Qp as pt,Re as qt,Ri as V,Rp as Et,Rt as At,Sa as u,Sm as rt,Tf as K,Tq as H,Uj as j,Um as nt,Uq as v,Uw as fe,Vl as Bt,Vm as st,Wj as vt,Wm as Wt,Xj as kt,Yc as C,_k as Ft,a as n,b as M,bm as Yt,bn as zt,c as L,cp as jt,cr as te,d as b,e as o,ft as oe,gm as Kt,gr as ee,gw as pe,h as Mt,hn as it,hu as w,is as dt,iv as ce,iw as _t,jl as Q,kj as X,kr as re,le as bt,lj as $,lq as Qt,lx as Te,mj as W,mn as Jt,mx as he,nj as Z,ob as x,oj as z,rg as d,s as c,sw as Ee,sx as It,uq as ft,vj as Gt,vn as at,vr as ne,wb as D,wq as Tt,xm as Vt,xq as ht,zi as q,zn as ot,zp as lt,zr as se}from"../chunk-RGKTYIN3.js";var yt=new Set(["DAY","WEEK","MONTH","YEAR","HOUR","MINUTE","SECOND"]);function ze(r){let e=r.text("length")==="256"?"HASH_SHA256":"HASH_SHA512";return this.func(e,[r.args.this])}n(ze,"sha2Sql");function ge(r){let s=r.text("unit").toUpperCase()||"DAY";return yt.has(s)?this.func(`${s}S_BETWEEN`,[r.args.this,r.args.expression]):(this.unsupported(`'${s}' is not supported in Exasol.`),this.functionFallbackSql(r))}n(ge,"dateDiffSql");function Je(r){let s=new Ut({this:u(r,0),expression:xt()});return new ut({this:s,true:d.number(0),false:u(r,0)})}n(Je,"buildZeroIfNull");function je(r){let s=new Gt({this:u(r,0),expression:d.number(0)});return new ut({this:s,true:xt(),false:u(r,0)})}n(je,"buildNullIfZero");function Qe(r){if(r instanceof q){let s={};r.args.expressions?.forEach(a=>{if(a instanceof Y){let p=a.args.alias;p instanceof C&&(s[p.name]=p.args.quoted||!1)}});let t=r.find(B)?.args.this;t instanceof C&&t.name.toUpperCase()==="LOCAL"&&!t.args.quoted&&t.replace(w(t.name.toUpperCase(),{quoted:!0}));let i=n((a,p)=>{if(a instanceof P&&!a.args.table){let f=a.args.this.name;if(f in p)return new P({this:w(f,{quoted:p[f]}),table:w("LOCAL",{quoted:!1})})}return a},"prefixLocal");["where","group","having"].forEach(a=>{let p=r.args[a];p instanceof D&&r.setArgKey(a,p.transform(f=>i(f,s)))});let E={},m=[];r.args.expressions?.forEach(a=>{if(a instanceof Y){let p=a.args.this?.transform(T=>i(T,E));a.setArgKey("this",p);let f=a.args.alias;f instanceof C&&(E[f.name]=f.args.quoted||!1),m.push(a)}else m.push(a.transform(p=>i(p,E)))}),r.setArgKey("expressions",m)}return r}n(Qe,"addLocalPrefixForAliases");function $e(r,s){let e=s.text("unit"),t=s.args.this instanceof Bt?s.args.this.args.this:s.args.this,i=this.sql(t);return t instanceof d&&t.isString&&(i=r==="TIMESTAMP"?`${r} '${(t.args.this??"").replace("T"," ")}'`:`DATE '${t.args.this??""}'`),`DATE_TRUNC('${e}', ${i})`}n($e,"truncSql");function tr(r){return $e.call(this,"DATE",r)}n(tr,"dateTruncSql");function Se(r){return $e.call(this,"TIMESTAMP",r)}n(Se,"timestampTruncSql");function de(r){return r instanceof Yt&&r.text("expression").toUpperCase()==="UTF8_LCASE"}n(de,"isCaseInsensitive");function er(r){let s=r.args.this,e=r.args.delimiter,t=e instanceof D?e:d.number(e??0),i=r.args.count,E=this.sql(r,"count"),m=i instanceof d&&i.isNumber?parseFloat(i.args.this??"0"):0,a=this.sql(s);if(m===0)return this.func("SUBSTR",[a,"1","0"]);let p=m<0,f=p?"-1":"1",T=p?this.func("ABS",[E]):E,R=this.sql(t),y=this.func("INSTR",[s instanceof D&&de(s)?this.func("LOWER",[a]):a,de(t)?this.func("LOWER",[R]):R,f,T]),U=this.func("NULLIF",[y,"0"]);if(p){let Ze=this.func("NVL",[`${U} + ${this.func("LENGTH",[R])}`,f]);return this.func("SUBSTR",[a,Ze])}let We=this.func("NVL",[`${U} - 1`,this.func("LENGTH",[a])]);return this.func("SUBSTR",[a,f,We])}n(er,"substringIndexSql");function rr(r){if(!(r instanceof q))return r;let s=r.args.group;if(!s||!s.getArgKey("all"))return r;if(r.isStar){if((r.args.expressions??[]).some(t=>t.find(V)))throw new Mt("GROUP BY ALL with star projection and aggregates is not supported by Exasol");return r.setArgKey("distinct",new qt({})),r.setArgKey("group",void 0),r}let e=(r.args.expressions??[]).map((t,i)=>t.find(V)?void 0:d.number(i+1)).filter(t=>!!t);return e.length===0?(r.setArgKey("group",void 0),r):(s.setArgKey("expressions",e),s.setArgKey("all",void 0),r)}n(rr,"groupByAll");function nr(r){if(!(r instanceof q))return r;let s=r.args.expressions||[],e=n(T=>T instanceof bt&&!T.args.this,"isBareStar"),t=!1,i=null;for(let T of s){let R=e(T);if(R&&i===null?i=T:R||(t=!0),i&&t)break}if(!(i&&t))return r;let E=Lt(r);if(!E||!E.selectedSources||Object.keys(E.selectedSources).length===0)return r;let m=[];for(let[T,R]of Object.entries(E.selectedSources)){let[y]=R,U=y instanceof B&&y.args.this instanceof C?y.args.this.copy():w(T);m.push(U)}let a=i,p=m.map(T=>new P({this:a.copy(),table:T})),f=[];for(let T of s)e(T)?f.push(...p):f.push(T);return r.setArgKey("expressions",f),r}n(nr,"qualifyUnscopedStar");function Nt(r){let s=r.args.expression instanceof wt?r.args.expression:null,e=(s?s.text("unit")||"DAY":r.text("unit")||"DAY").toUpperCase();if(!yt.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(s){if(!s.args.this)return this.functionFallbackSql(r);t=s.args.this}return r instanceof nt&&(t=new kt({this:t})),this.func(`ADD_${e}S`,[r.args.this,t])}n(Nt,"addDateSql");var Ae,xe,_e,F,O=class O extends(_e=It,xe=[c],Ae=[c],_e){static get IDENTIFIERS(){return['"',["[","]"]]}static get ORIGINAL_KEYWORDS(){let e={...It.KEYWORDS,USER:"currentUser",ENDIF:"end","LONG VARCHAR":"text",REGEXP_LIKE:"rlike",SEPARATOR:"separator",SYSTIMESTAMP:"systimestamp"};return delete e.DIV,e}};F=M(_e),o(F,10,"IDENTIFIERS",xe,O),o(F,10,"ORIGINAL_KEYWORDS",Ae,O),L(F,O),b(F,3,O),n(O,"ExasolTokenizer");var Ot=O,Re,Ie,Ne,Oe,De,Ce,ye,Me,Le,be,A,S=class S extends(be=x,Le=[c],Me=[c],ye=[c],Ce=[c],De=[c],Oe=[c],Ne=[c],Ie=[c],Re=[c],be){static get ID_VAR_TOKENS(){return new Set([...x.ID_VAR_TOKENS,"sessionUser","currentCatalog","straightJoin"])}static get NO_PAREN_FUNCTIONS(){let e={systimestamp:Xt,currentSchema:tt,...x.NO_PAREN_FUNCTIONS};return delete e.localtime,delete e.localtimestamp,e}static get FUNCTIONS(){return(()=>{let e={...x.FUNCTIONS,BIT_AND:I(X),BIT_OR:I(W),BIT_XOR:I(z),BIT_NOT:n(t=>new j({this:u(t,0)}),"BIT_NOT"),BIT_LSHIFT:I($),BIT_RSHIFT:I(Z),DATE_TRUNC:n(t=>new ot({this:u(t,1),unit:u(t,0)}),"DATE_TRUNC"),DIV:I(J),EVERY:n(t=>new dt({this:u(t,0)}),"EVERY"),EDIT_DISTANCE:n(t=>lt.fromArgList(t),"EDIT_DISTANCE"),FROM_POSIX_TIME:n(t=>St.fromArgList(t),"FROM_POSIX_TIME"),CURDATE:n(t=>Vt.fromArgList(t),"CURDATE"),NOW:n(t=>$t.fromArgList(t),"NOW"),HASH_SHA:n(t=>H.fromArgList(t),"HASH_SHA"),HASH_SHA1:n(t=>H.fromArgList(t),"HASH_SHA1"),HASH_MD5:n(t=>pt.fromArgList(t),"HASH_MD5"),HASHTYPE_MD5:n(t=>Et.fromArgList(t),"HASHTYPE_MD5"),REGEXP_LIKE:n(t=>new ht({this:u(t,0),expression:u(t,1),flag:u(t,2),fullMatch:!0}),"REGEXP_LIKE"),REGEXP_SUBSTR:n(t=>ft.fromArgList(t),"REGEXP_SUBSTR"),REGEXP_REPLACE:n(t=>new Tt({this:u(t,0),expression:u(t,1),replacement:u(t,2),position:u(t,3),occurrence:u(t,4)}),"REGEXP_REPLACE"),HASH_SHA256:n(t=>new v({this:u(t,0),length:d.number(256)}),"HASH_SHA256"),HASH_SHA512:n(t=>new v({this:u(t,0),length:d.number(512)}),"HASH_SHA512"),TRUNC:n(t=>Rt(t,{dialect:"exasol"}),"TRUNC"),TRUNCATE:n(t=>Rt(t,{dialect:"exasol"}),"TRUNCATE"),USER:n(t=>et.fromArgList(t),"USER"),VAR_POP:n(t=>At.fromArgList(t),"VAR_POP"),APPROXIMATE_COUNT_DISTINCT:n(t=>mt.fromArgList(t),"APPROXIMATE_COUNT_DISTINCT"),TO_CHAR:n(t=>he(t,{dialect:"exasol"}),"TO_CHAR"),TO_DATE:pe(gt,{dialect:"exasol"}),CONVERT_TZ:n(t=>new Q({timestamp:t[0],sourceTz:u(t,1),targetTz:t[2],options:[u(t,3)]}),"CONVERT_TZ"),NULLIFZERO:je,ZEROIFNULL:Je,WEEKOFYEAR:n(t=>it.fromArgList(t),"WEEKOFYEAR")};return yt.forEach(t=>{e[`ADD_${t}S`]=_t(rt,void 0,{defaultUnit:t}),e[`${t}S_BETWEEN`]=_t(st,void 0,{defaultUnit:t})}),e})()}static get CONSTRAINT_PARSERS(){return{...x.CONSTRAINT_PARSERS,COMMENT:n(function(){return this.expression(K,{this:this.match("is")&&this.parseString()})},"COMMENT")}}static get RANGE_PARSERS(){return{...x.RANGE_PARSERS,rlike:function(e){return this.expression(ht,{this:e,expression:this.parseBitwise(),fullMatch:!0})}}}static get FUNC_TOKENS(){return new Set([...x.FUNC_TOKENS,"systimestamp"])}static get FUNCTION_PARSERS(){return{...x.FUNCTION_PARSERS,...Object.fromEntries(["GROUP_CONCAT","LISTAGG"].map(e=>[e,function(){return this.parseGroupConcat()}])),JSON_VALUE:n(function(){return this.parseJsonValue()},"JSON_VALUE"),JSON_EXTRACT:n(function(){return this.parseJsonExtract()},"JSON_EXTRACT")}}static get ODBC_DATETIME_LITERALS(){return{d:ct,ts:at}}parseColumn(){let e=super.parseColumn();if(!(e instanceof P))return e;let t=e.args.table;return t instanceof C&&t.name.toUpperCase()==="LOCAL"&&!t.args.quoted&&e.setArgKey("table",void 0),e}parseJsonExtract(){let e=this.parseExpressions();this.matchRParen();let t=this.expression(jt,{expressions:e});if(this.matchTexts("EMITS")){let i=this.parseSchema();i?t.setArgKey("emits",i.args.expressions):this.raiseError("Expected schema after EMITS")}return t}static get TABLE_ALIAS_TOKENS(){return new Set([...x.TABLE_ALIAS_TOKENS,"straightJoin"])}};A=M(be),o(A,10,"ID_VAR_TOKENS",Le,S),o(A,10,"NO_PAREN_FUNCTIONS",Me,S),o(A,10,"FUNCTIONS",ye,S),o(A,10,"CONSTRAINT_PARSERS",Ce,S),o(A,10,"RANGE_PARSERS",De,S),o(A,10,"FUNC_TOKENS",Oe,S),o(A,10,"FUNCTION_PARSERS",Ne,S),o(A,10,"ODBC_DATETIME_LITERALS",Ie,S),o(A,10,"TABLE_ALIAS_TOKENS",Re,S),L(A,S),b(A,3,S),n(S,"ExasolParser");var Dt=S,Pe,qe,we,Ge,Ue,He,N,h=class h extends(He=k,Ue=[c],Ge=[c],we=[c],qe=[c],Pe=[c],He){static get RESERVED_KEYWORDS(){return new Set(["absolute","action","add","after","all","allocate","alter","and","any","append","are","array","as","asc","asensitive","assertion","at","attribute","authid","authorization","before","begin","between","bigint","binary","bit","blob","blocked","bool","boolean","both","by","byte","call","called","cardinality","cascade","cascaded","case","casespecific","cast","catalog","chain","char","character","character_set_catalog","character_set_name","character_set_schema","characteristics","check","checked","clob","close","coalesce","collate","collation","collation_catalog","collation_name","collation_schema","column","commit","condition","connect_by_iscycle","connect_by_isleaf","connect_by_root","connection","constant","constraint","constraint_state_default","constraints","constructor","contains","continue","control","convert","corresponding","create","cs","csv","cube","current","current_cluster","current_cluster_uid","current_date","current_path","current_role","current_schema","current_session","current_statement","current_time","current_timestamp","current_user","cursor","cycle","data","datalink","datetime_interval_code","datetime_interval_precision","day","dbtimezone","deallocate","dec","decimal","declare","default","default_like_escape_character","deferrable","deferred","defined","definer","delete","deref","derived","desc","describe","descriptor","deterministic","disable","disabled","disconnect","dispatch","distinct","dlurlcomplete","dlurlpath","dlurlpathonly","dlurlscheme","dlurlserver","dlvalue","do","domain","double","drop","dynamic","dynamic_function","dynamic_function_code","each","else","elseif","elsif","emits","enable","enabled","end","end-exec","endif","enforce","equals","errors","escape","except","exception","exec","execute","exists","exit","export","external","extract","false","fbv","fetch","file","final","first","float","following","for","forall","force","format","found","free","from","fs","full","function","general","generated","geometry","get","global","go","goto","grant","granted","group","group_concat","grouping","groups","hashtype","hashtype_format","having","high","hold","hour","identity","if","ifnull","immediate","impersonate","implementation","import","in","index","indicator","inner","inout","input","insensitive","insert","instance","instantiable","int","integer","integrity","intersect","interval","into","inverse","invoker","is","iterate","join","key_member","key_type","large","last","lateral","ldap","leading","leave","left","level","like","limit","listagg","localtime","localtimestamp","locator","log","longvarchar","loop","low","map","match","matched","merge","method","minus","minute","mod","modifies","modify","module","month","names","national","natural","nchar","nclob","new","next","nls_date_format","nls_date_language","nls_first_day_of_week","nls_numeric_characters","nls_timestamp_format","no","nocycle","nologging","none","not","null","nullif","number","numeric","nvarchar","nvarchar2","object","of","off","old","on","only","open","option","options","or","order","ordering","ordinality","others","out","outer","output","over","overlaps","overlay","overriding","pad","parallel_enable","parameter","parameter_specific_catalog","parameter_specific_name","parameter_specific_schema","parquet","partial","path","permission","placing","plus","preceding","preferring","prepare","preserve","prior","privileges","procedure","profile","qualify","random","range","read","reads","real","recovery","recursive","ref","references","referencing","refresh","regexp_like","relative","release","rename","repeat","replace","restore","restrict","result","return","returned_length","returned_octet_length","returns","revoke","right","rollback","rollup","routine","row","rows","rowtype","savepoint","schema","scope","scope_user","script","scroll","search","second","section","security","select","selective","self","sensitive","separator","sequence","session","session_user","sessiontimezone","set","sets","shortint","similar","smallint","some","source","space","specific","specifictype","sql","sql_bigint","sql_bit","sql_char","sql_date","sql_decimal","sql_double","sql_float","sql_integer","sql_longvarchar","sql_numeric","sql_preprocessor_script","sql_real","sql_smallint","sql_timestamp","sql_tinyint","sql_type_date","sql_type_timestamp","sql_varchar","sqlexception","sqlstate","sqlwarning","start","state","statement","static","structure","style","substring","subtype","sysdate","system","system_user","systimestamp","table","temporary","text","then","time","timestamp","timezone_hour","timezone_minute","tinyint","to","trailing","transaction","transform","transforms","translation","treat","trigger","trim","true","truncate","under","union","unique","unknown","unlink","unnest","until","update","usage","user","using","value","values","varchar","varchar2","varray","verify","view","when","whenever","where","while","window","with","within","without","work","year","yes","zone"])}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([...k.TYPE_MAPPING,...h.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([...k.TRANSFORMS,[dt,l("EVERY")],[X,l("BIT_AND")],[W,l("BIT_OR")],[j,l("BIT_NOT")],[$,l("BIT_LSHIFT")],[Z,l("BIT_RSHIFT")],[z,l("BIT_XOR")],[st,function(t){return ge.call(this,t)}],[rt,function(t){return Nt.call(this,t)}],[ie,function(t){return Nt.call(this,t)}],[nt,function(t){return Nt.call(this,t)}],[J,l("DIV")],[ae,function(t){return ge.call(this,t)}],[Wt,function(t){return tr.call(this,t)}],[zt,function(t){return`CAST(TO_CHAR(${this.sql(t,"this")}, 'D') AS INTEGER)`}],[Zt,function(t){return Se.call(this,t)}],[oe,function(t){return Te.call(this,t,{funcName:"LISTAGG",withinGroup:!0})}],[lt,function(t){return G.call(this,t,"insCost","delCost","subCost","maxDist"),l("EDIT_DISTANCE").call(this,t)}],[Ht,l("MOD")],[St,function(t){return this.func("FROM_POSIX_TIME",[t.args.this])}],[Q,function(t){return this.func("CONVERT_TZ",[t.args.timestamp,t.args.sourceTz,t.args.targetTz,...t.args.options??[]])}],[ft,function(t){return G.call(this,t,"parameters","group"),l("REGEXP_SUBSTR").call(this,t)}],[Tt,function(t){return G.call(this,t,"modifiers"),l("REGEXP_REPLACE").call(this,t)}],[At,l("VAR_POP")],[mt,function(t){return G.call(this,t,"accuracy"),l("APPROXIMATE_COUNT_DISTINCT").call(this,t)}],[ne,function(t){return this.func("TO_CHAR",[t.args.this,this.formatTime(t)])}],[Ft,function(t){return this.func("TO_CHAR",[t.args.this,this.formatTime(t)])}],[gt,function(t){return this.func("TO_DATE",[t.args.this,this.formatTime(t)])}],[se,function(t){return Ee.call(this,t)}],[ot,function(t){return Se.call(this,t)}],[re,function(t){return this.func("TO_DATE",[t.args.this,this.formatTime(t)])}],[tt,()=>"CURRENT_SCHEMA"],[et,()=>"CURRENT_USER"],[Pt,function(t){return this.func("CONVERT_TZ",[t.args.this,"'UTC'",t.args.zone])}],[ee,function(t){return le.call(this,t,{funcName:"INSTR",supportsPosition:!0,supportsOccurrence:!0})}],[H,l("HASH_SHA")],[v,function(t){return ze.call(this,t)}],[pt,l("HASH_MD5")],[Et,l("HASHTYPE_MD5")],[K,function(t){return`COMMENT IS ${this.sql(t,"this")}`}],[q,ce([nr,Qe,rr])],[te,function(t){return er.call(this,t)}],[it,l("WEEK")],[ct,l("TO_DATE")],[at,l("TO_TIMESTAMP")],[Qt,function(t){return`CEIL(MONTH(TO_DATE(${this.sql(t,"this")}))/3)`}],[Jt,fe]])}ifSql(e){let t=this.sql(e,"this"),i=this.sql(e,"true"),E=this.sql(e,"false");return`IF ${t} THEN ${i} ELSE ${E} ENDIF`}collateSql(e){return this.sql(e.args.this)}jsonExtractSql(e){let t=this.func("JSON_EXTRACT",[e.args.this,e.args.expression,...e.args.expressions??[]]),i=e.getArgKey("emits");if(Array.isArray(i)&&0<i.length){let E=this.expressions(void 0,{sqls:i});t=`${t} EMITS (${E})`}return t}regexpLikeSql(e){if(e.args.flag&&this.unsupported("REGEXP_LIKE flag is not supported by Exasol"),!e.args.fullMatch){let t=e.args.expression;t instanceof D&&t.isString?e.setArgKey("expression",d.string(`.*${t.name}.*`)):t instanceof D&&e.setArgKey("expression",new vt({this:new Kt({expressions:[d.string(".*"),t,d.string(".*")]})}))}return this.binary(e,"REGEXP_LIKE")}noArgWindowFunc(e,t){return e.args.expressions&&0<e.args.expressions.length&&this.unsupported(`Exasol does not support arguments in ${t}`),this.func(t,[])}rankSql(e){return this.noArgWindowFunc(e,"RANK")}denserankSql(e){return this.noArgWindowFunc(e,"DENSE_RANK")}convertTimezoneSql(e){let t=e.args.timestamp,i=e.args.sourceTz,E=e.args.targetTz,m=e.args.options;return this.func("CONVERT_TZ",[t,i,E,...m??[]])}};N=M(He),o(N,10,"RESERVED_KEYWORDS",Ue,h),o(N,10,"AFTER_HAVING_MODIFIER_TRANSFORMS",Ge,h),o(N,10,"STRING_TYPE_MAPPING",we,h),o(N,10,"TYPE_MAPPING",qe,h),o(N,10,"ORIGINAL_TRANSFORMS",Pe,h),L(N,h),b(N,3,h),n(h,"ExasolGenerator"),h.SUPPORTS_DECODE_CASE=!1,h.SELECT_KINDS=[],h.TRY_SUPPORTED=!1,h.SUPPORTS_UESCAPE=!1,h.SUPPORTS_CONVERT_TIMEZONE=!0;var Ct=h,ve,ke,Fe,Be,Ye,Ke,Ve,Xe,_,g=class g extends(Xe=ue,Ve=[c],Ke=[c],Ye=[c],Be=[c],Fe=[c],ke=[c],ve=[c],Xe){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"}}};_=M(Xe),o(_,10,"NORMALIZATION_STRATEGY",Ve,g),o(_,10,"SUPPORTS_USER_DEFINED_TYPES",Ke,g),o(_,10,"SUPPORTS_SEMI_ANTI_JOIN",Ye,g),o(_,10,"SUPPORTS_COLUMN_JOIN_MARKS",Be,g),o(_,10,"NULL_ORDERING",Fe,g),o(_,10,"CONCAT_COALESCE",ke,g),o(_,10,"TIME_MAPPING",ve,g),L(_,g),b(_,3,g),n(g,"Exasol"),g.DIALECT_NAME="exasol",g.Tokenizer=Ot,g.Parser=Dt,g.Generator=Ct;var me=g;export{me as Exasol};
2
+ //# sourceMappingURL=exasol.js.map