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,488 @@
1
+ import { a as Dialects, f as TokenType, E as Expression, g as Parser, cG as EncodePropertyExpr, cH as WatermarkColumnConstraintExpr, h as Generator, v as PropertiesLocation, cI as ComputedColumnConstraintExpr, aA as DataTypeExpr } from '../tokens-DOFGCO-T.js';
2
+ import { Postgres } from './postgres.js';
3
+
4
+ declare class RisingWaveTokenizer extends Postgres.Tokenizer {
5
+ static get ORIGINAL_KEYWORDS(): {
6
+ SINK: TokenType;
7
+ SOURCE: TokenType;
8
+ };
9
+ }
10
+ declare class RisingWaveParser extends Postgres.Parser {
11
+ static get ID_VAR_TOKENS(): Set<TokenType>;
12
+ static get NO_PAREN_FUNCTIONS(): {
13
+ lParen?: typeof Expression | undefined;
14
+ rParen?: typeof Expression | undefined;
15
+ lBracket?: typeof Expression | undefined;
16
+ rBracket?: typeof Expression | undefined;
17
+ lBrace?: typeof Expression | undefined;
18
+ rBrace?: typeof Expression | undefined;
19
+ comma?: typeof Expression | undefined;
20
+ dot?: typeof Expression | undefined;
21
+ dash?: typeof Expression | undefined;
22
+ plus?: typeof Expression | undefined;
23
+ colon?: typeof Expression | undefined;
24
+ dotcolon?: typeof Expression | undefined;
25
+ dotcaret?: typeof Expression | undefined;
26
+ dcolon?: typeof Expression | undefined;
27
+ dcolondollar?: typeof Expression | undefined;
28
+ dcolonpercent?: typeof Expression | undefined;
29
+ dcolonqmark?: typeof Expression | undefined;
30
+ dqmark?: typeof Expression | undefined;
31
+ semicolon?: typeof Expression | undefined;
32
+ star?: typeof Expression | undefined;
33
+ backslash?: typeof Expression | undefined;
34
+ slash?: typeof Expression | undefined;
35
+ lt?: typeof Expression | undefined;
36
+ lte?: typeof Expression | undefined;
37
+ gt?: typeof Expression | undefined;
38
+ gte?: typeof Expression | undefined;
39
+ not?: typeof Expression | undefined;
40
+ eq?: typeof Expression | undefined;
41
+ neq?: typeof Expression | undefined;
42
+ nullsafeEq?: typeof Expression | undefined;
43
+ colonEq?: typeof Expression | undefined;
44
+ colonGt?: typeof Expression | undefined;
45
+ ncolonGt?: typeof Expression | undefined;
46
+ and?: typeof Expression | undefined;
47
+ or?: typeof Expression | undefined;
48
+ amp?: typeof Expression | undefined;
49
+ dpipe?: typeof Expression | undefined;
50
+ pipeGt?: typeof Expression | undefined;
51
+ pipe?: typeof Expression | undefined;
52
+ pipeSlash?: typeof Expression | undefined;
53
+ dpipeSlash?: typeof Expression | undefined;
54
+ caret?: typeof Expression | undefined;
55
+ caretAt?: typeof Expression | undefined;
56
+ tilde?: typeof Expression | undefined;
57
+ arrow?: typeof Expression | undefined;
58
+ darrow?: typeof Expression | undefined;
59
+ farrow?: typeof Expression | undefined;
60
+ hash?: typeof Expression | undefined;
61
+ hashArrow?: typeof Expression | undefined;
62
+ dhashArrow?: typeof Expression | undefined;
63
+ lrArrow?: typeof Expression | undefined;
64
+ dat?: typeof Expression | undefined;
65
+ ltAt?: typeof Expression | undefined;
66
+ atGt?: typeof Expression | undefined;
67
+ dollar?: typeof Expression | undefined;
68
+ parameter?: typeof Expression | undefined;
69
+ session?: typeof Expression | undefined;
70
+ sessionParameter?: typeof Expression | undefined;
71
+ sessionUser?: typeof Expression | undefined;
72
+ damp?: typeof Expression | undefined;
73
+ ampLt?: typeof Expression | undefined;
74
+ ampGt?: typeof Expression | undefined;
75
+ adjacent?: typeof Expression | undefined;
76
+ xor?: typeof Expression | undefined;
77
+ dstar?: typeof Expression | undefined;
78
+ qmarkAmp?: typeof Expression | undefined;
79
+ qmarkPipe?: typeof Expression | undefined;
80
+ hashDash?: typeof Expression | undefined;
81
+ exclamation?: typeof Expression | undefined;
82
+ uriStart?: typeof Expression | undefined;
83
+ blockStart?: typeof Expression | undefined;
84
+ blockEnd?: typeof Expression | undefined;
85
+ space?: typeof Expression | undefined;
86
+ break?: typeof Expression | undefined;
87
+ string?: typeof Expression | undefined;
88
+ number?: typeof Expression | undefined;
89
+ identifier?: typeof Expression | undefined;
90
+ database?: typeof Expression | undefined;
91
+ column?: typeof Expression | undefined;
92
+ columnDef?: typeof Expression | undefined;
93
+ schema?: typeof Expression | undefined;
94
+ table?: typeof Expression | undefined;
95
+ warehouse?: typeof Expression | undefined;
96
+ stage?: typeof Expression | undefined;
97
+ streamlit?: typeof Expression | undefined;
98
+ var?: typeof Expression | undefined;
99
+ bitString?: typeof Expression | undefined;
100
+ hexString?: typeof Expression | undefined;
101
+ byteString?: typeof Expression | undefined;
102
+ nationalString?: typeof Expression | undefined;
103
+ rawString?: typeof Expression | undefined;
104
+ heredocString?: typeof Expression | undefined;
105
+ unicodeString?: typeof Expression | undefined;
106
+ bit?: typeof Expression | undefined;
107
+ boolean?: typeof Expression | undefined;
108
+ tinyint?: typeof Expression | undefined;
109
+ utinyint?: typeof Expression | undefined;
110
+ smallint?: typeof Expression | undefined;
111
+ usmallint?: typeof Expression | undefined;
112
+ mediumint?: typeof Expression | undefined;
113
+ umediumint?: typeof Expression | undefined;
114
+ int?: typeof Expression | undefined;
115
+ uint?: typeof Expression | undefined;
116
+ bigint?: typeof Expression | undefined;
117
+ ubigint?: typeof Expression | undefined;
118
+ bignum?: typeof Expression | undefined;
119
+ int128?: typeof Expression | undefined;
120
+ uint128?: typeof Expression | undefined;
121
+ int256?: typeof Expression | undefined;
122
+ uint256?: typeof Expression | undefined;
123
+ float?: typeof Expression | undefined;
124
+ double?: typeof Expression | undefined;
125
+ udouble?: typeof Expression | undefined;
126
+ decimal?: typeof Expression | undefined;
127
+ decimal32?: typeof Expression | undefined;
128
+ decimal64?: typeof Expression | undefined;
129
+ decimal128?: typeof Expression | undefined;
130
+ decimal256?: typeof Expression | undefined;
131
+ decfloat?: typeof Expression | undefined;
132
+ udecimal?: typeof Expression | undefined;
133
+ bigdecimal?: typeof Expression | undefined;
134
+ char?: typeof Expression | undefined;
135
+ nchar?: typeof Expression | undefined;
136
+ varchar?: typeof Expression | undefined;
137
+ nvarchar?: typeof Expression | undefined;
138
+ bpchar?: typeof Expression | undefined;
139
+ text?: typeof Expression | undefined;
140
+ mediumtext?: typeof Expression | undefined;
141
+ longtext?: typeof Expression | undefined;
142
+ blob?: typeof Expression | undefined;
143
+ mediumblob?: typeof Expression | undefined;
144
+ longblob?: typeof Expression | undefined;
145
+ tinyblob?: typeof Expression | undefined;
146
+ tinytext?: typeof Expression | undefined;
147
+ name?: typeof Expression | undefined;
148
+ binary?: typeof Expression | undefined;
149
+ varbinary?: typeof Expression | undefined;
150
+ json?: typeof Expression | undefined;
151
+ jsonb?: typeof Expression | undefined;
152
+ time?: typeof Expression | undefined;
153
+ timetz?: typeof Expression | undefined;
154
+ timeNs?: typeof Expression | undefined;
155
+ timestamp?: typeof Expression | undefined;
156
+ timestamptz?: typeof Expression | undefined;
157
+ timestampltz?: typeof Expression | undefined;
158
+ timestampntz?: typeof Expression | undefined;
159
+ timestampS?: typeof Expression | undefined;
160
+ timestampMs?: typeof Expression | undefined;
161
+ timestampNs?: typeof Expression | undefined;
162
+ datetime?: typeof Expression | undefined;
163
+ datetime2?: typeof Expression | undefined;
164
+ datetime64?: typeof Expression | undefined;
165
+ smalldatetime?: typeof Expression | undefined;
166
+ date?: typeof Expression | undefined;
167
+ date32?: typeof Expression | undefined;
168
+ int4range?: typeof Expression | undefined;
169
+ int4multirange?: typeof Expression | undefined;
170
+ int8range?: typeof Expression | undefined;
171
+ int8multirange?: typeof Expression | undefined;
172
+ numrange?: typeof Expression | undefined;
173
+ nummultirange?: typeof Expression | undefined;
174
+ tsrange?: typeof Expression | undefined;
175
+ tsmultirange?: typeof Expression | undefined;
176
+ tstzrange?: typeof Expression | undefined;
177
+ tstzmultirange?: typeof Expression | undefined;
178
+ daterange?: typeof Expression | undefined;
179
+ datemultirange?: typeof Expression | undefined;
180
+ uuid?: typeof Expression | undefined;
181
+ geography?: typeof Expression | undefined;
182
+ geographypoint?: typeof Expression | undefined;
183
+ nullable?: typeof Expression | undefined;
184
+ geometry?: typeof Expression | undefined;
185
+ point?: typeof Expression | undefined;
186
+ ring?: typeof Expression | undefined;
187
+ linestring?: typeof Expression | undefined;
188
+ localtime?: typeof Expression | undefined;
189
+ localtimestamp?: typeof Expression | undefined;
190
+ systimestamp?: typeof Expression | undefined;
191
+ multilinestring?: typeof Expression | undefined;
192
+ polygon?: typeof Expression | undefined;
193
+ multipolygon?: typeof Expression | undefined;
194
+ hllsketch?: typeof Expression | undefined;
195
+ hstore?: typeof Expression | undefined;
196
+ super?: typeof Expression | undefined;
197
+ serial?: typeof Expression | undefined;
198
+ smallserial?: typeof Expression | undefined;
199
+ bigserial?: typeof Expression | undefined;
200
+ xml?: typeof Expression | undefined;
201
+ year?: typeof Expression | undefined;
202
+ userdefined?: typeof Expression | undefined;
203
+ money?: typeof Expression | undefined;
204
+ smallmoney?: typeof Expression | undefined;
205
+ rowversion?: typeof Expression | undefined;
206
+ image?: typeof Expression | undefined;
207
+ variant?: typeof Expression | undefined;
208
+ object?: typeof Expression | undefined;
209
+ inet?: typeof Expression | undefined;
210
+ ipaddress?: typeof Expression | undefined;
211
+ ipprefix?: typeof Expression | undefined;
212
+ ipv4?: typeof Expression | undefined;
213
+ ipv6?: typeof Expression | undefined;
214
+ enum?: typeof Expression | undefined;
215
+ enum8?: typeof Expression | undefined;
216
+ enum16?: typeof Expression | undefined;
217
+ fixedstring?: typeof Expression | undefined;
218
+ lowcardinality?: typeof Expression | undefined;
219
+ nested?: typeof Expression | undefined;
220
+ aggregatefunction?: typeof Expression | undefined;
221
+ simpleaggregatefunction?: typeof Expression | undefined;
222
+ tdigest?: typeof Expression | undefined;
223
+ unknown?: typeof Expression | undefined;
224
+ vector?: typeof Expression | undefined;
225
+ dynamic?: typeof Expression | undefined;
226
+ void?: typeof Expression | undefined;
227
+ alias?: typeof Expression | undefined;
228
+ alter?: typeof Expression | undefined;
229
+ all?: typeof Expression | undefined;
230
+ anti?: typeof Expression | undefined;
231
+ any?: typeof Expression | undefined;
232
+ apply?: typeof Expression | undefined;
233
+ array?: typeof Expression | undefined;
234
+ asc?: typeof Expression | undefined;
235
+ asof?: typeof Expression | undefined;
236
+ attach?: typeof Expression | undefined;
237
+ autoIncrement?: typeof Expression | undefined;
238
+ begin?: typeof Expression | undefined;
239
+ between?: typeof Expression | undefined;
240
+ bulkCollectInto?: typeof Expression | undefined;
241
+ cache?: typeof Expression | undefined;
242
+ case?: typeof Expression | undefined;
243
+ characterSet?: typeof Expression | undefined;
244
+ clusterBy?: typeof Expression | undefined;
245
+ collate?: typeof Expression | undefined;
246
+ command?: typeof Expression | undefined;
247
+ comment?: typeof Expression | undefined;
248
+ commit?: typeof Expression | undefined;
249
+ connectBy?: typeof Expression | undefined;
250
+ constraint?: typeof Expression | undefined;
251
+ copy?: typeof Expression | undefined;
252
+ create?: typeof Expression | undefined;
253
+ cross?: typeof Expression | undefined;
254
+ cube?: typeof Expression | undefined;
255
+ currentDate?: typeof Expression | undefined;
256
+ currentDatetime?: typeof Expression | undefined;
257
+ currentSchema?: typeof Expression | undefined;
258
+ currentTime?: typeof Expression | undefined;
259
+ currentTimestamp?: typeof Expression | undefined;
260
+ currentUser?: typeof Expression | undefined;
261
+ currentRole?: typeof Expression | undefined;
262
+ currentCatalog?: typeof Expression | undefined;
263
+ declare?: typeof Expression | undefined;
264
+ default?: typeof Expression | undefined;
265
+ delete?: typeof Expression | undefined;
266
+ desc?: typeof Expression | undefined;
267
+ describe?: typeof Expression | undefined;
268
+ detach?: typeof Expression | undefined;
269
+ dictionary?: typeof Expression | undefined;
270
+ distinct?: typeof Expression | undefined;
271
+ distributeBy?: typeof Expression | undefined;
272
+ div?: typeof Expression | undefined;
273
+ drop?: typeof Expression | undefined;
274
+ else?: typeof Expression | undefined;
275
+ end?: typeof Expression | undefined;
276
+ escape?: typeof Expression | undefined;
277
+ except?: typeof Expression | undefined;
278
+ execute?: typeof Expression | undefined;
279
+ exists?: typeof Expression | undefined;
280
+ false?: typeof Expression | undefined;
281
+ fetch?: typeof Expression | undefined;
282
+ file?: typeof Expression | undefined;
283
+ fileFormat?: typeof Expression | undefined;
284
+ filter?: typeof Expression | undefined;
285
+ final?: typeof Expression | undefined;
286
+ first?: typeof Expression | undefined;
287
+ for?: typeof Expression | undefined;
288
+ force?: typeof Expression | undefined;
289
+ foreignKey?: typeof Expression | undefined;
290
+ format?: typeof Expression | undefined;
291
+ from?: typeof Expression | undefined;
292
+ full?: typeof Expression | undefined;
293
+ function?: typeof Expression | undefined;
294
+ get?: typeof Expression | undefined;
295
+ glob?: typeof Expression | undefined;
296
+ global?: typeof Expression | undefined;
297
+ grant?: typeof Expression | undefined;
298
+ groupBy?: typeof Expression | undefined;
299
+ groupingSets?: typeof Expression | undefined;
300
+ having?: typeof Expression | undefined;
301
+ hint?: typeof Expression | undefined;
302
+ ignore?: typeof Expression | undefined;
303
+ ilike?: typeof Expression | undefined;
304
+ in?: typeof Expression | undefined;
305
+ index?: typeof Expression | undefined;
306
+ indexedBy?: typeof Expression | undefined;
307
+ inner?: typeof Expression | undefined;
308
+ insert?: typeof Expression | undefined;
309
+ install?: typeof Expression | undefined;
310
+ integration?: typeof Expression | undefined;
311
+ intersect?: typeof Expression | undefined;
312
+ interval?: typeof Expression | undefined;
313
+ into?: typeof Expression | undefined;
314
+ introducer?: typeof Expression | undefined;
315
+ irlike?: typeof Expression | undefined;
316
+ is?: typeof Expression | undefined;
317
+ isnull?: typeof Expression | undefined;
318
+ join?: typeof Expression | undefined;
319
+ joinMarker?: typeof Expression | undefined;
320
+ keep?: typeof Expression | undefined;
321
+ key?: typeof Expression | undefined;
322
+ kill?: typeof Expression | undefined;
323
+ language?: typeof Expression | undefined;
324
+ lateral?: typeof Expression | undefined;
325
+ left?: typeof Expression | undefined;
326
+ like?: typeof Expression | undefined;
327
+ limit?: typeof Expression | undefined;
328
+ list?: typeof Expression | undefined;
329
+ load?: typeof Expression | undefined;
330
+ lock?: typeof Expression | undefined;
331
+ map?: typeof Expression | undefined;
332
+ match?: typeof Expression | undefined;
333
+ matchCondition?: typeof Expression | undefined;
334
+ matchRecognize?: typeof Expression | undefined;
335
+ memberOf?: typeof Expression | undefined;
336
+ merge?: typeof Expression | undefined;
337
+ mod?: typeof Expression | undefined;
338
+ model?: typeof Expression | undefined;
339
+ natural?: typeof Expression | undefined;
340
+ next?: typeof Expression | undefined;
341
+ nothing?: typeof Expression | undefined;
342
+ notnull?: typeof Expression | undefined;
343
+ null?: typeof Expression | undefined;
344
+ objectIdentifier?: typeof Expression | undefined;
345
+ offset?: typeof Expression | undefined;
346
+ on?: typeof Expression | undefined;
347
+ only?: typeof Expression | undefined;
348
+ operator?: typeof Expression | undefined;
349
+ orderBy?: typeof Expression | undefined;
350
+ orderSiblingsBy?: typeof Expression | undefined;
351
+ ordered?: typeof Expression | undefined;
352
+ ordinality?: typeof Expression | undefined;
353
+ out?: typeof Expression | undefined;
354
+ inout?: typeof Expression | undefined;
355
+ outer?: typeof Expression | undefined;
356
+ over?: typeof Expression | undefined;
357
+ overlaps?: typeof Expression | undefined;
358
+ overwrite?: typeof Expression | undefined;
359
+ package?: typeof Expression | undefined;
360
+ partition?: typeof Expression | undefined;
361
+ partitionBy?: typeof Expression | undefined;
362
+ percent?: typeof Expression | undefined;
363
+ pivot?: typeof Expression | undefined;
364
+ placeholder?: typeof Expression | undefined;
365
+ policy?: typeof Expression | undefined;
366
+ pool?: typeof Expression | undefined;
367
+ positional?: typeof Expression | undefined;
368
+ pragma?: typeof Expression | undefined;
369
+ prewhere?: typeof Expression | undefined;
370
+ primaryKey?: typeof Expression | undefined;
371
+ procedure?: typeof Expression | undefined;
372
+ properties?: typeof Expression | undefined;
373
+ pseudoType?: typeof Expression | undefined;
374
+ put?: typeof Expression | undefined;
375
+ qualify?: typeof Expression | undefined;
376
+ quote?: typeof Expression | undefined;
377
+ qdcolon?: typeof Expression | undefined;
378
+ range?: typeof Expression | undefined;
379
+ recursive?: typeof Expression | undefined;
380
+ refresh?: typeof Expression | undefined;
381
+ rename?: typeof Expression | undefined;
382
+ replace?: typeof Expression | undefined;
383
+ returning?: typeof Expression | undefined;
384
+ revoke?: typeof Expression | undefined;
385
+ references?: typeof Expression | undefined;
386
+ right?: typeof Expression | undefined;
387
+ rlike?: typeof Expression | undefined;
388
+ role?: typeof Expression | undefined;
389
+ rollback?: typeof Expression | undefined;
390
+ rollup?: typeof Expression | undefined;
391
+ row?: typeof Expression | undefined;
392
+ rule?: typeof Expression | undefined;
393
+ rows?: typeof Expression | undefined;
394
+ select?: typeof Expression | undefined;
395
+ semi?: typeof Expression | undefined;
396
+ separator?: typeof Expression | undefined;
397
+ sequence?: typeof Expression | undefined;
398
+ serdeProperties?: typeof Expression | undefined;
399
+ set?: typeof Expression | undefined;
400
+ settings?: typeof Expression | undefined;
401
+ show?: typeof Expression | undefined;
402
+ similarTo?: typeof Expression | undefined;
403
+ some?: typeof Expression | undefined;
404
+ sortBy?: typeof Expression | undefined;
405
+ soundsLike?: typeof Expression | undefined;
406
+ sqlSecurity?: typeof Expression | undefined;
407
+ startWith?: typeof Expression | undefined;
408
+ storageIntegration?: typeof Expression | undefined;
409
+ straightJoin?: typeof Expression | undefined;
410
+ struct?: typeof Expression | undefined;
411
+ summarize?: typeof Expression | undefined;
412
+ tableSample?: typeof Expression | undefined;
413
+ tag?: typeof Expression | undefined;
414
+ temporary?: typeof Expression | undefined;
415
+ top?: typeof Expression | undefined;
416
+ then?: typeof Expression | undefined;
417
+ true?: typeof Expression | undefined;
418
+ trigger?: typeof Expression | undefined;
419
+ truncate?: typeof Expression | undefined;
420
+ uncache?: typeof Expression | undefined;
421
+ union?: typeof Expression | undefined;
422
+ unnest?: typeof Expression | undefined;
423
+ unpivot?: typeof Expression | undefined;
424
+ update?: typeof Expression | undefined;
425
+ use?: typeof Expression | undefined;
426
+ using?: typeof Expression | undefined;
427
+ values?: typeof Expression | undefined;
428
+ variadic?: typeof Expression | undefined;
429
+ view?: typeof Expression | undefined;
430
+ semanticView?: typeof Expression | undefined;
431
+ volatile?: typeof Expression | undefined;
432
+ volume?: typeof Expression | undefined;
433
+ when?: typeof Expression | undefined;
434
+ where?: typeof Expression | undefined;
435
+ window?: typeof Expression | undefined;
436
+ with?: typeof Expression | undefined;
437
+ unique?: typeof Expression | undefined;
438
+ utcDate?: typeof Expression | undefined;
439
+ utcTime?: typeof Expression | undefined;
440
+ utcTimestamp?: typeof Expression | undefined;
441
+ versionSnapshot?: typeof Expression | undefined;
442
+ timestampSnapshot?: typeof Expression | undefined;
443
+ option?: typeof Expression | undefined;
444
+ sink?: typeof Expression | undefined;
445
+ source?: typeof Expression | undefined;
446
+ analyze?: typeof Expression | undefined;
447
+ namespace?: typeof Expression | undefined;
448
+ export?: typeof Expression | undefined;
449
+ hiveTokenStream?: typeof Expression | undefined;
450
+ };
451
+ static WRAPPED_TRANSFORM_COLUMN_CONSTRAINT: boolean;
452
+ static get PROPERTY_PARSERS(): {
453
+ ENCODE: (this: Parser) => EncodePropertyExpr;
454
+ INCLUDE: (this: Parser) => Expression | undefined;
455
+ KEY: (this: Parser) => EncodePropertyExpr;
456
+ };
457
+ static get CONSTRAINT_PARSERS(): {
458
+ WATERMARK: (this: Parser) => WatermarkColumnConstraintExpr;
459
+ };
460
+ static get SCHEMA_UNNAMED_CONSTRAINTS(): Set<string>;
461
+ parseTableHints(): Expression[] | undefined;
462
+ parseIncludeProperty(): Expression | undefined;
463
+ parseEncodeProperty(key?: boolean | undefined): EncodePropertyExpr;
464
+ static get TABLE_ALIAS_TOKENS(): Set<TokenType>;
465
+ }
466
+ declare class RisingWaveGenerator extends Postgres.Generator {
467
+ static get AFTER_HAVING_MODIFIER_TRANSFORMS(): Map<string, (this: Generator, e: Expression) => string>;
468
+ static SUPPORTS_DECODE_CASE: boolean;
469
+ static TRY_SUPPORTED: boolean;
470
+ static SUPPORTS_UESCAPE: boolean;
471
+ static LOCKING_READS_SUPPORTED: boolean;
472
+ static SUPPORTS_BETWEEN_FLAGS: boolean;
473
+ static get ORIGINAL_TRANSFORMS(): Map<typeof Expression, (this: Generator, e: any) => string>;
474
+ static get PROPERTIES_LOCATION(): Map<typeof Expression, PropertiesLocation>;
475
+ static get EXPRESSION_PRECEDES_PROPERTIES_CREATABLES(): Set<string>;
476
+ computedColumnConstraintSql(expression: ComputedColumnConstraintExpr): string;
477
+ dataTypeSql(expression: DataTypeExpr): string;
478
+ }
479
+ declare class RisingWave extends Postgres {
480
+ static DIALECT_NAME: Dialects;
481
+ static REQUIRES_PARENTHESIZED_STRUCT_ACCESS: boolean;
482
+ static SUPPORTS_STRUCT_STAR_EXPANSION: boolean;
483
+ static Tokenizer: typeof RisingWaveTokenizer;
484
+ static Parser: typeof RisingWaveParser;
485
+ static Generator: typeof RisingWaveGenerator;
486
+ }
487
+
488
+ export { RisingWave };
@@ -0,0 +1,2 @@
1
+ import{b as r}from"../chunk-R2XOYY2B.js";import"../chunk-KNRQDMQ7.js";import{Cc as f,Gv as D,Ug as N,a as p,b as c,c as P,d as u,e as s,kc as C,ob as l,s as E,ti as m,ui as x,wi as y}from"../chunk-RGKTYIN3.js";var M,_,O,A=class A extends(_=r.Tokenizer,M=[E],_){static get ORIGINAL_KEYWORDS(){return{...r.Tokenizer.KEYWORDS,SINK:"sink",SOURCE:"source"}}};O=c(_),s(O,10,"ORIGINAL_KEYWORDS",M,A),P(O,A),u(O,3,A),p(A,"RisingWaveTokenizer");var I=A,F,U,K,q,H,V,w,a,o=class o extends(w=r.Parser,V=[E],H=[E],q=[E],K=[E],U=[E],F=[E],w){static get ID_VAR_TOKENS(){return new Set([...l.ID_VAR_TOKENS,"sessionUser","currentCatalog","straightJoin"])}static get NO_PAREN_FUNCTIONS(){let t={...r.Parser.NO_PAREN_FUNCTIONS};return delete t.localtime,delete t.localtimestamp,t}static get PROPERTY_PARSERS(){return{...r.Parser.PROPERTY_PARSERS,ENCODE:p(function(){return this.parseEncodeProperty()},"ENCODE"),INCLUDE:p(function(){return this.parseIncludeProperty()},"INCLUDE"),KEY:p(function(){return this.parseEncodeProperty(!0)},"KEY")}}static get CONSTRAINT_PARSERS(){return{...r.Parser.CONSTRAINT_PARSERS,WATERMARK:p(function(){return this.expression(f,{this:this.match("for")&&this.parseColumn(),expression:this.match("alias")&&this.parseDisjunction()})},"WATERMARK")}}static get SCHEMA_UNNAMED_CONSTRAINTS(){return new Set([...r.Parser.SCHEMA_UNNAMED_CONSTRAINTS,"WATERMARK"])}parseTableHints(){}parseIncludeProperty(){let t,n,i=this.parseVarOrString();this.match("alias")||(t=this.parseField(),t&&(n=this.expression(C,{this:t,kind:this.parseTypes()}))),this.match("alias");let X=this.parseIdVar({tokens:this.constructor.ALIAS_TOKENS});return this.expression(x,{this:i,alias:X,columnDef:n})}parseEncodeProperty(t){this.matchTextSeq("ENCODE");let n=this.parseVarOrString(),i;return this.match("lParen",{advance:!1})&&(i=this.expression(y,{expressions:this.parseWrappedProperties()})),this.expression(m,{this:n,properties:i,key:t})}static get TABLE_ALIAS_TOKENS(){return new Set([...r.Parser.TABLE_ALIAS_TOKENS,"straightJoin"])}};a=c(w),s(a,10,"ID_VAR_TOKENS",V,o),s(a,10,"NO_PAREN_FUNCTIONS",H,o),s(a,10,"PROPERTY_PARSERS",q,o),s(a,10,"CONSTRAINT_PARSERS",K,o),s(a,10,"SCHEMA_UNNAMED_CONSTRAINTS",U,o),s(a,10,"TABLE_ALIAS_TOKENS",F,o),P(a,o),u(a,3,o),p(o,"RisingWaveParser"),o.WRAPPED_TRANSFORM_COLUMN_CONSTRAINT=!1;var d=o,k,Y,G,B,b,T,e=class e extends(b=r.Generator,B=[E],G=[E],Y=[E],k=[E],b){static get AFTER_HAVING_MODIFIER_TRANSFORMS(){let t=new Map(super.AFTER_HAVING_MODIFIER_TRANSFORMS);return["cluster","distribute","sort"].forEach(n=>t.delete(n)),t}static get ORIGINAL_TRANSFORMS(){return new Map([...r.Generator.TRANSFORMS,[N,function(n){return`FORMAT ${this.sql(n.args.this)}`}]])}static get PROPERTIES_LOCATION(){let t=new Map(r.Generator.PROPERTIES_LOCATION);return t.set(N,"postExpression"),t}static get EXPRESSION_PRECEDES_PROPERTIES_CREATABLES(){return new Set(["SINK"])}computedColumnConstraintSql(t){return D.prototype.computedColumnConstraintSql.call(this,t)}dataTypeSql(t){if(t.isType("map")&&t.args.expressions?.length===2){let[n,i]=t.args.expressions;return`MAP(${this.sql(n)}, ${this.sql(i)})`}return super.dataTypeSql(t)}};T=c(b),s(T,10,"AFTER_HAVING_MODIFIER_TRANSFORMS",B,e),s(T,10,"ORIGINAL_TRANSFORMS",G,e),s(T,10,"PROPERTIES_LOCATION",Y,e),s(T,10,"EXPRESSION_PRECEDES_PROPERTIES_CREATABLES",k,e),P(T,e),u(T,3,e),p(e,"RisingWaveGenerator"),e.SUPPORTS_DECODE_CASE=!1,e.TRY_SUPPORTED=!1,e.SUPPORTS_UESCAPE=!1,e.LOCKING_READS_SUPPORTED=!1,e.SUPPORTS_BETWEEN_FLAGS=!1;var h=e,S=class S extends r{};p(S,"RisingWave"),S.DIALECT_NAME="risingwave",S.REQUIRES_PARENTHESIZED_STRUCT_ACCESS=!0,S.SUPPORTS_STRUCT_STAR_EXPANSION=!0,S.Tokenizer=I,S.Parser=d,S.Generator=h;var L=S;export{L as RisingWave};
2
+ //# sourceMappingURL=risingwave.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/dialects/risingwave.ts"],"sourcesContent":["import {\n Generator,\n} from '../generator';\nimport type {\n Expression,\n DataTypeExpr,\n ComputedColumnConstraintExpr,\n} from '../expressions';\nimport {\n PropertiesExpr,\n DataTypeExprKind,\n PropertiesLocation,\n FileFormatPropertyExpr,\n EncodePropertyExpr,\n WatermarkColumnConstraintExpr,\n ColumnDefExpr,\n IncludePropertyExpr,\n} from '../expressions';\nimport {\n TokenType,\n} from '../tokens';\nimport {\n Parser,\n} from '../parser';\nimport {\n cache,\n} from '../port_internals';\nimport {\n Dialects,\n} from './dialect';\nimport {\n Postgres,\n} from './postgres';\n\nclass RisingWaveTokenizer extends Postgres.Tokenizer {\n @cache\n static get ORIGINAL_KEYWORDS () {\n return {\n ...Postgres.Tokenizer.KEYWORDS,\n SINK: TokenType.SINK,\n SOURCE: TokenType.SOURCE,\n };\n }\n}\n\nclass RisingWaveParser extends Postgres.Parser {\n @cache\n static get ID_VAR_TOKENS (): Set<TokenType> {\n return new Set([\n ...Parser.ID_VAR_TOKENS,\n TokenType.SESSION_USER,\n TokenType.CURRENT_CATALOG,\n TokenType.STRAIGHT_JOIN,\n ]);\n }\n\n // port from _Dialect metaclass logic\n @cache\n static get NO_PAREN_FUNCTIONS () {\n const noParenFunctions = {\n ...Postgres.Parser.NO_PAREN_FUNCTIONS,\n };\n\n delete noParenFunctions[TokenType.LOCALTIME];\n delete noParenFunctions[TokenType.LOCALTIMESTAMP];\n\n return noParenFunctions;\n }\n\n static WRAPPED_TRANSFORM_COLUMN_CONSTRAINT = false;\n\n @cache\n static get PROPERTY_PARSERS () {\n return {\n ...Postgres.Parser.PROPERTY_PARSERS,\n ENCODE: function (this: Parser) {\n return (this as RisingWaveParser).parseEncodeProperty();\n },\n INCLUDE: function (this: Parser) {\n return (this as RisingWaveParser).parseIncludeProperty();\n },\n KEY: function (this: Parser) {\n return (this as RisingWaveParser).parseEncodeProperty(true);\n },\n };\n }\n\n @cache\n static get CONSTRAINT_PARSERS () {\n return {\n ...Postgres.Parser.CONSTRAINT_PARSERS,\n WATERMARK: function (this: Parser) {\n return this.expression(WatermarkColumnConstraintExpr, {\n this: (this as RisingWaveParser).match(TokenType.FOR) && (this as RisingWaveParser).parseColumn(),\n expression: (this as RisingWaveParser).match(TokenType.ALIAS) && (this as RisingWaveParser).parseDisjunction(),\n });\n },\n };\n }\n\n @cache\n static get SCHEMA_UNNAMED_CONSTRAINTS () {\n return new Set([\n ...Postgres.Parser.SCHEMA_UNNAMED_CONSTRAINTS,\n 'WATERMARK',\n ]);\n }\n\n parseTableHints (): Expression[] | undefined {\n // There is no hint in risingwave\n // Do nothing here to avoid WITH keywords conflict in CREATE SINK statement\n return undefined;\n }\n\n parseIncludeProperty (): Expression | undefined {\n let header: Expression | undefined = undefined;\n let coldef: Expression | undefined = undefined;\n\n const thisNode = this.parseVarOrString();\n\n if (!this.match(TokenType.ALIAS)) {\n header = this.parseField();\n if (header) {\n coldef = this.expression(ColumnDefExpr, {\n this: header,\n kind: this.parseTypes(),\n });\n }\n }\n\n this.match(TokenType.ALIAS);\n const alias = this.parseIdVar({\n tokens: (this.constructor as typeof RisingWaveParser).ALIAS_TOKENS,\n });\n\n return this.expression(IncludePropertyExpr, {\n this: thisNode,\n alias: alias,\n columnDef: coldef,\n });\n }\n\n parseEncodeProperty (key?: boolean | undefined): EncodePropertyExpr {\n this.matchTextSeq('ENCODE');\n const thisNode = this.parseVarOrString();\n\n let properties: PropertiesExpr | undefined = undefined;\n\n if (this.match(TokenType.L_PAREN, {\n advance: false,\n })) {\n properties = this.expression(PropertiesExpr, {\n expressions: this.parseWrappedProperties(),\n });\n }\n\n return this.expression(EncodePropertyExpr, {\n this: thisNode,\n properties: properties,\n key: key,\n });\n }\n\n // port from _Dialect metaclass logic\n @cache\n static get TABLE_ALIAS_TOKENS (): Set<TokenType> {\n return new Set([\n ...Postgres.Parser.TABLE_ALIAS_TOKENS,\n TokenType.STRAIGHT_JOIN,\n ]);\n }\n}\nclass RisingWaveGenerator extends Postgres.Generator {\n // port from _Dialect metaclass logic\n @cache\n static get AFTER_HAVING_MODIFIER_TRANSFORMS () {\n const modifiers = new Map(super.AFTER_HAVING_MODIFIER_TRANSFORMS);\n\n [\n 'cluster',\n 'distribute',\n 'sort',\n ].forEach((m) => modifiers.delete(m));\n\n return modifiers;\n }\n\n // port from _Dialect metaclass logic\n static SUPPORTS_DECODE_CASE = false;\n // port from _Dialect metaclass logic\n static TRY_SUPPORTED = false;\n // port from _Dialect metaclass logic\n static SUPPORTS_UESCAPE = false;\n static LOCKING_READS_SUPPORTED = false;\n static SUPPORTS_BETWEEN_FLAGS = false;\n\n @cache\n\n static get ORIGINAL_TRANSFORMS (): Map<typeof Expression, (this: Generator, e: any) => string> {\n\n const transforms = new Map<typeof Expression, (this: Generator, e: any) => string>([\n ...Postgres.Generator.TRANSFORMS,\n [\n FileFormatPropertyExpr,\n function (this: Generator, e: FileFormatPropertyExpr) {\n return `FORMAT ${this.sql(e.args.this)}`;\n },\n ],\n ]);\n\n return transforms;\n }\n\n @cache\n static get PROPERTIES_LOCATION () {\n const m = new Map(Postgres.Generator.PROPERTIES_LOCATION);\n\n m.set(FileFormatPropertyExpr, PropertiesLocation.POST_EXPRESSION);\n\n return m;\n }\n\n @cache\n static get EXPRESSION_PRECEDES_PROPERTIES_CREATABLES () {\n return new Set(['SINK']);\n }\n\n computedColumnConstraintSql (expression: ComputedColumnConstraintExpr): string {\n return Generator.prototype.computedColumnConstraintSql.call(this, expression);\n }\n\n dataTypeSql (expression: DataTypeExpr): string {\n if (expression.isType(DataTypeExprKind.MAP) && expression.args.expressions?.length === 2) {\n const [\n keyType,\n valueType,\n ] = expression.args.expressions;\n\n return `MAP(${this.sql(keyType)}, ${this.sql(valueType)})`;\n }\n\n return super.dataTypeSql(expression);\n }\n}\n\nexport class RisingWave extends Postgres {\n static DIALECT_NAME = Dialects.RISINGWAVE;\n static REQUIRES_PARENTHESIZED_STRUCT_ACCESS = true;\n static SUPPORTS_STRUCT_STAR_EXPANSION = true;\n\n static Tokenizer = RisingWaveTokenizer;\n static Parser = RisingWaveParser;\n static Generator = RisingWaveGenerator;\n}\n"],"mappings":"kN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AAI,EAAAL,GAGEM,EAAAL,EAAA,GAAW,mCADXkC,EAFIC,GA0BJ9B,EAAAL,EAAA,GAAW,sBAFXiC,EAxBIE,GA0CJ9B,EAAAL,EAAA,GAAW,sBADXgC,EAzCIG,GAmDJ9B,EAAAL,EAAA,GAAW,4CADX+B,EAlDII,GAAN7B,EAAAN,EAAMmC,GAAN5B,EAAAP,EAAA,EAAMmC,GAA+C3B,EAAA2B,EAAA,uBAA/CA,EAgBG,qBAAuB,GAhB1BA,EAkBG,cAAgB,GAlBnBA,EAoBG,iBAAmB,GApBtBA,EAqBG,wBAA0B,GArB7BA,EAsBG,uBAAyB,GAtBlC,IAAMS,EAANT,EAyEaU,EAAN,MAAMA,UAAmB3C,CAAS,CAQzC,EARyCM,EAAAqC,EAAA,cAA5BA,EACJ,aAAe,aADXA,EAEJ,qCAAuC,GAFnCA,EAGJ,+BAAiC,GAH7BA,EAKJ,UAAYpC,EALRoC,EAMJ,OAASf,EANLe,EAOJ,UAAYD,EAPd,IAAME,EAAND","names":["_ORIGINAL_KEYWORDS_dec","_a","_init","_RisingWaveTokenizer","Postgres","cache","__decoratorStart","__decorateElement","__decoratorMetadata","__runInitializers","__name","RisingWaveTokenizer","_TABLE_ALIAS_TOKENS_dec","_SCHEMA_UNNAMED_CONSTRAINTS_dec","_CONSTRAINT_PARSERS_dec","_PROPERTY_PARSERS_dec","_NO_PAREN_FUNCTIONS_dec","_ID_VAR_TOKENS_dec","_RisingWaveParser","Parser","noParenFunctions","WatermarkColumnConstraintExpr","header","coldef","thisNode","ColumnDefExpr","alias","IncludePropertyExpr","key","properties","PropertiesExpr","EncodePropertyExpr","RisingWaveParser","_EXPRESSION_PRECEDES_PROPERTIES_CREATABLES_dec","_PROPERTIES_LOCATION_dec","_ORIGINAL_TRANSFORMS_dec","_AFTER_HAVING_MODIFIER_TRANSFORMS_dec","_RisingWaveGenerator","modifiers","m","FileFormatPropertyExpr","e","expression","Generator","keyType","valueType","RisingWaveGenerator","_RisingWave","RisingWave"]}