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,549 @@
1
+ import { D as Dialect, a as Dialects, N as NormalizationStrategy, d as Tokenizer, e as TokenPair, f as TokenType, g as Parser, E as Expression, dV as LockingStatementExpr, dW as RangeNExpr, dX as TranslateCharactersExpr, h as Generator, i as DataTypeExprKind, v as PropertiesLocation, cs as CurrentTimestampExpr, aD as CreateExpr, H as TryCastExpr, aU as TableSampleExpr, at as PartitionedByPropertyExpr, dY as UpdateExpr, x as ModExpr, aA as DataTypeExpr, aa as ExtractExpr, cx as IntervalExpr } from '../tokens-DOFGCO-T.js';
2
+
3
+ declare class TeradataTokenizer extends Tokenizer {
4
+ static get HEX_STRINGS(): TokenPair[];
5
+ static get ORIGINAL_KEYWORDS(): Record<string, TokenType>;
6
+ static get SINGLE_TOKENS(): Record<string, TokenType>;
7
+ }
8
+ declare class TeradataParser extends Parser {
9
+ static get ID_VAR_TOKENS(): Set<TokenType>;
10
+ static get NO_PAREN_FUNCTIONS(): {
11
+ lParen?: typeof Expression | undefined;
12
+ rParen?: typeof Expression | undefined;
13
+ lBracket?: typeof Expression | undefined;
14
+ rBracket?: typeof Expression | undefined;
15
+ lBrace?: typeof Expression | undefined;
16
+ rBrace?: typeof Expression | undefined;
17
+ comma?: typeof Expression | undefined;
18
+ dot?: typeof Expression | undefined;
19
+ dash?: typeof Expression | undefined;
20
+ plus?: typeof Expression | undefined;
21
+ colon?: typeof Expression | undefined;
22
+ dotcolon?: typeof Expression | undefined;
23
+ dotcaret?: typeof Expression | undefined;
24
+ dcolon?: typeof Expression | undefined;
25
+ dcolondollar?: typeof Expression | undefined;
26
+ dcolonpercent?: typeof Expression | undefined;
27
+ dcolonqmark?: typeof Expression | undefined;
28
+ dqmark?: typeof Expression | undefined;
29
+ semicolon?: typeof Expression | undefined;
30
+ star?: typeof Expression | undefined;
31
+ backslash?: typeof Expression | undefined;
32
+ slash?: typeof Expression | undefined;
33
+ lt?: typeof Expression | undefined;
34
+ lte?: typeof Expression | undefined;
35
+ gt?: typeof Expression | undefined;
36
+ gte?: typeof Expression | undefined;
37
+ not?: typeof Expression | undefined;
38
+ eq?: typeof Expression | undefined;
39
+ neq?: typeof Expression | undefined;
40
+ nullsafeEq?: typeof Expression | undefined;
41
+ colonEq?: typeof Expression | undefined;
42
+ colonGt?: typeof Expression | undefined;
43
+ ncolonGt?: typeof Expression | undefined;
44
+ and?: typeof Expression | undefined;
45
+ or?: typeof Expression | undefined;
46
+ amp?: typeof Expression | undefined;
47
+ dpipe?: typeof Expression | undefined;
48
+ pipeGt?: typeof Expression | undefined;
49
+ pipe?: typeof Expression | undefined;
50
+ pipeSlash?: typeof Expression | undefined;
51
+ dpipeSlash?: typeof Expression | undefined;
52
+ caret?: typeof Expression | undefined;
53
+ caretAt?: typeof Expression | undefined;
54
+ tilde?: typeof Expression | undefined;
55
+ arrow?: typeof Expression | undefined;
56
+ darrow?: typeof Expression | undefined;
57
+ farrow?: typeof Expression | undefined;
58
+ hash?: typeof Expression | undefined;
59
+ hashArrow?: typeof Expression | undefined;
60
+ dhashArrow?: typeof Expression | undefined;
61
+ lrArrow?: typeof Expression | undefined;
62
+ dat?: typeof Expression | undefined;
63
+ ltAt?: typeof Expression | undefined;
64
+ atGt?: typeof Expression | undefined;
65
+ dollar?: typeof Expression | undefined;
66
+ parameter?: typeof Expression | undefined;
67
+ session?: typeof Expression | undefined;
68
+ sessionParameter?: typeof Expression | undefined;
69
+ sessionUser?: typeof Expression | undefined;
70
+ damp?: typeof Expression | undefined;
71
+ ampLt?: typeof Expression | undefined;
72
+ ampGt?: typeof Expression | undefined;
73
+ adjacent?: typeof Expression | undefined;
74
+ xor?: typeof Expression | undefined;
75
+ dstar?: typeof Expression | undefined;
76
+ qmarkAmp?: typeof Expression | undefined;
77
+ qmarkPipe?: typeof Expression | undefined;
78
+ hashDash?: typeof Expression | undefined;
79
+ exclamation?: typeof Expression | undefined;
80
+ uriStart?: typeof Expression | undefined;
81
+ blockStart?: typeof Expression | undefined;
82
+ blockEnd?: typeof Expression | undefined;
83
+ space?: typeof Expression | undefined;
84
+ break?: typeof Expression | undefined;
85
+ string?: typeof Expression | undefined;
86
+ number?: typeof Expression | undefined;
87
+ identifier?: typeof Expression | undefined;
88
+ database?: typeof Expression | undefined;
89
+ column?: typeof Expression | undefined;
90
+ columnDef?: typeof Expression | undefined;
91
+ schema?: typeof Expression | undefined;
92
+ table?: typeof Expression | undefined;
93
+ warehouse?: typeof Expression | undefined;
94
+ stage?: typeof Expression | undefined;
95
+ streamlit?: typeof Expression | undefined;
96
+ var?: typeof Expression | undefined;
97
+ bitString?: typeof Expression | undefined;
98
+ hexString?: typeof Expression | undefined;
99
+ byteString?: typeof Expression | undefined;
100
+ nationalString?: typeof Expression | undefined;
101
+ rawString?: typeof Expression | undefined;
102
+ heredocString?: typeof Expression | undefined;
103
+ unicodeString?: typeof Expression | undefined;
104
+ bit?: typeof Expression | undefined;
105
+ boolean?: typeof Expression | undefined;
106
+ tinyint?: typeof Expression | undefined;
107
+ utinyint?: typeof Expression | undefined;
108
+ smallint?: typeof Expression | undefined;
109
+ usmallint?: typeof Expression | undefined;
110
+ mediumint?: typeof Expression | undefined;
111
+ umediumint?: typeof Expression | undefined;
112
+ int?: typeof Expression | undefined;
113
+ uint?: typeof Expression | undefined;
114
+ bigint?: typeof Expression | undefined;
115
+ ubigint?: typeof Expression | undefined;
116
+ bignum?: typeof Expression | undefined;
117
+ int128?: typeof Expression | undefined;
118
+ uint128?: typeof Expression | undefined;
119
+ int256?: typeof Expression | undefined;
120
+ uint256?: typeof Expression | undefined;
121
+ float?: typeof Expression | undefined;
122
+ double?: typeof Expression | undefined;
123
+ udouble?: typeof Expression | undefined;
124
+ decimal?: typeof Expression | undefined;
125
+ decimal32?: typeof Expression | undefined;
126
+ decimal64?: typeof Expression | undefined;
127
+ decimal128?: typeof Expression | undefined;
128
+ decimal256?: typeof Expression | undefined;
129
+ decfloat?: typeof Expression | undefined;
130
+ udecimal?: typeof Expression | undefined;
131
+ bigdecimal?: typeof Expression | undefined;
132
+ char?: typeof Expression | undefined;
133
+ nchar?: typeof Expression | undefined;
134
+ varchar?: typeof Expression | undefined;
135
+ nvarchar?: typeof Expression | undefined;
136
+ bpchar?: typeof Expression | undefined;
137
+ text?: typeof Expression | undefined;
138
+ mediumtext?: typeof Expression | undefined;
139
+ longtext?: typeof Expression | undefined;
140
+ blob?: typeof Expression | undefined;
141
+ mediumblob?: typeof Expression | undefined;
142
+ longblob?: typeof Expression | undefined;
143
+ tinyblob?: typeof Expression | undefined;
144
+ tinytext?: typeof Expression | undefined;
145
+ name?: typeof Expression | undefined;
146
+ binary?: typeof Expression | undefined;
147
+ varbinary?: typeof Expression | undefined;
148
+ json?: typeof Expression | undefined;
149
+ jsonb?: typeof Expression | undefined;
150
+ time?: typeof Expression | undefined;
151
+ timetz?: typeof Expression | undefined;
152
+ timeNs?: typeof Expression | undefined;
153
+ timestamp?: typeof Expression | undefined;
154
+ timestamptz?: typeof Expression | undefined;
155
+ timestampltz?: typeof Expression | undefined;
156
+ timestampntz?: typeof Expression | undefined;
157
+ timestampS?: typeof Expression | undefined;
158
+ timestampMs?: typeof Expression | undefined;
159
+ timestampNs?: typeof Expression | undefined;
160
+ datetime?: typeof Expression | undefined;
161
+ datetime2?: typeof Expression | undefined;
162
+ datetime64?: typeof Expression | undefined;
163
+ smalldatetime?: typeof Expression | undefined;
164
+ date?: typeof Expression | undefined;
165
+ date32?: typeof Expression | undefined;
166
+ int4range?: typeof Expression | undefined;
167
+ int4multirange?: typeof Expression | undefined;
168
+ int8range?: typeof Expression | undefined;
169
+ int8multirange?: typeof Expression | undefined;
170
+ numrange?: typeof Expression | undefined;
171
+ nummultirange?: typeof Expression | undefined;
172
+ tsrange?: typeof Expression | undefined;
173
+ tsmultirange?: typeof Expression | undefined;
174
+ tstzrange?: typeof Expression | undefined;
175
+ tstzmultirange?: typeof Expression | undefined;
176
+ daterange?: typeof Expression | undefined;
177
+ datemultirange?: typeof Expression | undefined;
178
+ uuid?: typeof Expression | undefined;
179
+ geography?: typeof Expression | undefined;
180
+ geographypoint?: typeof Expression | undefined;
181
+ nullable?: typeof Expression | undefined;
182
+ geometry?: typeof Expression | undefined;
183
+ point?: typeof Expression | undefined;
184
+ ring?: typeof Expression | undefined;
185
+ linestring?: typeof Expression | undefined;
186
+ localtime?: typeof Expression | undefined;
187
+ localtimestamp?: typeof Expression | undefined;
188
+ systimestamp?: typeof Expression | undefined;
189
+ multilinestring?: typeof Expression | undefined;
190
+ polygon?: typeof Expression | undefined;
191
+ multipolygon?: typeof Expression | undefined;
192
+ hllsketch?: typeof Expression | undefined;
193
+ hstore?: typeof Expression | undefined;
194
+ super?: typeof Expression | undefined;
195
+ serial?: typeof Expression | undefined;
196
+ smallserial?: typeof Expression | undefined;
197
+ bigserial?: typeof Expression | undefined;
198
+ xml?: typeof Expression | undefined;
199
+ year?: typeof Expression | undefined;
200
+ userdefined?: typeof Expression | undefined;
201
+ money?: typeof Expression | undefined;
202
+ smallmoney?: typeof Expression | undefined;
203
+ rowversion?: typeof Expression | undefined;
204
+ image?: typeof Expression | undefined;
205
+ variant?: typeof Expression | undefined;
206
+ object?: typeof Expression | undefined;
207
+ inet?: typeof Expression | undefined;
208
+ ipaddress?: typeof Expression | undefined;
209
+ ipprefix?: typeof Expression | undefined;
210
+ ipv4?: typeof Expression | undefined;
211
+ ipv6?: typeof Expression | undefined;
212
+ enum?: typeof Expression | undefined;
213
+ enum8?: typeof Expression | undefined;
214
+ enum16?: typeof Expression | undefined;
215
+ fixedstring?: typeof Expression | undefined;
216
+ lowcardinality?: typeof Expression | undefined;
217
+ nested?: typeof Expression | undefined;
218
+ aggregatefunction?: typeof Expression | undefined;
219
+ simpleaggregatefunction?: typeof Expression | undefined;
220
+ tdigest?: typeof Expression | undefined;
221
+ unknown?: typeof Expression | undefined;
222
+ vector?: typeof Expression | undefined;
223
+ dynamic?: typeof Expression | undefined;
224
+ void?: typeof Expression | undefined;
225
+ alias?: typeof Expression | undefined;
226
+ alter?: typeof Expression | undefined;
227
+ all?: typeof Expression | undefined;
228
+ anti?: typeof Expression | undefined;
229
+ any?: typeof Expression | undefined;
230
+ apply?: typeof Expression | undefined;
231
+ array?: typeof Expression | undefined;
232
+ asc?: typeof Expression | undefined;
233
+ asof?: typeof Expression | undefined;
234
+ attach?: typeof Expression | undefined;
235
+ autoIncrement?: typeof Expression | undefined;
236
+ begin?: typeof Expression | undefined;
237
+ between?: typeof Expression | undefined;
238
+ bulkCollectInto?: typeof Expression | undefined;
239
+ cache?: typeof Expression | undefined;
240
+ case?: typeof Expression | undefined;
241
+ characterSet?: typeof Expression | undefined;
242
+ clusterBy?: typeof Expression | undefined;
243
+ collate?: typeof Expression | undefined;
244
+ command?: typeof Expression | undefined;
245
+ comment?: typeof Expression | undefined;
246
+ commit?: typeof Expression | undefined;
247
+ connectBy?: typeof Expression | undefined;
248
+ constraint?: typeof Expression | undefined;
249
+ copy?: typeof Expression | undefined;
250
+ create?: typeof Expression | undefined;
251
+ cross?: typeof Expression | undefined;
252
+ cube?: typeof Expression | undefined;
253
+ currentDate?: typeof Expression | undefined;
254
+ currentDatetime?: typeof Expression | undefined;
255
+ currentSchema?: typeof Expression | undefined;
256
+ currentTime?: typeof Expression | undefined;
257
+ currentTimestamp?: typeof Expression | undefined;
258
+ currentUser?: typeof Expression | undefined;
259
+ currentRole?: typeof Expression | undefined;
260
+ currentCatalog?: typeof Expression | undefined;
261
+ declare?: typeof Expression | undefined;
262
+ default?: typeof Expression | undefined;
263
+ delete?: typeof Expression | undefined;
264
+ desc?: typeof Expression | undefined;
265
+ describe?: typeof Expression | undefined;
266
+ detach?: typeof Expression | undefined;
267
+ dictionary?: typeof Expression | undefined;
268
+ distinct?: typeof Expression | undefined;
269
+ distributeBy?: typeof Expression | undefined;
270
+ div?: typeof Expression | undefined;
271
+ drop?: typeof Expression | undefined;
272
+ else?: typeof Expression | undefined;
273
+ end?: typeof Expression | undefined;
274
+ escape?: typeof Expression | undefined;
275
+ except?: typeof Expression | undefined;
276
+ execute?: typeof Expression | undefined;
277
+ exists?: typeof Expression | undefined;
278
+ false?: typeof Expression | undefined;
279
+ fetch?: typeof Expression | undefined;
280
+ file?: typeof Expression | undefined;
281
+ fileFormat?: typeof Expression | undefined;
282
+ filter?: typeof Expression | undefined;
283
+ final?: typeof Expression | undefined;
284
+ first?: typeof Expression | undefined;
285
+ for?: typeof Expression | undefined;
286
+ force?: typeof Expression | undefined;
287
+ foreignKey?: typeof Expression | undefined;
288
+ format?: typeof Expression | undefined;
289
+ from?: typeof Expression | undefined;
290
+ full?: typeof Expression | undefined;
291
+ function?: typeof Expression | undefined;
292
+ get?: typeof Expression | undefined;
293
+ glob?: typeof Expression | undefined;
294
+ global?: typeof Expression | undefined;
295
+ grant?: typeof Expression | undefined;
296
+ groupBy?: typeof Expression | undefined;
297
+ groupingSets?: typeof Expression | undefined;
298
+ having?: typeof Expression | undefined;
299
+ hint?: typeof Expression | undefined;
300
+ ignore?: typeof Expression | undefined;
301
+ ilike?: typeof Expression | undefined;
302
+ in?: typeof Expression | undefined;
303
+ index?: typeof Expression | undefined;
304
+ indexedBy?: typeof Expression | undefined;
305
+ inner?: typeof Expression | undefined;
306
+ insert?: typeof Expression | undefined;
307
+ install?: typeof Expression | undefined;
308
+ integration?: typeof Expression | undefined;
309
+ intersect?: typeof Expression | undefined;
310
+ interval?: typeof Expression | undefined;
311
+ into?: typeof Expression | undefined;
312
+ introducer?: typeof Expression | undefined;
313
+ irlike?: typeof Expression | undefined;
314
+ is?: typeof Expression | undefined;
315
+ isnull?: typeof Expression | undefined;
316
+ join?: typeof Expression | undefined;
317
+ joinMarker?: typeof Expression | undefined;
318
+ keep?: typeof Expression | undefined;
319
+ key?: typeof Expression | undefined;
320
+ kill?: typeof Expression | undefined;
321
+ language?: typeof Expression | undefined;
322
+ lateral?: typeof Expression | undefined;
323
+ left?: typeof Expression | undefined;
324
+ like?: typeof Expression | undefined;
325
+ limit?: typeof Expression | undefined;
326
+ list?: typeof Expression | undefined;
327
+ load?: typeof Expression | undefined;
328
+ lock?: typeof Expression | undefined;
329
+ map?: typeof Expression | undefined;
330
+ match?: typeof Expression | undefined;
331
+ matchCondition?: typeof Expression | undefined;
332
+ matchRecognize?: typeof Expression | undefined;
333
+ memberOf?: typeof Expression | undefined;
334
+ merge?: typeof Expression | undefined;
335
+ mod?: typeof Expression | undefined;
336
+ model?: typeof Expression | undefined;
337
+ natural?: typeof Expression | undefined;
338
+ next?: typeof Expression | undefined;
339
+ nothing?: typeof Expression | undefined;
340
+ notnull?: typeof Expression | undefined;
341
+ null?: typeof Expression | undefined;
342
+ objectIdentifier?: typeof Expression | undefined;
343
+ offset?: typeof Expression | undefined;
344
+ on?: typeof Expression | undefined;
345
+ only?: typeof Expression | undefined;
346
+ operator?: typeof Expression | undefined;
347
+ orderBy?: typeof Expression | undefined;
348
+ orderSiblingsBy?: typeof Expression | undefined;
349
+ ordered?: typeof Expression | undefined;
350
+ ordinality?: typeof Expression | undefined;
351
+ out?: typeof Expression | undefined;
352
+ inout?: typeof Expression | undefined;
353
+ outer?: typeof Expression | undefined;
354
+ over?: typeof Expression | undefined;
355
+ overlaps?: typeof Expression | undefined;
356
+ overwrite?: typeof Expression | undefined;
357
+ package?: typeof Expression | undefined;
358
+ partition?: typeof Expression | undefined;
359
+ partitionBy?: typeof Expression | undefined;
360
+ percent?: typeof Expression | undefined;
361
+ pivot?: typeof Expression | undefined;
362
+ placeholder?: typeof Expression | undefined;
363
+ policy?: typeof Expression | undefined;
364
+ pool?: typeof Expression | undefined;
365
+ positional?: typeof Expression | undefined;
366
+ pragma?: typeof Expression | undefined;
367
+ prewhere?: typeof Expression | undefined;
368
+ primaryKey?: typeof Expression | undefined;
369
+ procedure?: typeof Expression | undefined;
370
+ properties?: typeof Expression | undefined;
371
+ pseudoType?: typeof Expression | undefined;
372
+ put?: typeof Expression | undefined;
373
+ qualify?: typeof Expression | undefined;
374
+ quote?: typeof Expression | undefined;
375
+ qdcolon?: typeof Expression | undefined;
376
+ range?: typeof Expression | undefined;
377
+ recursive?: typeof Expression | undefined;
378
+ refresh?: typeof Expression | undefined;
379
+ rename?: typeof Expression | undefined;
380
+ replace?: typeof Expression | undefined;
381
+ returning?: typeof Expression | undefined;
382
+ revoke?: typeof Expression | undefined;
383
+ references?: typeof Expression | undefined;
384
+ right?: typeof Expression | undefined;
385
+ rlike?: typeof Expression | undefined;
386
+ role?: typeof Expression | undefined;
387
+ rollback?: typeof Expression | undefined;
388
+ rollup?: typeof Expression | undefined;
389
+ row?: typeof Expression | undefined;
390
+ rule?: typeof Expression | undefined;
391
+ rows?: typeof Expression | undefined;
392
+ select?: typeof Expression | undefined;
393
+ semi?: typeof Expression | undefined;
394
+ separator?: typeof Expression | undefined;
395
+ sequence?: typeof Expression | undefined;
396
+ serdeProperties?: typeof Expression | undefined;
397
+ set?: typeof Expression | undefined;
398
+ settings?: typeof Expression | undefined;
399
+ show?: typeof Expression | undefined;
400
+ similarTo?: typeof Expression | undefined;
401
+ some?: typeof Expression | undefined;
402
+ sortBy?: typeof Expression | undefined;
403
+ soundsLike?: typeof Expression | undefined;
404
+ sqlSecurity?: typeof Expression | undefined;
405
+ startWith?: typeof Expression | undefined;
406
+ storageIntegration?: typeof Expression | undefined;
407
+ straightJoin?: typeof Expression | undefined;
408
+ struct?: typeof Expression | undefined;
409
+ summarize?: typeof Expression | undefined;
410
+ tableSample?: typeof Expression | undefined;
411
+ tag?: typeof Expression | undefined;
412
+ temporary?: typeof Expression | undefined;
413
+ top?: typeof Expression | undefined;
414
+ then?: typeof Expression | undefined;
415
+ true?: typeof Expression | undefined;
416
+ trigger?: typeof Expression | undefined;
417
+ truncate?: typeof Expression | undefined;
418
+ uncache?: typeof Expression | undefined;
419
+ union?: typeof Expression | undefined;
420
+ unnest?: typeof Expression | undefined;
421
+ unpivot?: typeof Expression | undefined;
422
+ update?: typeof Expression | undefined;
423
+ use?: typeof Expression | undefined;
424
+ using?: typeof Expression | undefined;
425
+ values?: typeof Expression | undefined;
426
+ variadic?: typeof Expression | undefined;
427
+ view?: typeof Expression | undefined;
428
+ semanticView?: typeof Expression | undefined;
429
+ volatile?: typeof Expression | undefined;
430
+ volume?: typeof Expression | undefined;
431
+ when?: typeof Expression | undefined;
432
+ where?: typeof Expression | undefined;
433
+ window?: typeof Expression | undefined;
434
+ with?: typeof Expression | undefined;
435
+ unique?: typeof Expression | undefined;
436
+ utcDate?: typeof Expression | undefined;
437
+ utcTime?: typeof Expression | undefined;
438
+ utcTimestamp?: typeof Expression | undefined;
439
+ versionSnapshot?: typeof Expression | undefined;
440
+ timestampSnapshot?: typeof Expression | undefined;
441
+ option?: typeof Expression | undefined;
442
+ sink?: typeof Expression | undefined;
443
+ source?: typeof Expression | undefined;
444
+ analyze?: typeof Expression | undefined;
445
+ namespace?: typeof Expression | undefined;
446
+ export?: typeof Expression | undefined;
447
+ hiveTokenStream?: typeof Expression | undefined;
448
+ };
449
+ static TABLESAMPLE_CSV: boolean;
450
+ static VALUES_FOLLOWED_BY_PAREN: boolean;
451
+ static get CHARSET_TRANSLATORS(): Set<string>;
452
+ static get FUNC_TOKENS(): Set<TokenType>;
453
+ static get STATEMENT_PARSERS(): Record<TokenType | string, (this: Parser) => Expression | Expression[] | undefined>;
454
+ static get SET_PARSERS(): Record<string, (this: Parser) => Expression | undefined>;
455
+ static get FUNCTION_PARSERS(): Partial<Record<string, (this: Parser) => Expression | undefined>>;
456
+ static get FUNCTIONS(): Record<string, (args: Expression[]) => Expression>;
457
+ static get EXPONENT(): Partial<Record<TokenType, typeof Expression>>;
458
+ parseLockingStatement(): LockingStatementExpr;
459
+ parseRangeN(): RangeNExpr;
460
+ parseTranslate(): TranslateCharactersExpr;
461
+ parseFunction(options?: {
462
+ functions?: Record<string, Function>;
463
+ anonymous?: boolean;
464
+ optionalParens?: boolean;
465
+ anyToken?: boolean;
466
+ }): Expression | undefined;
467
+ parseColumnOps(thisExpr?: Expression): Expression | undefined;
468
+ parseQueryBand(): Expression | undefined;
469
+ static get TABLE_ALIAS_TOKENS(): Set<TokenType>;
470
+ }
471
+ declare class TeradataGenerator extends Generator {
472
+ static get AFTER_HAVING_MODIFIER_TRANSFORMS(): Map<string, (this: Generator, e: Expression) => string>;
473
+ static SUPPORTS_DECODE_CASE: boolean;
474
+ static readonly SELECT_KINDS: string[];
475
+ static TRY_SUPPORTED: boolean;
476
+ static SUPPORTS_UESCAPE: boolean;
477
+ static LIMIT_IS_TOP: boolean;
478
+ static JOIN_HINTS: boolean;
479
+ static TABLE_HINTS: boolean;
480
+ static QUERY_HINTS: boolean;
481
+ static TABLESAMPLE_KEYWORDS: string;
482
+ static LAST_DAY_SUPPORTS_DATE_PART: boolean;
483
+ static CAN_IMPLEMENT_ARRAY_ANY: boolean;
484
+ static TZ_TO_WITH_TIME_ZONE: boolean;
485
+ static ARRAY_SIZE_NAME: string;
486
+ static NVL2_SUPPORTED: boolean;
487
+ static SUPPORTS_TO_NUMBER: boolean;
488
+ static EXCEPT_INTERSECT_SUPPORT_ALL_CLAUSE: boolean;
489
+ static SUPPORTS_MEDIAN: boolean;
490
+ static get TYPE_MAPPING(): Map<DataTypeExprKind | string, string>;
491
+ static get PROPERTIES_LOCATION(): Map<typeof Expression, PropertiesLocation>;
492
+ static get ORIGINAL_TRANSFORMS(): Map<typeof Expression, (this: Generator, e: any) => string>;
493
+ currentTimestampSql(expression: CurrentTimestampExpr): string;
494
+ createableSql(expression: CreateExpr, locations: Map<string, Expression[]>): string;
495
+ castSql(expression: Expression, options?: {
496
+ safePrefix?: string;
497
+ }): string;
498
+ tryCastSql(expression: TryCastExpr): string;
499
+ tableSampleSql(expression: TableSampleExpr, _options?: {
500
+ tablesampleKeyword?: string;
501
+ }): string;
502
+ partitionedByPropertySql(expression: PartitionedByPropertyExpr): string;
503
+ updateSql(expression: UpdateExpr): string;
504
+ modSql(expression: ModExpr): string;
505
+ dataTypeSql(expression: DataTypeExpr): string;
506
+ rangeNSql(expression: RangeNExpr): string;
507
+ lockingStatementSql(expression: LockingStatementExpr): string;
508
+ extractSql(expression: ExtractExpr): string;
509
+ intervalSql(expression: IntervalExpr): string;
510
+ }
511
+ declare class Teradata extends Dialect {
512
+ static DIALECT_NAME: Dialects;
513
+ static get NORMALIZATION_STRATEGY(): NormalizationStrategy;
514
+ static SUPPORTS_SEMI_ANTI_JOIN: boolean;
515
+ static TYPED_DIVISION: boolean;
516
+ static get TIME_MAPPING(): {
517
+ YY: string;
518
+ Y4: string;
519
+ YYYY: string;
520
+ M4: string;
521
+ M3: string;
522
+ M: string;
523
+ MI: string;
524
+ MM: string;
525
+ MMM: string;
526
+ MMMM: string;
527
+ D: string;
528
+ DD: string;
529
+ D3: string;
530
+ DDD: string;
531
+ H: string;
532
+ HH: string;
533
+ HH24: string;
534
+ S: string;
535
+ SS: string;
536
+ SSSSSS: string;
537
+ E: string;
538
+ EE: string;
539
+ E3: string;
540
+ E4: string;
541
+ EEE: string;
542
+ EEEE: string;
543
+ };
544
+ static Tokenizer: typeof TeradataTokenizer;
545
+ static Parser: typeof TeradataParser;
546
+ static Generator: typeof TeradataGenerator;
547
+ }
548
+
549
+ export { Teradata, TeradataGenerator, TeradataParser, TeradataTokenizer };
@@ -0,0 +1,2 @@
1
+ import{$v as xt,Bp as it,Dm as tt,Gb as B,Gv as x,Jv as It,Mj as v,Mv as _,Pi as L,Qe as w,Ql as z,Qp as y,Rk as M,Sa as N,Sm as st,Um as et,Vh as Q,Xe as J,Xj as X,_k as j,a as o,ac as F,ae as g,al as Z,ax as _t,b as l,c as O,d as I,e as i,gr as pt,iv as At,jq as d,jr as ot,kr as St,lq as nt,lv as lt,mq as K,ob as c,pf as m,pq as Et,pt as ht,rg as C,rs as Tt,ru as ut,s as n,sn as rt,ss as at,st as Nt,sx as P,uh as k,vh as $,vr as ct,vw as Rt,wi as V,wv as Ot,ww as Ct,xm as U,zi as W,zm as q}from"../chunk-RGKTYIN3.js";function Pt(H){return function(a){let t=this.sql(a,"this"),s=a.args.unit,e=a.args.expression&&this.simplifyUnlessLiteral(a.args.expression);e instanceof C||this.unsupported("Cannot add non literal");let p;return e instanceof X?(p=H==="+"?"-":"+",e=C.string(e.args.this.toValue())):(p=H,e.setArgKey("isString",!0)),`${t} ${p} ${this.sql(new L({this:e,unit:s}))}`}}o(Pt,"dateAddSqlTd");var ft,gt,mt,Lt,R,h=class h extends(Lt=P,mt=[n],gt=[n],ft=[n],Lt){static get HEX_STRINGS(){return[["X'","'"],["x'","'"],["0x",""]]}static get ORIGINAL_KEYWORDS(){let t={...P.KEYWORDS,"**":"dstar","^=":"neq",BYTEINT:"smallint",COLLECT:"command",DEL:"delete",EQ:"eq",GE:"gte",GT:"gt",HELP:"command",INS:"insert",LE:"lte",LOCKING:"lock",LT:"lt",MINUS:"except",MOD:"mod",NE:"neq","NOT=":"neq",SAMPLE:"tableSample",SEL:"select",ST_GEOMETRY:"geometry",TOP:"top",UPD:"update"};return delete t["/*+"],t}static get SINGLE_TOKENS(){let t={...P.SINGLE_TOKENS};return delete t["%"],t}};R=l(Lt),i(R,10,"HEX_STRINGS",mt,h),i(R,10,"ORIGINAL_KEYWORDS",gt,h),i(R,10,"SINGLE_TOKENS",ft,h),O(R,h),I(R,3,h),o(h,"TeradataTokenizer");var b=h,Mt,Ut,qt,yt,dt,Kt,bt,Yt,Gt,Ht,Bt,T,E=class E extends(Bt=c,Ht=[n],Gt=[n],Yt=[n],bt=[n],Kt=[n],dt=[n],yt=[n],qt=[n],Ut=[n],Mt=[n],Bt){static get ID_VAR_TOKENS(){return new Set([...c.ID_VAR_TOKENS,"sessionUser","currentCatalog","straightJoin"])}static get NO_PAREN_FUNCTIONS(){let t={...c.NO_PAREN_FUNCTIONS};return delete t.localtime,delete t.localtimestamp,t}static get CHARSET_TRANSLATORS(){return new Set(["GRAPHIC_TO_KANJISJIS","GRAPHIC_TO_LATIN","GRAPHIC_TO_UNICODE","GRAPHIC_TO_UNICODE_PadSpace","KANJI1_KanjiEBCDIC_TO_UNICODE","KANJI1_KanjiEUC_TO_UNICODE","KANJI1_KANJISJIS_TO_UNICODE","KANJI1_SBC_TO_UNICODE","KANJISJIS_TO_GRAPHIC","KANJISJIS_TO_LATIN","KANJISJIS_TO_UNICODE","LATIN_TO_GRAPHIC","LATIN_TO_KANJISJIS","LATIN_TO_UNICODE","LOCALE_TO_UNICODE","UNICODE_TO_GRAPHIC","UNICODE_TO_GRAPHIC_PadGraphic","UNICODE_TO_GRAPHIC_VarGraphic","UNICODE_TO_KANJI1_KanjiEBCDIC","UNICODE_TO_KANJI1_KanjiEUC","UNICODE_TO_KANJI1_KANJISJIS","UNICODE_TO_KANJI1_SBC","UNICODE_TO_KANJISJIS","UNICODE_TO_LATIN","UNICODE_TO_LOCALE","UNICODE_TO_UNICODE_FoldSpace","UNICODE_TO_UNICODE_Fullwidth","UNICODE_TO_UNICODE_Halfwidth","UNICODE_TO_UNICODE_NFC","UNICODE_TO_UNICODE_NFD","UNICODE_TO_UNICODE_NFKC","UNICODE_TO_UNICODE_NFKD"])}static get FUNC_TOKENS(){return(()=>{let t=new Set(c.FUNC_TOKENS);return t.delete("replace"),t})()}static get STATEMENT_PARSERS(){return{...c.STATEMENT_PARSERS,database:function(){return this.expression(m,{this:this.parseTable({schema:!1})})},replace:function(){return this.parseCreate()},lock:function(){return this.parseLockingStatement()}}}static get SET_PARSERS(){return{...c.SET_PARSERS,QUERY_BAND:o(function(){return this.parseQueryBand()},"QUERY_BAND")}}static get FUNCTION_PARSERS(){return{...c.FUNCTION_PARSERS,TRYCAST:c.FUNCTION_PARSERS.TRY_CAST,RANGE_N:o(function(){return this.parseRangeN()},"RANGE_N"),TRANSLATE:o(function(){return this.parseTranslate()},"TRANSLATE")}}static get FUNCTIONS(){return{...c.FUNCTIONS,CARDINALITY:o(t=>z.fromArgList(t),"CARDINALITY"),RANDOM:o(t=>new K({lower:N(t,0),upper:N(t,1)}),"RANDOM"),DATE:o(t=>new U({expressions:t}),"DATE"),HASHMD5:o(t=>new y({this:N(t,0)}),"HASHMD5"),LOG:o(t=>new it({this:N(t,1),expression:N(t,0)}),"LOG"),TIME:o(t=>new q({expressions:t}),"TIME")}}static get EXPONENT(){return{...c.EXPONENT,dstar:d}}parseLockingStatement(){let t=this.parseLocking(),s=this.parseSelect();return s||this.raiseError("Expected SELECT statement after LOCKING clause"),this.expression(B,{this:t,expression:s})}parseRangeN(){let t=this.parseIdVar();this.match("between");let s=this.parseCsv(()=>this.parseAssignment()),e=this.matchTextSeq("EACH")&&this.parseAssignment();return this.expression(Et,{this:t,expressions:s,each:e||void 0})}parseTranslate(){let t=this.parseAssignment();return this.match("using"),this.matchTexts(E.CHARSET_TRANSLATORS),this.expression(J,{this:t,expression:this.prev?.text.toUpperCase(),withError:this.matchTextSeq(["WITH","ERROR"])?this.expression(M,{this:"WITH ERROR",expressions:[]}):void 0})}parseFunction(t={}){if(!(this.next&&this.next.tokenType==="lParen"&&this.index+2<this.tokens.length&&this.tokens[this.index+2]?.tokenType==="format"))return super.parseFunction(t)}parseColumnOps(t){let s=super.parseColumnOps(t);if(this.matchPair("lParen","format")){let e=this.parseString();return this.matchRParen(),this.expression(w,{this:s,format:e})}return s}parseQueryBand(){this.match("eq");let t;this.matchTextSeq("NONE")?t=new g({this:"NONE"}):t=this.parseString();let s=this.matchTextSeq("UPDATE");this.matchTextSeq("FOR");let e;return this.matchTextSeq(["SESSION","VOLATILE"])?e="SESSION VOLATILE":this.matchTexts(["SESSION","TRANSACTION"])?e=this.prev?.text.toUpperCase():e=void 0,this.expression(F,{this:t,scope:e,update:s})}static get TABLE_ALIAS_TOKENS(){return new Set([...c.TABLE_ALIAS_TOKENS,"straightJoin"])}};T=l(Bt),i(T,10,"ID_VAR_TOKENS",Ht,E),i(T,10,"NO_PAREN_FUNCTIONS",Gt,E),i(T,10,"CHARSET_TRANSLATORS",Yt,E),i(T,10,"FUNC_TOKENS",bt,E),i(T,10,"STATEMENT_PARSERS",Kt,E),i(T,10,"SET_PARSERS",dt,E),i(T,10,"FUNCTION_PARSERS",yt,E),i(T,10,"FUNCTIONS",qt,E),i(T,10,"EXPONENT",Ut,E),i(T,10,"TABLE_ALIAS_TOKENS",Mt,E),O(T,E),I(T,3,E),o(E,"TeradataParser"),E.TABLESAMPLE_CSV=!0,E.VALUES_FOLLOWED_BY_PAREN=!1;var Y=E,Ft,wt,Jt,kt,$t,u,r=class r extends($t=x,kt=[n],Jt=[n],wt=[n],Ft=[n],$t){static get AFTER_HAVING_MODIFIER_TRANSFORMS(){let t=new Map(super.AFTER_HAVING_MODIFIER_TRANSFORMS);return["cluster","distribute","sort"].forEach(s=>t.delete(s)),t}static get TYPE_MAPPING(){let t=new Map(x.TYPE_MAPPING);return t.set("boolean","BYTEINT"),t.set("double","DOUBLE PRECISION"),t.set("text","CLOB"),t.set("geometry","ST_GEOMETRY"),t.set("timestamptz","TIMESTAMP"),t}static get PROPERTIES_LOCATION(){let t=new Map(x.PROPERTIES_LOCATION);return t.set(k,"postIndex"),t.set($,"postExpression"),t.set(Q,"postCreate"),t}static get ORIGINAL_TRANSFORMS(){let t=new Map(x.TRANSFORMS);return t.set(Tt,_("MAX_BY")),t.set(at,_("MIN_BY")),t.set(U,()=>"DATE"),t.set(q,()=>"TIME"),t.set(tt,function(s){return this.currentTimestampSql(s)}),t.set(ht,function(s){return Ct.call(this,s)}),t.set(Nt,function(s){return Rt.call(this,s)}),t.set(y,_("HASHMD5")),t.set(v,function(s){return this.binary(s,"MOD")}),t.set(d,function(s){return this.binary(s,"**")}),t.set(K,function(s){return this.func("RANDOM",[s.args.lower,s.args.upper])}),t.set(W,At([lt,Ot])),t.set(pt,function(s){return xt.call(this,s,{funcName:"INSTR",supportsPosition:!0,supportsOccurrence:!0})}),t.set(ot,function(s){return`CAST(${this.sql(s,"this")} AS DATE FORMAT ${this.formatTime(s)})`}),t.set(St,function(s){return this.castSql(s)}),t.set(ct,function(s){return this.func("TO_CHAR",[s.args.this,this.formatTime(s)])}),t.set(j,function(s){return this.functionFallbackSql(s)}),t.set(Z,_t),t.set(m,function(s){return`DATABASE ${this.sql(s,"this")}`}),t.set(st,function(s){return Pt("+").call(this,s)}),t.set(et,function(s){return Pt("-").call(this,s)}),t.set(nt,function(s){return this.sql(new rt({this:"QUARTER",expression:s.args.this}))}),t}currentTimestampSql(t){let s=t.args.this?"(":"",e=t.args.this?")":"";return this.func("CURRENT_TIMESTAMP",[t.args.this],{prefix:s,suffix:e})}createableSql(t,s){let e=this.sql(t,"kind").toUpperCase(),p=s.get("postName");if(e==="TABLE"&&p?.length){let A=this.sql(t.args.this.args.this),f=this.properties(new V({expressions:p}),{wrapped:!1,prefix:","}),vt=this.schemaColumnsSql(t.args.this);return`${A}${f}${this.sep()}${vt}`}return super.createableSql(t,s)}castSql(t,s={}){let{safePrefix:e}=s,p=t.args.to;return p&&p.args.this==="unknown"&&t.args.format&&p.pop(),super.castSql(t,{safePrefix:e})}tryCastSql(t){return this.castSql(t,{safePrefix:"TRY"})}tableSampleSql(t,s={}){return`${this.sql(t,"this")} SAMPLE ${this.expressions(t)}`}partitionedByPropertySql(t){return`PARTITION BY ${this.sql(t,"this")}`}updateSql(t){let s=this.sql(t,"this"),e=this.sql(t,"from"),p=this.expressions(t,{flat:!0}),A=this.sql(t,"where"),f=`UPDATE ${s}${e} SET ${p}${A}`;return this.prependCtes(t,f)}modSql(t){return this.binary(t,"MOD")}dataTypeSql(t){let s=super.dataTypeSql(t);return t.args.prefix?`SYSUDTLIB.${s}`:s}rangeNSql(t){let s=this.sql(t,"this"),e=this.expressions(t),p=this.sql(t,"each"),A=p?` EACH ${p}`:"";return`RANGE_N(${s} BETWEEN ${e}${A})`}lockingStatementSql(t){let s=this.sql(t,"this"),e=this.sql(t,"expression");return`${s} ${e}`}extractSql(t){if(this.sql(t,"this").toUpperCase()!=="QUARTER")return super.extractSql(t);let e=new M({this:"to_char",expressions:[t.args.expression??"",C.string("Q")]});return this.sql(ut(e,"int"))}intervalSql(t){let s=t.args.unit?.toString()??"",e=0;if(s.startsWith("WEEK")?e=7:s.startsWith("QUARTER")&&(e=90),e){let p=new L({this:t.args.this,unit:new g({this:"DAY"})});return`(${e} * ${super.intervalSql(p)})`}return super.intervalSql(t)}};u=l($t),i(u,10,"AFTER_HAVING_MODIFIER_TRANSFORMS",kt,r),i(u,10,"TYPE_MAPPING",Jt,r),i(u,10,"PROPERTIES_LOCATION",wt,r),i(u,10,"ORIGINAL_TRANSFORMS",Ft,r),O(u,r),I(u,3,r),o(r,"TeradataGenerator"),r.SUPPORTS_DECODE_CASE=!1,r.SELECT_KINDS=[],r.TRY_SUPPORTED=!1,r.SUPPORTS_UESCAPE=!1,r.LIMIT_IS_TOP=!0,r.JOIN_HINTS=!1,r.TABLE_HINTS=!1,r.QUERY_HINTS=!1,r.TABLESAMPLE_KEYWORDS="SAMPLE",r.LAST_DAY_SUPPORTS_DATE_PART=!1,r.CAN_IMPLEMENT_ARRAY_ANY=!0,r.TZ_TO_WITH_TIME_ZONE=!0,r.ARRAY_SIZE_NAME="CARDINALITY",r.NVL2_SUPPORTED=!1,r.SUPPORTS_TO_NUMBER=!1,r.EXCEPT_INTERSECT_SUPPORT_ALL_CLAUSE=!1,r.SUPPORTS_MEDIAN=!1;var G=r,Qt,Vt,Wt,D,S=class S extends(Wt=It,Vt=[n],Qt=[n],Wt){static get NORMALIZATION_STRATEGY(){return"uppercase"}static get TIME_MAPPING(){return{YY:"%y",Y4:"%Y",YYYY:"%Y",M4:"%B",M3:"%b",M:"%-M",MI:"%M",MM:"%m",MMM:"%b",MMMM:"%B",D:"%-d",DD:"%d",D3:"%j",DDD:"%j",H:"%-H",HH:"%H",HH24:"%H",S:"%-S",SS:"%S",SSSSSS:"%f",E:"%a",EE:"%a",E3:"%a",E4:"%A",EEE:"%a",EEEE:"%A"}}};D=l(Wt),i(D,10,"NORMALIZATION_STRATEGY",Vt,S),i(D,10,"TIME_MAPPING",Qt,S),O(D,S),I(D,3,S),o(S,"Teradata"),S.DIALECT_NAME="teradata",S.SUPPORTS_SEMI_ANTI_JOIN=!1,S.TYPED_DIVISION=!0,S.Tokenizer=b,S.Parser=Y,S.Generator=G;var Dt=S;export{Dt as Teradata,G as TeradataGenerator,Y as TeradataParser,b as TeradataTokenizer};
2
+ //# sourceMappingURL=teradata.js.map