@hdnax/sqlingo.js 0.0.5 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.repo.md +1 -2
- package/dist/chunk-2YNOERAO.cjs +2 -0
- package/dist/chunk-2YNOERAO.cjs.map +1 -0
- package/dist/chunk-2Z3O2CFM.cjs +19 -0
- package/dist/chunk-2Z3O2CFM.cjs.map +1 -0
- package/dist/chunk-4ZMKB6PV.cjs +2 -0
- package/dist/chunk-4ZMKB6PV.cjs.map +1 -0
- package/dist/chunk-53OWF4GG.js +2 -0
- package/dist/chunk-53OWF4GG.js.map +1 -0
- package/dist/chunk-C4CLTVOW.cjs +2 -0
- package/dist/chunk-C4CLTVOW.cjs.map +1 -0
- package/dist/chunk-DOKMTZYO.cjs +4 -0
- package/dist/chunk-DOKMTZYO.cjs.map +1 -0
- package/dist/chunk-FCGUTI7Y.js +2 -0
- package/dist/chunk-FCGUTI7Y.js.map +1 -0
- package/dist/chunk-IPCIXWCY.js +2 -0
- package/dist/chunk-IPCIXWCY.js.map +1 -0
- package/dist/chunk-KCNOE4DZ.js +19 -0
- package/dist/chunk-KCNOE4DZ.js.map +1 -0
- package/dist/chunk-NRJHX2GZ.js +2 -0
- package/dist/chunk-NRJHX2GZ.js.map +1 -0
- package/dist/chunk-O2J5RKBN.js +2 -0
- package/dist/chunk-O2J5RKBN.js.map +1 -0
- package/dist/chunk-PXUASP5I.js +2 -0
- package/dist/chunk-PXUASP5I.js.map +1 -0
- package/dist/chunk-R7C3ZHVK.cjs +2 -0
- package/dist/chunk-R7C3ZHVK.cjs.map +1 -0
- package/dist/chunk-UHWHUDLE.cjs +2 -0
- package/dist/chunk-UHWHUDLE.cjs.map +1 -0
- package/dist/chunk-WRNYJ54A.cjs +2 -0
- package/dist/chunk-WRNYJ54A.cjs.map +1 -0
- package/dist/chunk-XZQFOICX.cjs +3 -0
- package/dist/chunk-XZQFOICX.cjs.map +1 -0
- package/dist/chunk-YLOQRUXC.js +2 -0
- package/dist/chunk-YLOQRUXC.js.map +1 -0
- package/dist/chunk-YSS2WVCM.cjs +2 -0
- package/dist/chunk-YSS2WVCM.cjs.map +1 -0
- package/dist/chunk-Z5V6VOIN.js +3 -0
- package/dist/chunk-Z5V6VOIN.js.map +1 -0
- package/dist/chunk-ZBFGQPJR.js +4 -0
- package/dist/chunk-ZBFGQPJR.js.map +1 -0
- package/dist/dialects/athena.cjs +2 -0
- package/dist/dialects/athena.cjs.map +1 -0
- package/dist/dialects/athena.d.cts +66 -0
- package/dist/dialects/athena.d.ts +66 -0
- package/dist/dialects/athena.js +2 -0
- package/dist/dialects/athena.js.map +1 -0
- package/dist/dialects/bigquery.cjs +3 -0
- package/dist/dialects/bigquery.cjs.map +1 -0
- package/dist/dialects/bigquery.d.cts +651 -0
- package/dist/dialects/bigquery.d.ts +651 -0
- package/dist/dialects/bigquery.js +3 -0
- package/dist/dialects/bigquery.js.map +1 -0
- package/dist/dialects/clickhouse.cjs +2 -0
- package/dist/dialects/clickhouse.cjs.map +1 -0
- package/dist/dialects/clickhouse.d.cts +634 -0
- package/dist/dialects/clickhouse.d.ts +634 -0
- package/dist/dialects/clickhouse.js +2 -0
- package/dist/dialects/clickhouse.js.map +1 -0
- package/dist/dialects/databricks.cjs +2 -0
- package/dist/dialects/databricks.cjs.map +1 -0
- package/dist/dialects/databricks.d.cts +484 -0
- package/dist/dialects/databricks.d.ts +484 -0
- package/dist/dialects/databricks.js +2 -0
- package/dist/dialects/databricks.js.map +1 -0
- package/dist/dialects/doris.cjs +2 -0
- package/dist/dialects/doris.cjs.map +1 -0
- package/dist/dialects/doris.d.cts +484 -0
- package/dist/dialects/doris.d.ts +484 -0
- package/dist/dialects/doris.js +2 -0
- package/dist/dialects/doris.js.map +1 -0
- package/dist/dialects/dremio.cjs +2 -0
- package/dist/dialects/dremio.cjs.map +1 -0
- package/dist/dialects/dremio.d.cts +522 -0
- package/dist/dialects/dremio.d.ts +522 -0
- package/dist/dialects/dremio.js +2 -0
- package/dist/dialects/dremio.js.map +1 -0
- package/dist/dialects/drill.cjs +2 -0
- package/dist/dialects/drill.cjs.map +1 -0
- package/dist/dialects/drill.d.cts +512 -0
- package/dist/dialects/drill.d.ts +512 -0
- package/dist/dialects/drill.js +2 -0
- package/dist/dialects/drill.js.map +1 -0
- package/dist/dialects/druid.cjs +2 -0
- package/dist/dialects/druid.cjs.map +1 -0
- package/dist/dialects/druid.d.cts +17 -0
- package/dist/dialects/druid.d.ts +17 -0
- package/dist/dialects/druid.js +2 -0
- package/dist/dialects/druid.js.map +1 -0
- package/dist/dialects/duckdb.cjs +86 -0
- package/dist/dialects/duckdb.cjs.map +1 -0
- package/dist/dialects/duckdb.d.cts +756 -0
- package/dist/dialects/duckdb.d.ts +756 -0
- package/dist/dialects/duckdb.js +86 -0
- package/dist/dialects/duckdb.js.map +1 -0
- package/dist/dialects/dune.cjs +2 -0
- package/dist/dialects/dune.cjs.map +1 -0
- package/dist/dialects/dune.d.cts +21 -0
- package/dist/dialects/dune.d.ts +21 -0
- package/dist/dialects/dune.js +2 -0
- package/dist/dialects/dune.js.map +1 -0
- package/dist/dialects/exasol.cjs +2 -0
- package/dist/dialects/exasol.cjs.map +1 -0
- package/dist/dialects/exasol.d.cts +507 -0
- package/dist/dialects/exasol.d.ts +507 -0
- package/dist/dialects/exasol.js +2 -0
- package/dist/dialects/exasol.js.map +1 -0
- package/dist/dialects/fabric.cjs +2 -0
- package/dist/dialects/fabric.cjs.map +1 -0
- package/dist/dialects/fabric.d.cts +463 -0
- package/dist/dialects/fabric.d.ts +463 -0
- package/dist/dialects/fabric.js +2 -0
- package/dist/dialects/fabric.js.map +1 -0
- package/dist/dialects/hive.cjs +2 -0
- package/dist/dialects/hive.cjs.map +1 -0
- package/dist/dialects/hive.d.cts +585 -0
- package/dist/dialects/hive.d.ts +585 -0
- package/dist/dialects/hive.js +2 -0
- package/dist/dialects/hive.js.map +1 -0
- package/dist/dialects/materialize.cjs +2 -0
- package/dist/dialects/materialize.cjs.map +1 -0
- package/dist/dialects/materialize.d.cts +890 -0
- package/dist/dialects/materialize.d.ts +890 -0
- package/dist/dialects/materialize.js +2 -0
- package/dist/dialects/materialize.js.map +1 -0
- package/dist/dialects/mysql.cjs +2 -0
- package/dist/dialects/mysql.cjs.map +1 -0
- package/dist/dialects/mysql.d.cts +292 -0
- package/dist/dialects/mysql.d.ts +292 -0
- package/dist/dialects/mysql.js +2 -0
- package/dist/dialects/mysql.js.map +1 -0
- package/dist/dialects/oracle.cjs +2 -0
- package/dist/dialects/oracle.cjs.map +1 -0
- package/dist/dialects/oracle.d.cts +539 -0
- package/dist/dialects/oracle.d.ts +539 -0
- package/dist/dialects/oracle.js +2 -0
- package/dist/dialects/oracle.js.map +1 -0
- package/dist/dialects/postgres.cjs +2 -0
- package/dist/dialects/postgres.cjs.map +1 -0
- package/dist/dialects/postgres.d.cts +587 -0
- package/dist/dialects/postgres.d.ts +587 -0
- package/dist/dialects/postgres.js +2 -0
- package/dist/dialects/postgres.js.map +1 -0
- package/dist/dialects/presto.cjs +2 -0
- package/dist/dialects/presto.cjs.map +1 -0
- package/dist/dialects/presto.d.cts +173 -0
- package/dist/dialects/presto.d.ts +173 -0
- package/dist/dialects/presto.js +2 -0
- package/dist/dialects/presto.js.map +1 -0
- package/dist/dialects/prql.cjs +2 -0
- package/dist/dialects/prql.cjs.map +1 -0
- package/dist/dialects/prql.d.cts +496 -0
- package/dist/dialects/prql.d.ts +496 -0
- package/dist/dialects/prql.js +2 -0
- package/dist/dialects/prql.js.map +1 -0
- package/dist/dialects/redshift.cjs +2 -0
- package/dist/dialects/redshift.cjs.map +1 -0
- package/dist/dialects/redshift.d.cts +132 -0
- package/dist/dialects/redshift.d.ts +132 -0
- package/dist/dialects/redshift.js +2 -0
- package/dist/dialects/redshift.js.map +1 -0
- package/dist/dialects/risingwave.cjs +2 -0
- package/dist/dialects/risingwave.cjs.map +1 -0
- package/dist/dialects/risingwave.d.cts +478 -0
- package/dist/dialects/risingwave.d.ts +478 -0
- package/dist/dialects/risingwave.js +2 -0
- package/dist/dialects/risingwave.js.map +1 -0
- package/dist/dialects/singlestore.cjs +2 -0
- package/dist/dialects/singlestore.cjs.map +1 -0
- package/dist/dialects/singlestore.d.cts +73 -0
- package/dist/dialects/singlestore.d.ts +73 -0
- package/dist/dialects/singlestore.js +2 -0
- package/dist/dialects/singlestore.js.map +1 -0
- package/dist/dialects/snowflake.cjs +3 -0
- package/dist/dialects/snowflake.cjs.map +1 -0
- package/dist/dialects/snowflake.d.cts +320 -0
- package/dist/dialects/snowflake.d.ts +320 -0
- package/dist/dialects/snowflake.js +3 -0
- package/dist/dialects/snowflake.js.map +1 -0
- package/dist/dialects/solr.cjs +2 -0
- package/dist/dialects/solr.cjs.map +1 -0
- package/dist/dialects/solr.d.cts +458 -0
- package/dist/dialects/solr.d.ts +458 -0
- package/dist/dialects/solr.js +2 -0
- package/dist/dialects/solr.js.map +1 -0
- package/dist/dialects/spark.cjs +2 -0
- package/dist/dialects/spark.cjs.map +1 -0
- package/dist/dialects/spark.d.cts +484 -0
- package/dist/dialects/spark.d.ts +484 -0
- package/dist/dialects/spark.js +2 -0
- package/dist/dialects/spark.js.map +1 -0
- package/dist/dialects/spark2.cjs +2 -0
- package/dist/dialects/spark2.cjs.map +1 -0
- package/dist/dialects/spark2.d.cts +486 -0
- package/dist/dialects/spark2.d.ts +486 -0
- package/dist/dialects/spark2.js +2 -0
- package/dist/dialects/spark2.js.map +1 -0
- package/dist/dialects/sqlite.cjs +2 -0
- package/dist/dialects/sqlite.cjs.map +1 -0
- package/dist/dialects/sqlite.d.cts +510 -0
- package/dist/dialects/sqlite.d.ts +510 -0
- package/dist/dialects/sqlite.js +2 -0
- package/dist/dialects/sqlite.js.map +1 -0
- package/dist/dialects/starrocks.cjs +2 -0
- package/dist/dialects/starrocks.cjs.map +1 -0
- package/dist/dialects/starrocks.d.cts +518 -0
- package/dist/dialects/starrocks.d.ts +518 -0
- package/dist/dialects/starrocks.js +2 -0
- package/dist/dialects/starrocks.js.map +1 -0
- package/dist/dialects/tableau.cjs +2 -0
- package/dist/dialects/tableau.cjs.map +1 -0
- package/dist/dialects/tableau.d.cts +466 -0
- package/dist/dialects/tableau.d.ts +466 -0
- package/dist/dialects/tableau.js +2 -0
- package/dist/dialects/tableau.js.map +1 -0
- package/dist/dialects/teradata.cjs +2 -0
- package/dist/dialects/teradata.cjs.map +1 -0
- package/dist/dialects/teradata.d.cts +539 -0
- package/dist/dialects/teradata.d.ts +539 -0
- package/dist/dialects/teradata.js +2 -0
- package/dist/dialects/teradata.js.map +1 -0
- package/dist/dialects/trino.cjs +2 -0
- package/dist/dialects/trino.cjs.map +1 -0
- package/dist/dialects/trino.d.cts +465 -0
- package/dist/dialects/trino.d.ts +465 -0
- package/dist/dialects/trino.js +2 -0
- package/dist/dialects/trino.js.map +1 -0
- package/dist/dialects/tsql.cjs +2 -0
- package/dist/dialects/tsql.cjs.map +1 -0
- package/dist/dialects/tsql.d.cts +703 -0
- package/dist/dialects/tsql.d.ts +703 -0
- package/dist/dialects/tsql.js +2 -0
- package/dist/dialects/tsql.js.map +1 -0
- package/dist/index.cjs +5 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -14178
- package/dist/index.d.ts +3 -14178
- package/dist/index.js +5 -25
- package/dist/index.js.map +1 -1
- package/dist/tokens-VcMD09XM.d.cts +15805 -0
- package/dist/tokens-VcMD09XM.d.ts +15805 -0
- package/package.json +171 -5
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
import { c as Dialect, d as Dialects, a0 as NormalizationStrategy, m as Tokenizer, _ as TokenPair, l as TokenType, i as Parser, E as Expression, e7 as LockingStatementExpr, e8 as RangeNExpr, e9 as TranslateCharactersExpr, G as Generator, $ as DataTypeExprKind, aj as PropertiesLocation, cH as CurrentTimestampExpr, b8 as CreateExpr, ap as TryCastExpr, bq as TableSampleExpr, a_ as PartitionedByPropertyExpr, ea as UpdateExpr, al as ModExpr, b5 as DataTypeExpr, aL as ExtractExpr, cM as IntervalExpr } from '../tokens-VcMD09XM.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
|
+
dcolon?: typeof Expression | undefined;
|
|
24
|
+
dcolondollar?: typeof Expression | undefined;
|
|
25
|
+
dcolonpercent?: typeof Expression | undefined;
|
|
26
|
+
dcolonqmark?: typeof Expression | undefined;
|
|
27
|
+
dqmark?: typeof Expression | undefined;
|
|
28
|
+
semicolon?: typeof Expression | undefined;
|
|
29
|
+
star?: typeof Expression | undefined;
|
|
30
|
+
backslash?: typeof Expression | undefined;
|
|
31
|
+
slash?: typeof Expression | undefined;
|
|
32
|
+
lt?: typeof Expression | undefined;
|
|
33
|
+
lte?: typeof Expression | undefined;
|
|
34
|
+
gt?: typeof Expression | undefined;
|
|
35
|
+
gte?: typeof Expression | undefined;
|
|
36
|
+
not?: typeof Expression | undefined;
|
|
37
|
+
eq?: typeof Expression | undefined;
|
|
38
|
+
neq?: typeof Expression | undefined;
|
|
39
|
+
nullsafeEq?: typeof Expression | undefined;
|
|
40
|
+
colonEq?: typeof Expression | undefined;
|
|
41
|
+
colonGt?: typeof Expression | undefined;
|
|
42
|
+
ncolonGt?: typeof Expression | undefined;
|
|
43
|
+
and?: typeof Expression | undefined;
|
|
44
|
+
or?: typeof Expression | undefined;
|
|
45
|
+
amp?: typeof Expression | undefined;
|
|
46
|
+
dpipe?: typeof Expression | undefined;
|
|
47
|
+
pipeGt?: typeof Expression | undefined;
|
|
48
|
+
pipe?: typeof Expression | undefined;
|
|
49
|
+
pipeSlash?: typeof Expression | undefined;
|
|
50
|
+
dpipeSlash?: typeof Expression | undefined;
|
|
51
|
+
caret?: typeof Expression | undefined;
|
|
52
|
+
caretAt?: typeof Expression | undefined;
|
|
53
|
+
tilde?: typeof Expression | undefined;
|
|
54
|
+
arrow?: typeof Expression | undefined;
|
|
55
|
+
darrow?: typeof Expression | undefined;
|
|
56
|
+
farrow?: typeof Expression | undefined;
|
|
57
|
+
hash?: typeof Expression | undefined;
|
|
58
|
+
hashArrow?: typeof Expression | undefined;
|
|
59
|
+
dhashArrow?: typeof Expression | undefined;
|
|
60
|
+
lrArrow?: typeof Expression | undefined;
|
|
61
|
+
dat?: typeof Expression | undefined;
|
|
62
|
+
ltAt?: typeof Expression | undefined;
|
|
63
|
+
atGt?: typeof Expression | undefined;
|
|
64
|
+
dollar?: typeof Expression | undefined;
|
|
65
|
+
parameter?: typeof Expression | undefined;
|
|
66
|
+
session?: typeof Expression | undefined;
|
|
67
|
+
sessionParameter?: typeof Expression | undefined;
|
|
68
|
+
sessionUser?: typeof Expression | undefined;
|
|
69
|
+
damp?: typeof Expression | undefined;
|
|
70
|
+
ampLt?: typeof Expression | undefined;
|
|
71
|
+
ampGt?: typeof Expression | undefined;
|
|
72
|
+
adjacent?: typeof Expression | undefined;
|
|
73
|
+
xor?: typeof Expression | undefined;
|
|
74
|
+
dstar?: typeof Expression | undefined;
|
|
75
|
+
qmarkAmp?: typeof Expression | undefined;
|
|
76
|
+
qmarkPipe?: typeof Expression | undefined;
|
|
77
|
+
hashDash?: typeof Expression | undefined;
|
|
78
|
+
exclamation?: typeof Expression | undefined;
|
|
79
|
+
uriStart?: typeof Expression | undefined;
|
|
80
|
+
blockStart?: typeof Expression | undefined;
|
|
81
|
+
blockEnd?: typeof Expression | undefined;
|
|
82
|
+
space?: typeof Expression | undefined;
|
|
83
|
+
break?: typeof Expression | undefined;
|
|
84
|
+
string?: typeof Expression | undefined;
|
|
85
|
+
number?: typeof Expression | undefined;
|
|
86
|
+
identifier?: typeof Expression | undefined;
|
|
87
|
+
database?: typeof Expression | undefined;
|
|
88
|
+
column?: typeof Expression | undefined;
|
|
89
|
+
columnDef?: typeof Expression | undefined;
|
|
90
|
+
schema?: typeof Expression | undefined;
|
|
91
|
+
table?: typeof Expression | undefined;
|
|
92
|
+
warehouse?: typeof Expression | undefined;
|
|
93
|
+
stage?: typeof Expression | undefined;
|
|
94
|
+
streamlit?: typeof Expression | undefined;
|
|
95
|
+
var?: typeof Expression | undefined;
|
|
96
|
+
bitString?: typeof Expression | undefined;
|
|
97
|
+
hexString?: typeof Expression | undefined;
|
|
98
|
+
byteString?: typeof Expression | undefined;
|
|
99
|
+
nationalString?: typeof Expression | undefined;
|
|
100
|
+
rawString?: typeof Expression | undefined;
|
|
101
|
+
heredocString?: typeof Expression | undefined;
|
|
102
|
+
unicodeString?: typeof Expression | undefined;
|
|
103
|
+
bit?: typeof Expression | undefined;
|
|
104
|
+
boolean?: typeof Expression | undefined;
|
|
105
|
+
tinyint?: typeof Expression | undefined;
|
|
106
|
+
utinyint?: typeof Expression | undefined;
|
|
107
|
+
smallint?: typeof Expression | undefined;
|
|
108
|
+
usmallint?: typeof Expression | undefined;
|
|
109
|
+
mediumint?: typeof Expression | undefined;
|
|
110
|
+
umediumint?: typeof Expression | undefined;
|
|
111
|
+
int?: typeof Expression | undefined;
|
|
112
|
+
uint?: typeof Expression | undefined;
|
|
113
|
+
bigint?: typeof Expression | undefined;
|
|
114
|
+
ubigint?: typeof Expression | undefined;
|
|
115
|
+
bignum?: typeof Expression | undefined;
|
|
116
|
+
int128?: typeof Expression | undefined;
|
|
117
|
+
uint128?: typeof Expression | undefined;
|
|
118
|
+
int256?: typeof Expression | undefined;
|
|
119
|
+
uint256?: typeof Expression | undefined;
|
|
120
|
+
float?: typeof Expression | undefined;
|
|
121
|
+
double?: typeof Expression | undefined;
|
|
122
|
+
udouble?: typeof Expression | undefined;
|
|
123
|
+
decimal?: typeof Expression | undefined;
|
|
124
|
+
decimal32?: typeof Expression | undefined;
|
|
125
|
+
decimal64?: typeof Expression | undefined;
|
|
126
|
+
decimal128?: typeof Expression | undefined;
|
|
127
|
+
decimal256?: typeof Expression | undefined;
|
|
128
|
+
decfloat?: typeof Expression | undefined;
|
|
129
|
+
udecimal?: typeof Expression | undefined;
|
|
130
|
+
bigdecimal?: typeof Expression | undefined;
|
|
131
|
+
char?: typeof Expression | undefined;
|
|
132
|
+
nchar?: typeof Expression | undefined;
|
|
133
|
+
varchar?: typeof Expression | undefined;
|
|
134
|
+
nvarchar?: typeof Expression | undefined;
|
|
135
|
+
bpchar?: typeof Expression | undefined;
|
|
136
|
+
text?: typeof Expression | undefined;
|
|
137
|
+
mediumtext?: typeof Expression | undefined;
|
|
138
|
+
longtext?: typeof Expression | undefined;
|
|
139
|
+
blob?: typeof Expression | undefined;
|
|
140
|
+
mediumblob?: typeof Expression | undefined;
|
|
141
|
+
longblob?: typeof Expression | undefined;
|
|
142
|
+
tinyblob?: typeof Expression | undefined;
|
|
143
|
+
tinytext?: typeof Expression | undefined;
|
|
144
|
+
name?: typeof Expression | undefined;
|
|
145
|
+
binary?: typeof Expression | undefined;
|
|
146
|
+
varbinary?: typeof Expression | undefined;
|
|
147
|
+
json?: typeof Expression | undefined;
|
|
148
|
+
jsonb?: typeof Expression | undefined;
|
|
149
|
+
time?: typeof Expression | undefined;
|
|
150
|
+
timetz?: typeof Expression | undefined;
|
|
151
|
+
timeNs?: typeof Expression | undefined;
|
|
152
|
+
timestamp?: typeof Expression | undefined;
|
|
153
|
+
timestamptz?: typeof Expression | undefined;
|
|
154
|
+
timestampltz?: typeof Expression | undefined;
|
|
155
|
+
timestampntz?: typeof Expression | undefined;
|
|
156
|
+
timestampS?: typeof Expression | undefined;
|
|
157
|
+
timestampMs?: typeof Expression | undefined;
|
|
158
|
+
timestampNs?: typeof Expression | undefined;
|
|
159
|
+
datetime?: typeof Expression | undefined;
|
|
160
|
+
datetime2?: typeof Expression | undefined;
|
|
161
|
+
datetime64?: typeof Expression | undefined;
|
|
162
|
+
smalldatetime?: typeof Expression | undefined;
|
|
163
|
+
date?: typeof Expression | undefined;
|
|
164
|
+
date32?: typeof Expression | undefined;
|
|
165
|
+
int4range?: typeof Expression | undefined;
|
|
166
|
+
int4multirange?: typeof Expression | undefined;
|
|
167
|
+
int8range?: typeof Expression | undefined;
|
|
168
|
+
int8multirange?: typeof Expression | undefined;
|
|
169
|
+
numrange?: typeof Expression | undefined;
|
|
170
|
+
nummultirange?: typeof Expression | undefined;
|
|
171
|
+
tsrange?: typeof Expression | undefined;
|
|
172
|
+
tsmultirange?: typeof Expression | undefined;
|
|
173
|
+
tstzrange?: typeof Expression | undefined;
|
|
174
|
+
tstzmultirange?: typeof Expression | undefined;
|
|
175
|
+
daterange?: typeof Expression | undefined;
|
|
176
|
+
datemultirange?: typeof Expression | undefined;
|
|
177
|
+
uuid?: typeof Expression | undefined;
|
|
178
|
+
geography?: typeof Expression | undefined;
|
|
179
|
+
geographypoint?: typeof Expression | undefined;
|
|
180
|
+
nullable?: typeof Expression | undefined;
|
|
181
|
+
geometry?: typeof Expression | undefined;
|
|
182
|
+
point?: typeof Expression | undefined;
|
|
183
|
+
ring?: typeof Expression | undefined;
|
|
184
|
+
linestring?: typeof Expression | undefined;
|
|
185
|
+
localtime?: typeof Expression | undefined;
|
|
186
|
+
localtimestamp?: typeof Expression | undefined;
|
|
187
|
+
systimestamp?: typeof Expression | undefined;
|
|
188
|
+
multilinestring?: typeof Expression | undefined;
|
|
189
|
+
polygon?: typeof Expression | undefined;
|
|
190
|
+
multipolygon?: typeof Expression | undefined;
|
|
191
|
+
hllsketch?: typeof Expression | undefined;
|
|
192
|
+
hstore?: typeof Expression | undefined;
|
|
193
|
+
super?: typeof Expression | undefined;
|
|
194
|
+
serial?: typeof Expression | undefined;
|
|
195
|
+
smallserial?: typeof Expression | undefined;
|
|
196
|
+
bigserial?: typeof Expression | undefined;
|
|
197
|
+
xml?: typeof Expression | undefined;
|
|
198
|
+
year?: typeof Expression | undefined;
|
|
199
|
+
userdefined?: typeof Expression | undefined;
|
|
200
|
+
money?: typeof Expression | undefined;
|
|
201
|
+
smallmoney?: typeof Expression | undefined;
|
|
202
|
+
rowversion?: typeof Expression | undefined;
|
|
203
|
+
image?: typeof Expression | undefined;
|
|
204
|
+
variant?: typeof Expression | undefined;
|
|
205
|
+
object?: typeof Expression | undefined;
|
|
206
|
+
inet?: typeof Expression | undefined;
|
|
207
|
+
ipaddress?: typeof Expression | undefined;
|
|
208
|
+
ipprefix?: typeof Expression | undefined;
|
|
209
|
+
ipv4?: typeof Expression | undefined;
|
|
210
|
+
ipv6?: typeof Expression | undefined;
|
|
211
|
+
enum?: typeof Expression | undefined;
|
|
212
|
+
enum8?: typeof Expression | undefined;
|
|
213
|
+
enum16?: typeof Expression | undefined;
|
|
214
|
+
fixedstring?: typeof Expression | undefined;
|
|
215
|
+
lowcardinality?: typeof Expression | undefined;
|
|
216
|
+
nested?: typeof Expression | undefined;
|
|
217
|
+
aggregatefunction?: typeof Expression | undefined;
|
|
218
|
+
simpleaggregatefunction?: typeof Expression | undefined;
|
|
219
|
+
tdigest?: typeof Expression | undefined;
|
|
220
|
+
unknown?: typeof Expression | undefined;
|
|
221
|
+
vector?: typeof Expression | undefined;
|
|
222
|
+
dynamic?: typeof Expression | undefined;
|
|
223
|
+
void?: typeof Expression | undefined;
|
|
224
|
+
alias?: typeof Expression | undefined;
|
|
225
|
+
alter?: typeof Expression | undefined;
|
|
226
|
+
all?: typeof Expression | undefined;
|
|
227
|
+
anti?: typeof Expression | undefined;
|
|
228
|
+
any?: typeof Expression | undefined;
|
|
229
|
+
apply?: typeof Expression | undefined;
|
|
230
|
+
array?: typeof Expression | undefined;
|
|
231
|
+
asc?: typeof Expression | undefined;
|
|
232
|
+
asof?: typeof Expression | undefined;
|
|
233
|
+
attach?: typeof Expression | undefined;
|
|
234
|
+
autoIncrement?: typeof Expression | undefined;
|
|
235
|
+
begin?: typeof Expression | undefined;
|
|
236
|
+
between?: typeof Expression | undefined;
|
|
237
|
+
bulkCollectInto?: typeof Expression | undefined;
|
|
238
|
+
cache?: typeof Expression | undefined;
|
|
239
|
+
case?: typeof Expression | undefined;
|
|
240
|
+
characterSet?: typeof Expression | undefined;
|
|
241
|
+
clusterBy?: typeof Expression | undefined;
|
|
242
|
+
collate?: typeof Expression | undefined;
|
|
243
|
+
command?: typeof Expression | undefined;
|
|
244
|
+
comment?: typeof Expression | undefined;
|
|
245
|
+
commit?: typeof Expression | undefined;
|
|
246
|
+
connectBy?: typeof Expression | undefined;
|
|
247
|
+
constraint?: typeof Expression | undefined;
|
|
248
|
+
copy?: typeof Expression | undefined;
|
|
249
|
+
create?: typeof Expression | undefined;
|
|
250
|
+
cross?: typeof Expression | undefined;
|
|
251
|
+
cube?: typeof Expression | undefined;
|
|
252
|
+
currentDate?: typeof Expression | undefined;
|
|
253
|
+
currentDatetime?: typeof Expression | undefined;
|
|
254
|
+
currentSchema?: typeof Expression | undefined;
|
|
255
|
+
currentTime?: typeof Expression | undefined;
|
|
256
|
+
currentTimestamp?: typeof Expression | undefined;
|
|
257
|
+
currentUser?: typeof Expression | undefined;
|
|
258
|
+
currentRole?: typeof Expression | undefined;
|
|
259
|
+
currentCatalog?: typeof Expression | undefined;
|
|
260
|
+
declare?: typeof Expression | undefined;
|
|
261
|
+
default?: typeof Expression | undefined;
|
|
262
|
+
delete?: typeof Expression | undefined;
|
|
263
|
+
desc?: typeof Expression | undefined;
|
|
264
|
+
describe?: typeof Expression | undefined;
|
|
265
|
+
detach?: typeof Expression | undefined;
|
|
266
|
+
dictionary?: typeof Expression | undefined;
|
|
267
|
+
distinct?: typeof Expression | undefined;
|
|
268
|
+
distributeBy?: typeof Expression | undefined;
|
|
269
|
+
div?: typeof Expression | undefined;
|
|
270
|
+
drop?: typeof Expression | undefined;
|
|
271
|
+
else?: typeof Expression | undefined;
|
|
272
|
+
end?: typeof Expression | undefined;
|
|
273
|
+
escape?: typeof Expression | undefined;
|
|
274
|
+
except?: typeof Expression | undefined;
|
|
275
|
+
execute?: typeof Expression | undefined;
|
|
276
|
+
exists?: typeof Expression | undefined;
|
|
277
|
+
false?: typeof Expression | undefined;
|
|
278
|
+
fetch?: typeof Expression | undefined;
|
|
279
|
+
file?: typeof Expression | undefined;
|
|
280
|
+
fileFormat?: typeof Expression | undefined;
|
|
281
|
+
filter?: typeof Expression | undefined;
|
|
282
|
+
final?: typeof Expression | undefined;
|
|
283
|
+
first?: typeof Expression | undefined;
|
|
284
|
+
for?: typeof Expression | undefined;
|
|
285
|
+
force?: typeof Expression | undefined;
|
|
286
|
+
foreignKey?: typeof Expression | undefined;
|
|
287
|
+
format?: typeof Expression | undefined;
|
|
288
|
+
from?: typeof Expression | undefined;
|
|
289
|
+
full?: typeof Expression | undefined;
|
|
290
|
+
function?: typeof Expression | undefined;
|
|
291
|
+
get?: typeof Expression | undefined;
|
|
292
|
+
glob?: typeof Expression | undefined;
|
|
293
|
+
global?: typeof Expression | undefined;
|
|
294
|
+
grant?: typeof Expression | undefined;
|
|
295
|
+
groupBy?: typeof Expression | undefined;
|
|
296
|
+
groupingSets?: typeof Expression | undefined;
|
|
297
|
+
having?: typeof Expression | undefined;
|
|
298
|
+
hint?: typeof Expression | undefined;
|
|
299
|
+
ignore?: typeof Expression | undefined;
|
|
300
|
+
ilike?: typeof Expression | undefined;
|
|
301
|
+
in?: typeof Expression | undefined;
|
|
302
|
+
index?: typeof Expression | undefined;
|
|
303
|
+
indexedBy?: typeof Expression | undefined;
|
|
304
|
+
inner?: typeof Expression | undefined;
|
|
305
|
+
insert?: typeof Expression | undefined;
|
|
306
|
+
install?: typeof Expression | undefined;
|
|
307
|
+
intersect?: typeof Expression | undefined;
|
|
308
|
+
interval?: typeof Expression | undefined;
|
|
309
|
+
into?: typeof Expression | undefined;
|
|
310
|
+
introducer?: typeof Expression | undefined;
|
|
311
|
+
irlike?: typeof Expression | undefined;
|
|
312
|
+
is?: typeof Expression | undefined;
|
|
313
|
+
isnull?: typeof Expression | undefined;
|
|
314
|
+
join?: typeof Expression | undefined;
|
|
315
|
+
joinMarker?: typeof Expression | undefined;
|
|
316
|
+
keep?: typeof Expression | undefined;
|
|
317
|
+
key?: typeof Expression | undefined;
|
|
318
|
+
kill?: typeof Expression | undefined;
|
|
319
|
+
language?: typeof Expression | undefined;
|
|
320
|
+
lateral?: typeof Expression | undefined;
|
|
321
|
+
left?: typeof Expression | undefined;
|
|
322
|
+
like?: typeof Expression | undefined;
|
|
323
|
+
limit?: typeof Expression | undefined;
|
|
324
|
+
list?: typeof Expression | undefined;
|
|
325
|
+
load?: typeof Expression | undefined;
|
|
326
|
+
lock?: typeof Expression | undefined;
|
|
327
|
+
map?: typeof Expression | undefined;
|
|
328
|
+
match?: typeof Expression | undefined;
|
|
329
|
+
matchCondition?: typeof Expression | undefined;
|
|
330
|
+
matchRecognize?: typeof Expression | undefined;
|
|
331
|
+
memberOf?: typeof Expression | undefined;
|
|
332
|
+
merge?: typeof Expression | undefined;
|
|
333
|
+
mod?: typeof Expression | undefined;
|
|
334
|
+
model?: typeof Expression | undefined;
|
|
335
|
+
natural?: typeof Expression | undefined;
|
|
336
|
+
next?: typeof Expression | undefined;
|
|
337
|
+
nothing?: typeof Expression | undefined;
|
|
338
|
+
notnull?: typeof Expression | undefined;
|
|
339
|
+
null?: typeof Expression | undefined;
|
|
340
|
+
objectIdentifier?: typeof Expression | undefined;
|
|
341
|
+
offset?: typeof Expression | undefined;
|
|
342
|
+
on?: typeof Expression | undefined;
|
|
343
|
+
only?: typeof Expression | undefined;
|
|
344
|
+
operator?: typeof Expression | undefined;
|
|
345
|
+
orderBy?: typeof Expression | undefined;
|
|
346
|
+
orderSiblingsBy?: typeof Expression | undefined;
|
|
347
|
+
ordered?: typeof Expression | undefined;
|
|
348
|
+
ordinality?: typeof Expression | undefined;
|
|
349
|
+
out?: typeof Expression | undefined;
|
|
350
|
+
inout?: typeof Expression | undefined;
|
|
351
|
+
outer?: typeof Expression | undefined;
|
|
352
|
+
over?: typeof Expression | undefined;
|
|
353
|
+
overlaps?: typeof Expression | undefined;
|
|
354
|
+
overwrite?: typeof Expression | undefined;
|
|
355
|
+
partition?: typeof Expression | undefined;
|
|
356
|
+
partitionBy?: typeof Expression | undefined;
|
|
357
|
+
percent?: typeof Expression | undefined;
|
|
358
|
+
pivot?: typeof Expression | undefined;
|
|
359
|
+
placeholder?: typeof Expression | undefined;
|
|
360
|
+
positional?: typeof Expression | undefined;
|
|
361
|
+
pragma?: typeof Expression | undefined;
|
|
362
|
+
prewhere?: typeof Expression | undefined;
|
|
363
|
+
primaryKey?: typeof Expression | undefined;
|
|
364
|
+
procedure?: typeof Expression | undefined;
|
|
365
|
+
properties?: typeof Expression | undefined;
|
|
366
|
+
pseudoType?: typeof Expression | undefined;
|
|
367
|
+
put?: typeof Expression | undefined;
|
|
368
|
+
qualify?: typeof Expression | undefined;
|
|
369
|
+
quote?: typeof Expression | undefined;
|
|
370
|
+
qdcolon?: typeof Expression | undefined;
|
|
371
|
+
range?: typeof Expression | undefined;
|
|
372
|
+
recursive?: typeof Expression | undefined;
|
|
373
|
+
refresh?: typeof Expression | undefined;
|
|
374
|
+
rename?: typeof Expression | undefined;
|
|
375
|
+
replace?: typeof Expression | undefined;
|
|
376
|
+
returning?: typeof Expression | undefined;
|
|
377
|
+
revoke?: typeof Expression | undefined;
|
|
378
|
+
references?: typeof Expression | undefined;
|
|
379
|
+
right?: typeof Expression | undefined;
|
|
380
|
+
rlike?: typeof Expression | undefined;
|
|
381
|
+
rollback?: typeof Expression | undefined;
|
|
382
|
+
rollup?: typeof Expression | undefined;
|
|
383
|
+
row?: typeof Expression | undefined;
|
|
384
|
+
rows?: typeof Expression | undefined;
|
|
385
|
+
select?: typeof Expression | undefined;
|
|
386
|
+
semi?: typeof Expression | undefined;
|
|
387
|
+
separator?: typeof Expression | undefined;
|
|
388
|
+
sequence?: typeof Expression | undefined;
|
|
389
|
+
serdeProperties?: typeof Expression | undefined;
|
|
390
|
+
set?: typeof Expression | undefined;
|
|
391
|
+
settings?: typeof Expression | undefined;
|
|
392
|
+
show?: typeof Expression | undefined;
|
|
393
|
+
similarTo?: typeof Expression | undefined;
|
|
394
|
+
some?: typeof Expression | undefined;
|
|
395
|
+
sortBy?: typeof Expression | undefined;
|
|
396
|
+
soundsLike?: typeof Expression | undefined;
|
|
397
|
+
startWith?: typeof Expression | undefined;
|
|
398
|
+
storageIntegration?: typeof Expression | undefined;
|
|
399
|
+
straightJoin?: typeof Expression | undefined;
|
|
400
|
+
struct?: typeof Expression | undefined;
|
|
401
|
+
summarize?: typeof Expression | undefined;
|
|
402
|
+
tableSample?: typeof Expression | undefined;
|
|
403
|
+
tag?: typeof Expression | undefined;
|
|
404
|
+
temporary?: typeof Expression | undefined;
|
|
405
|
+
top?: typeof Expression | undefined;
|
|
406
|
+
then?: typeof Expression | undefined;
|
|
407
|
+
true?: typeof Expression | undefined;
|
|
408
|
+
truncate?: typeof Expression | undefined;
|
|
409
|
+
uncache?: typeof Expression | undefined;
|
|
410
|
+
union?: typeof Expression | undefined;
|
|
411
|
+
unnest?: typeof Expression | undefined;
|
|
412
|
+
unpivot?: typeof Expression | undefined;
|
|
413
|
+
update?: typeof Expression | undefined;
|
|
414
|
+
use?: typeof Expression | undefined;
|
|
415
|
+
using?: typeof Expression | undefined;
|
|
416
|
+
values?: typeof Expression | undefined;
|
|
417
|
+
variadic?: typeof Expression | undefined;
|
|
418
|
+
view?: typeof Expression | undefined;
|
|
419
|
+
semanticView?: typeof Expression | undefined;
|
|
420
|
+
volatile?: typeof Expression | undefined;
|
|
421
|
+
when?: typeof Expression | undefined;
|
|
422
|
+
where?: typeof Expression | undefined;
|
|
423
|
+
window?: typeof Expression | undefined;
|
|
424
|
+
with?: typeof Expression | undefined;
|
|
425
|
+
unique?: typeof Expression | undefined;
|
|
426
|
+
utcDate?: typeof Expression | undefined;
|
|
427
|
+
utcTime?: typeof Expression | undefined;
|
|
428
|
+
utcTimestamp?: typeof Expression | undefined;
|
|
429
|
+
versionSnapshot?: typeof Expression | undefined;
|
|
430
|
+
timestampSnapshot?: typeof Expression | undefined;
|
|
431
|
+
option?: typeof Expression | undefined;
|
|
432
|
+
sink?: typeof Expression | undefined;
|
|
433
|
+
source?: typeof Expression | undefined;
|
|
434
|
+
analyze?: typeof Expression | undefined;
|
|
435
|
+
namespace?: typeof Expression | undefined;
|
|
436
|
+
export?: typeof Expression | undefined;
|
|
437
|
+
hiveTokenStream?: typeof Expression | undefined;
|
|
438
|
+
};
|
|
439
|
+
static TABLESAMPLE_CSV: boolean;
|
|
440
|
+
static VALUES_FOLLOWED_BY_PAREN: boolean;
|
|
441
|
+
static get CHARSET_TRANSLATORS(): Set<string>;
|
|
442
|
+
static get FUNC_TOKENS(): Set<TokenType>;
|
|
443
|
+
static get STATEMENT_PARSERS(): Record<TokenType | string, (this: Parser) => Expression | Expression[] | undefined>;
|
|
444
|
+
static get SET_PARSERS(): Record<string, (this: Parser) => Expression | undefined>;
|
|
445
|
+
static get FUNCTION_PARSERS(): Partial<Record<string, (this: Parser) => Expression | undefined>>;
|
|
446
|
+
static get FUNCTIONS(): Record<string, (args: Expression[]) => Expression>;
|
|
447
|
+
static get EXPONENT(): Partial<Record<TokenType, typeof Expression>>;
|
|
448
|
+
parseLockingStatement(): LockingStatementExpr;
|
|
449
|
+
parseRangeN(): RangeNExpr;
|
|
450
|
+
parseTranslate(): TranslateCharactersExpr;
|
|
451
|
+
parseFunction(options?: {
|
|
452
|
+
functions?: Record<string, Function>;
|
|
453
|
+
anonymous?: boolean;
|
|
454
|
+
optionalParens?: boolean;
|
|
455
|
+
anyToken?: boolean;
|
|
456
|
+
}): Expression | undefined;
|
|
457
|
+
parseColumnOps(thisExpr?: Expression): Expression | undefined;
|
|
458
|
+
parseQueryBand(): Expression | undefined;
|
|
459
|
+
static get TABLE_ALIAS_TOKENS(): Set<TokenType>;
|
|
460
|
+
}
|
|
461
|
+
declare class TeradataGenerator extends Generator {
|
|
462
|
+
static get AFTER_HAVING_MODIFIER_TRANSFORMS(): Map<string, (this: Generator, e: Expression) => string>;
|
|
463
|
+
static SUPPORTS_DECODE_CASE: boolean;
|
|
464
|
+
static readonly SELECT_KINDS: string[];
|
|
465
|
+
static TRY_SUPPORTED: boolean;
|
|
466
|
+
static SUPPORTS_UESCAPE: boolean;
|
|
467
|
+
static LIMIT_IS_TOP: boolean;
|
|
468
|
+
static JOIN_HINTS: boolean;
|
|
469
|
+
static TABLE_HINTS: boolean;
|
|
470
|
+
static QUERY_HINTS: boolean;
|
|
471
|
+
static TABLESAMPLE_KEYWORDS: string;
|
|
472
|
+
static LAST_DAY_SUPPORTS_DATE_PART: boolean;
|
|
473
|
+
static CAN_IMPLEMENT_ARRAY_ANY: boolean;
|
|
474
|
+
static TZ_TO_WITH_TIME_ZONE: boolean;
|
|
475
|
+
static ARRAY_SIZE_NAME: string;
|
|
476
|
+
static NVL2_SUPPORTED: boolean;
|
|
477
|
+
static SUPPORTS_TO_NUMBER: boolean;
|
|
478
|
+
static EXCEPT_INTERSECT_SUPPORT_ALL_CLAUSE: boolean;
|
|
479
|
+
static SUPPORTS_MEDIAN: boolean;
|
|
480
|
+
static get TYPE_MAPPING(): Map<DataTypeExprKind | string, string>;
|
|
481
|
+
static get PROPERTIES_LOCATION(): Map<typeof Expression, PropertiesLocation>;
|
|
482
|
+
static get ORIGINAL_TRANSFORMS(): Map<typeof Expression, (this: Generator, e: any) => string>;
|
|
483
|
+
currentTimestampSql(expression: CurrentTimestampExpr): string;
|
|
484
|
+
createableSql(expression: CreateExpr, locations: Map<string, Expression[]>): string;
|
|
485
|
+
castSql(expression: Expression, options?: {
|
|
486
|
+
safePrefix?: string;
|
|
487
|
+
}): string;
|
|
488
|
+
tryCastSql(expression: TryCastExpr): string;
|
|
489
|
+
tableSampleSql(expression: TableSampleExpr, _options?: {
|
|
490
|
+
tablesampleKeyword?: string;
|
|
491
|
+
}): string;
|
|
492
|
+
partitionedByPropertySql(expression: PartitionedByPropertyExpr): string;
|
|
493
|
+
updateSql(expression: UpdateExpr): string;
|
|
494
|
+
modSql(expression: ModExpr): string;
|
|
495
|
+
dataTypeSql(expression: DataTypeExpr): string;
|
|
496
|
+
rangeNSql(expression: RangeNExpr): string;
|
|
497
|
+
lockingStatementSql(expression: LockingStatementExpr): string;
|
|
498
|
+
extractSql(expression: ExtractExpr): string;
|
|
499
|
+
intervalSql(expression: IntervalExpr): string;
|
|
500
|
+
}
|
|
501
|
+
declare class Teradata extends Dialect {
|
|
502
|
+
static DIALECT_NAME: Dialects;
|
|
503
|
+
static get NORMALIZATION_STRATEGY(): NormalizationStrategy;
|
|
504
|
+
static SUPPORTS_SEMI_ANTI_JOIN: boolean;
|
|
505
|
+
static TYPED_DIVISION: boolean;
|
|
506
|
+
static get TIME_MAPPING(): {
|
|
507
|
+
YY: string;
|
|
508
|
+
Y4: string;
|
|
509
|
+
YYYY: string;
|
|
510
|
+
M4: string;
|
|
511
|
+
M3: string;
|
|
512
|
+
M: string;
|
|
513
|
+
MI: string;
|
|
514
|
+
MM: string;
|
|
515
|
+
MMM: string;
|
|
516
|
+
MMMM: string;
|
|
517
|
+
D: string;
|
|
518
|
+
DD: string;
|
|
519
|
+
D3: string;
|
|
520
|
+
DDD: string;
|
|
521
|
+
H: string;
|
|
522
|
+
HH: string;
|
|
523
|
+
HH24: string;
|
|
524
|
+
S: string;
|
|
525
|
+
SS: string;
|
|
526
|
+
SSSSSS: string;
|
|
527
|
+
E: string;
|
|
528
|
+
EE: string;
|
|
529
|
+
E3: string;
|
|
530
|
+
E4: string;
|
|
531
|
+
EEE: string;
|
|
532
|
+
EEEE: string;
|
|
533
|
+
};
|
|
534
|
+
static Tokenizer: typeof TeradataTokenizer;
|
|
535
|
+
static Parser: typeof TeradataParser;
|
|
536
|
+
static Generator: typeof TeradataGenerator;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export { Teradata, TeradataGenerator, TeradataParser, TeradataTokenizer };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$c as R,$g as U,$p as It,Bk as rt,Cc as m,Ck as K,Ep as lt,Fk as it,Fq as _t,Hl as ot,Ia as Y,Id as k,Kf as M,Pe as V,Po as Nt,Qf as v,Sa as H,Sf as X,So as ut,Td as $,Tj as et,Ub as g,Wd as Q,We as W,Wh as st,Xq as P,_p as Ot,a as l,b as O,bh as q,bp as At,c as I,ca as h,d as i,fe as L,fh as Z,gk as y,lp as _,mc as B,mo as ht,op as b,pp as C,r as n,sc as F,sn as at,td as w,tl as nt,ud as J,uh as z,vm as St,vn as ct,wh as tt,wl as Et,wm as Tt,xg as j,xl as pt,za as S,zk as d}from"../chunk-KCNOE4DZ.js";function xt(u){return function(a){let t=this.sql(a,"this"),s=a.args.unit,e=a.args.expression&&this.simplifyUnlessLiteral(a.args.expression);e instanceof R||this.unsupported("Cannot add non literal");let E;return e instanceof W?(E=u==="+"?"-":"+",e=R.string(e.args.this.toValue())):(E=u,e.setArgKey("isString",!0)),`${t} ${E} ${this.sql(new L({this:e,unit:s}))}`}}var Rt,Ct,Pt,Dt,x,c=class extends(Dt=P,Pt=[n],Ct=[n],Rt=[n],Dt){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}};x=l(Dt),i(x,10,"HEX_STRINGS",Pt,c),i(x,10,"ORIGINAL_KEYWORDS",Ct,c),i(x,10,"SINGLE_TOKENS",Rt,c),O(x,c),I(x,3,c);var ft,gt,mt,Lt,Mt,Ut,qt,yt,dt,Kt,bt,T,p=class p extends(bt=S,Kt=[n],dt=[n],yt=[n],qt=[n],Ut=[n],Mt=[n],Lt=[n],mt=[n],gt=[n],ft=[n],bt){static get ID_VAR_TOKENS(){return new Set([...S.ID_VAR_TOKENS,"sessionUser","currentCatalog","straightJoin"])}static get NO_PAREN_FUNCTIONS(){let t={...S.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(S.FUNC_TOKENS);return t.delete("replace"),t})()}static get STATEMENT_PARSERS(){return{...S.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{...S.SET_PARSERS,QUERY_BAND:function(){return this.parseQueryBand()}}}static get FUNCTION_PARSERS(){return{...S.FUNCTION_PARSERS,TRYCAST:S.FUNCTION_PARSERS.TRY_CAST,RANGE_N:function(){return this.parseRangeN()},TRANSLATE:function(){return this.parseTranslate()}}}static get FUNCTIONS(){return{...S.FUNCTIONS,CARDINALITY:t=>j.fromArgList(t),RANDOM:t=>new K({lower:h(t,0),upper:h(t,1)}),DATE:t=>new U({expressions:t}),HASHMD5:t=>new y({this:h(t,0)}),LOG:t=>new et({this:h(t,1),expression:h(t,0)}),TIME:t=>new q({expressions:t})}}static get EXPONENT(){return{...S.EXPONENT,dstar:d}}parseLockingStatement(){let t=this.parseLocking(),s=this.parseSelect();return s||this.raiseError("Expected SELECT statement after LOCKING clause"),this.expression(Y,{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(it,{this:t,expressions:s,each:e||void 0})}parseTranslate(){let t=this.parseAssignment();return this.match("using"),this.matchTexts(p.CHARSET_TRANSLATORS),this.expression(F,{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(B,{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(H,{this:t,scope:e,update:s})}static get TABLE_ALIAS_TOKENS(){return new Set([...S.TABLE_ALIAS_TOKENS,"straightJoin"])}};T=l(bt),i(T,10,"ID_VAR_TOKENS",Kt,p),i(T,10,"NO_PAREN_FUNCTIONS",dt,p),i(T,10,"CHARSET_TRANSLATORS",yt,p),i(T,10,"FUNC_TOKENS",qt,p),i(T,10,"STATEMENT_PARSERS",Ut,p),i(T,10,"SET_PARSERS",Mt,p),i(T,10,"FUNCTION_PARSERS",Lt,p),i(T,10,"FUNCTIONS",mt,p),i(T,10,"EXPONENT",gt,p),i(T,10,"TABLE_ALIAS_TOKENS",ft,p),O(T,p),I(T,3,p),p.TABLESAMPLE_CSV=!0,p.VALUES_FOLLOWED_BY_PAREN=!1;var G=p,Gt,Yt,Ht,Bt,Ft,N,r=class extends(Ft=_,Bt=[n],Ht=[n],Yt=[n],Gt=[n],Ft){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(_.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(_.PROPERTIES_LOCATION);return t.set(w,"postIndex"),t.set(J,"postExpression"),t.set(k,"postCreate"),t}static get ORIGINAL_TRANSFORMS(){let t=new Map(_.TRANSFORMS);return t.set(St,C("MAX_BY")),t.set(Tt,C("MIN_BY")),t.set(U,()=>"DATE"),t.set(q,()=>"TIME"),t.set(Z,function(s){return this.currentTimestampSql(s)}),t.set(at,function(s){return It.call(this,s)}),t.set(ct,function(s){return Ot.call(this,s)}),t.set(y,C("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(Q,Nt([ut,At])),t.set(nt,function(s){return lt.call(this,s,{funcName:"INSTR",supportsPosition:!0,supportsOccurrence:!0})}),t.set(Et,function(s){return`CAST(${this.sql(s,"this")} AS DATE FORMAT ${this.formatTime(s)})`}),t.set(pt,function(s){return this.castSql(s)}),t.set(ot,function(s){return this.func("TO_CHAR",[s.args.this,this.formatTime(s)])}),t.set(v,function(s){return this.functionFallbackSql(s)}),t.set(X,_t),t.set(m,function(s){return`DATABASE ${this.sql(s,"this")}`}),t.set(z,function(s){return xt("+").call(this,s)}),t.set(tt,function(s){return xt("-").call(this,s)}),t.set(rt,function(s){return this.sql(new st({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(),E=s.get("postName");if(e==="TABLE"&&E?.length){let A=this.sql(t.args.this.args.this),f=this.properties(new $({expressions:E}),{wrapped:!1,prefix:","}),$t=this.schemaColumnsSql(t.args.this);return`${A}${f}${this.sep()}${$t}`}return super.createableSql(t,s)}castSql(t,s={}){let{safePrefix:e}=s,E=t.args.to;return E&&E.args.this==="unknown"&&t.args.format&&E.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"),E=this.expressions(t,{flat:!0}),A=this.sql(t,"where"),f=`UPDATE ${s}${e} SET ${E}${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),E=this.sql(t,"each"),A=E?` EACH ${E}`:"";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??"",R.string("Q")]});return this.sql(ht(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 E=new L({this:t.args.this,unit:new g({this:"DAY"})});return`(${e} * ${super.intervalSql(E)})`}return super.intervalSql(t)}};N=l(Ft),i(N,10,"AFTER_HAVING_MODIFIER_TRANSFORMS",Bt,r),i(N,10,"TYPE_MAPPING",Ht,r),i(N,10,"PROPERTIES_LOCATION",Yt,r),i(N,10,"ORIGINAL_TRANSFORMS",Gt,r),O(N,r),I(N,3,r),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 wt,Jt,kt,D,o=class extends(kt=b,Jt=[n],wt=[n],kt){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(kt),i(D,10,"NORMALIZATION_STRATEGY",Jt,o),i(D,10,"TIME_MAPPING",wt,o),O(D,o),I(D,3,o),o.DIALECT_NAME="teradata",o.SUPPORTS_SEMI_ANTI_JOIN=!1,o.TYPED_DIVISION=!0,o.Tokenizer=c,o.Parser=G,o.Generator=r;b.register("teradata",o);export{o as Teradata,r as TeradataGenerator,G as TeradataParser,c as TeradataTokenizer};
|
|
2
|
+
//# sourceMappingURL=teradata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/dialects/teradata.ts"],"sourcesContent":["import {\n cache,\n} from '../port_internals';\nimport {\n Generator,\n} from '../generator';\nimport {\n Parser,\n} from '../parser';\nimport type {\n TokenPair,\n} from '../tokens';\nimport {\n Tokenizer, TokenType,\n} from '../tokens';\nimport type {\n Expression,\n DataTypeExpr,\n UpdateExpr,\n TryCastExpr,\n FuncExpr,\n JsonExtractExpr,\n TableSampleExpr,\n SchemaExpr,\n CreateExpr,\n} from '../expressions';\nimport {\n Md5Expr,\n CurrentDateExpr,\n CurrentTimeExpr,\n CurrentTimestampExpr,\n LogExpr,\n ModExpr,\n SelectExpr,\n StrToTimeExpr,\n TimeToStrExpr,\n DataTypeExprKind,\n ArgMaxExpr,\n ArgMinExpr,\n MaxExpr,\n MinExpr,\n PowExpr,\n RandExpr,\n StrPositionExpr,\n StrToDateExpr,\n ToCharExpr,\n ToNumberExpr,\n UseExpr,\n QuarterExpr,\n LockingStatementExpr,\n RangeNExpr,\n LiteralExpr,\n NegExpr,\n IntervalExpr,\n PropertiesLocation,\n OnCommitPropertyExpr,\n PartitionedByPropertyExpr,\n StabilityPropertyExpr,\n ExtractExpr,\n DateAddExpr,\n DateSubExpr,\n AnonymousExpr,\n TranslateCharactersExpr,\n VarExpr,\n cast,\n QueryBandExpr,\n ArraySizeExpr,\n FormatPhraseExpr,\n PropertiesExpr,\n} from '../expressions';\nimport {\n seqGet,\n} from '../helper';\nimport {\n eliminateDistinctOn, eliminateSemiAndAntiJoins, preprocess,\n} from '../transforms';\nimport {\n maxOrGreatest,\n minOrLeast,\n strPositionSql,\n toNumberWithNlsParam,\n Dialect, NormalizationStrategy, Dialects,\n renameFunc,\n} from './dialect';\n\nfunction dateAddSqlTd (\n kind: '+' | '-',\n): (this: Generator, expression: DateAddExpr | DateSubExpr) => string {\n return function (this: Generator, expression: DateAddExpr | DateSubExpr): string {\n const thisSql = this.sql(expression, 'this');\n const unit = expression.args.unit;\n let value = expression.args.expression && this.simplifyUnlessLiteral(expression.args.expression);\n\n if (!(value instanceof LiteralExpr)) {\n this.unsupported('Cannot add non literal');\n }\n\n let kindToOp: string;\n if (value instanceof NegExpr) {\n kindToOp = kind === '+' ? '-' : '+';\n value = LiteralExpr.string((value.args.this as LiteralExpr).toValue());\n } else {\n kindToOp = kind;\n (value as LiteralExpr).setArgKey('isString', true);\n }\n\n return `${thisSql} ${kindToOp} ${this.sql(new IntervalExpr({\n this: value,\n unit,\n }))}`;\n };\n}\n\nexport class TeradataTokenizer extends Tokenizer {\n @cache\n static get HEX_STRINGS (): TokenPair[] {\n return [\n [\n 'X\\'',\n '\\'',\n ],\n [\n 'x\\'',\n '\\'',\n ],\n [\n '0x',\n '',\n ],\n ];\n }\n\n @cache\n static get ORIGINAL_KEYWORDS (): Record<string, TokenType> {\n const keywords: Record<string, TokenType> = {\n ...Tokenizer.KEYWORDS,\n '**': TokenType.DSTAR,\n '^=': TokenType.NEQ,\n 'BYTEINT': TokenType.SMALLINT,\n 'COLLECT': TokenType.COMMAND,\n 'DEL': TokenType.DELETE,\n 'EQ': TokenType.EQ,\n 'GE': TokenType.GTE,\n 'GT': TokenType.GT,\n 'HELP': TokenType.COMMAND,\n 'INS': TokenType.INSERT,\n 'LE': TokenType.LTE,\n 'LOCKING': TokenType.LOCK,\n 'LT': TokenType.LT,\n 'MINUS': TokenType.EXCEPT,\n 'MOD': TokenType.MOD,\n 'NE': TokenType.NEQ,\n 'NOT=': TokenType.NEQ,\n 'SAMPLE': TokenType.TABLE_SAMPLE,\n 'SEL': TokenType.SELECT,\n 'ST_GEOMETRY': TokenType.GEOMETRY,\n 'TOP': TokenType.TOP,\n 'UPD': TokenType.UPDATE,\n };\n delete keywords['/*+'];\n return keywords;\n };\n\n @cache\n static get SINGLE_TOKENS (): Record<string, TokenType> {\n const tokens = {\n ...Tokenizer.SINGLE_TOKENS,\n };\n delete tokens['%'];\n return tokens;\n }\n}\n\nexport class TeradataParser extends 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 ...Parser.NO_PAREN_FUNCTIONS,\n };\n delete noParenFunctions[TokenType.LOCALTIME];\n delete noParenFunctions[TokenType.LOCALTIMESTAMP];\n return noParenFunctions;\n }\n\n static TABLESAMPLE_CSV = true;\n static VALUES_FOLLOWED_BY_PAREN = false;\n\n @cache\n static get CHARSET_TRANSLATORS () {\n return new Set([\n 'GRAPHIC_TO_KANJISJIS',\n 'GRAPHIC_TO_LATIN',\n 'GRAPHIC_TO_UNICODE',\n 'GRAPHIC_TO_UNICODE_PadSpace',\n 'KANJI1_KanjiEBCDIC_TO_UNICODE',\n 'KANJI1_KanjiEUC_TO_UNICODE',\n 'KANJI1_KANJISJIS_TO_UNICODE',\n 'KANJI1_SBC_TO_UNICODE',\n 'KANJISJIS_TO_GRAPHIC',\n 'KANJISJIS_TO_LATIN',\n 'KANJISJIS_TO_UNICODE',\n 'LATIN_TO_GRAPHIC',\n 'LATIN_TO_KANJISJIS',\n 'LATIN_TO_UNICODE',\n 'LOCALE_TO_UNICODE',\n 'UNICODE_TO_GRAPHIC',\n 'UNICODE_TO_GRAPHIC_PadGraphic',\n 'UNICODE_TO_GRAPHIC_VarGraphic',\n 'UNICODE_TO_KANJI1_KanjiEBCDIC',\n 'UNICODE_TO_KANJI1_KanjiEUC',\n 'UNICODE_TO_KANJI1_KANJISJIS',\n 'UNICODE_TO_KANJI1_SBC',\n 'UNICODE_TO_KANJISJIS',\n 'UNICODE_TO_LATIN',\n 'UNICODE_TO_LOCALE',\n 'UNICODE_TO_UNICODE_FoldSpace',\n 'UNICODE_TO_UNICODE_Fullwidth',\n 'UNICODE_TO_UNICODE_Halfwidth',\n 'UNICODE_TO_UNICODE_NFC',\n 'UNICODE_TO_UNICODE_NFD',\n 'UNICODE_TO_UNICODE_NFKC',\n 'UNICODE_TO_UNICODE_NFKD',\n ]);\n }\n\n @cache\n static get FUNC_TOKENS (): Set<TokenType> {\n return (() => {\n const tokens = new Set(Parser.FUNC_TOKENS);\n tokens.delete(TokenType.REPLACE);\n return tokens;\n })();\n }\n\n @cache\n static get STATEMENT_PARSERS (): Record<TokenType | string, (this: Parser) => Expression | Expression[] | undefined> {\n return {\n ...Parser.STATEMENT_PARSERS,\n [TokenType.DATABASE]: function (this: Parser) {\n return this.expression(\n UseExpr,\n {\n this: this.parseTable({\n schema: false,\n }),\n },\n );\n },\n [TokenType.REPLACE]: function (this: Parser) {\n return this.parseCreate();\n },\n [TokenType.LOCK]: function (this: Parser) {\n return (this as TeradataParser).parseLockingStatement();\n },\n };\n }\n\n @cache\n static get SET_PARSERS (): Record<string, (this: Parser) => Expression | undefined> {\n return {\n ...Parser.SET_PARSERS,\n QUERY_BAND: function (this: Parser) {\n return (this as TeradataParser).parseQueryBand();\n },\n };\n }\n\n @cache\n static get FUNCTION_PARSERS (): Partial<Record<string, (this: Parser) => Expression | undefined>> {\n return {\n ...Parser.FUNCTION_PARSERS,\n TRYCAST: Parser.FUNCTION_PARSERS['TRY_CAST'],\n RANGE_N: function (this: Parser) {\n return (this as TeradataParser).parseRangeN();\n },\n TRANSLATE: function (this: Parser) {\n return (this as TeradataParser).parseTranslate();\n },\n };\n }\n\n @cache\n static get FUNCTIONS (): Record<string, (args: Expression[]) => Expression> {\n return {\n ...Parser.FUNCTIONS,\n CARDINALITY: (args: Expression[]) => ArraySizeExpr.fromArgList(args),\n RANDOM: (args: Expression[]) => new RandExpr({\n lower: seqGet(args, 0),\n upper: seqGet(args, 1),\n }),\n DATE: (args: Expression[]) => new CurrentDateExpr({\n expressions: args,\n }),\n HASHMD5: (args: Expression[]) => new Md5Expr({\n this: seqGet(args, 0),\n }),\n LOG: (args: Expression[]) => new LogExpr({\n this: seqGet(args, 1),\n expression: seqGet(args, 0),\n }),\n TIME: (args: Expression[]) => new CurrentTimeExpr({\n expressions: args,\n }),\n };\n }\n\n @cache\n static get EXPONENT (): Partial<Record<TokenType, typeof Expression>> {\n return {\n ...Parser.EXPONENT,\n [TokenType.DSTAR]: PowExpr,\n };\n }\n\n public parseLockingStatement (): LockingStatementExpr {\n const lockingProperty = this.parseLocking();\n const wrappedQuery = this.parseSelect();\n\n if (!wrappedQuery) {\n this.raiseError('Expected SELECT statement after LOCKING clause');\n }\n\n return this.expression(LockingStatementExpr, {\n this: lockingProperty,\n expression: wrappedQuery,\n });\n }\n\n public parseRangeN (): RangeNExpr {\n const thisExpr = this.parseIdVar();\n this.match(TokenType.BETWEEN);\n\n const expressions = this.parseCsv(() => this.parseAssignment());\n const each = this.matchTextSeq('EACH') && this.parseAssignment();\n\n return this.expression(RangeNExpr, {\n this: thisExpr,\n expressions,\n each: each || undefined,\n });\n }\n\n public parseTranslate (): TranslateCharactersExpr {\n const thisExpr = this.parseAssignment();\n this.match(TokenType.USING);\n this.matchTexts(TeradataParser.CHARSET_TRANSLATORS);\n\n return this.expression(TranslateCharactersExpr, {\n this: thisExpr,\n expression: this.prev?.text.toUpperCase(),\n withError: this.matchTextSeq([\n 'WITH',\n 'ERROR',\n ])\n ? this.expression(AnonymousExpr, {\n this: 'WITH ERROR',\n expressions: [\n ],\n })\n : undefined,\n });\n }\n\n override parseFunction (options: {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n functions?: Record<string, Function>;\n anonymous?: boolean;\n optionalParens?: boolean;\n anyToken?: boolean;\n } = {}): Expression | undefined {\n // Don't parse as function call when followed by (FORMAT - it's a format phrase\n if (\n this.next\n && this.next.tokenType === TokenType.L_PAREN\n && this.index + 2 < this.tokens.length\n && this.tokens[this.index + 2]?.tokenType === TokenType.FORMAT\n ) {\n return undefined;\n }\n return super.parseFunction(options);\n }\n\n override parseColumnOps (thisExpr?: Expression): Expression | undefined {\n const result = super.parseColumnOps(thisExpr);\n if (this.matchPair(TokenType.L_PAREN, TokenType.FORMAT)) {\n const fmtString = this.parseString();\n this.matchRParen();\n return this.expression(FormatPhraseExpr, {\n this: result,\n format: fmtString,\n });\n }\n return result;\n }\n\n public parseQueryBand (): Expression | undefined {\n // Parse: SET QUERY_BAND = 'key=value;key2=value2;' FOR SESSION|TRANSACTION\n // Also supports: SET QUERY_BAND = 'key=value;' UPDATE FOR SESSION|TRANSACTION\n // Also supports: SET QUERY_BAND = NONE FOR SESSION|TRANSACTION\n this.match(TokenType.EQ);\n\n let queryBandString: Expression | undefined;\n\n // Handle both string literals and NONE keyword\n if (this.matchTextSeq('NONE')) {\n queryBandString = new VarExpr({\n this: 'NONE',\n });\n } else {\n queryBandString = this.parseString();\n }\n\n const update = this.matchTextSeq('UPDATE');\n this.matchTextSeq('FOR');\n\n // Handle scope - can be SESSION, TRANSACTION, VOLATILE, or SESSION VOLATILE\n let scope: string | undefined;\n\n if (this.matchTextSeq([\n 'SESSION',\n 'VOLATILE',\n ])) {\n scope = 'SESSION VOLATILE';\n } else if (this.matchTexts([\n 'SESSION',\n 'TRANSACTION',\n ])) {\n scope = this.prev?.text.toUpperCase();\n } else {\n scope = undefined;\n }\n\n return this.expression(QueryBandExpr, {\n this: queryBandString,\n scope: scope,\n update: update,\n });\n }\n\n // port from _Dialect metaclass logic\n @cache\n static get TABLE_ALIAS_TOKENS (): Set<TokenType> {\n return new Set([\n ...Parser.TABLE_ALIAS_TOKENS,\n TokenType.STRAIGHT_JOIN,\n ]);\n }\n}\nexport class TeradataGenerator extends 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 'cluster',\n 'distribute',\n 'sort',\n ].forEach((m) => modifiers.delete(m));\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 readonly SELECT_KINDS: string[] = [\n ];\n // port from _Dialect metaclass logic\n static TRY_SUPPORTED = false;\n // port from _Dialect metaclass logic\n static SUPPORTS_UESCAPE = false;\n static LIMIT_IS_TOP = true;\n static JOIN_HINTS = false;\n static TABLE_HINTS = false;\n static QUERY_HINTS = false;\n static TABLESAMPLE_KEYWORDS = 'SAMPLE';\n static LAST_DAY_SUPPORTS_DATE_PART = false;\n static CAN_IMPLEMENT_ARRAY_ANY = true;\n static TZ_TO_WITH_TIME_ZONE = true;\n static ARRAY_SIZE_NAME = 'CARDINALITY';\n static NVL2_SUPPORTED = false;\n static SUPPORTS_TO_NUMBER = false;\n static EXCEPT_INTERSECT_SUPPORT_ALL_CLAUSE = false;\n static SUPPORTS_MEDIAN = false;\n\n @cache\n static get TYPE_MAPPING (): Map<DataTypeExprKind | string, string> {\n const mapping = new Map(Generator.TYPE_MAPPING);\n mapping.set(DataTypeExprKind.BOOLEAN, 'BYTEINT');\n mapping.set(DataTypeExprKind.DOUBLE, 'DOUBLE PRECISION');\n mapping.set(DataTypeExprKind.TEXT, 'CLOB');\n mapping.set(DataTypeExprKind.GEOMETRY, 'ST_GEOMETRY');\n mapping.set(DataTypeExprKind.TIMESTAMPTZ, 'TIMESTAMP');\n return mapping;\n };\n\n @cache\n static get PROPERTIES_LOCATION (): Map<typeof Expression, PropertiesLocation> {\n const m = new Map(Generator.PROPERTIES_LOCATION);\n m.set(OnCommitPropertyExpr, PropertiesLocation.POST_INDEX);\n m.set(PartitionedByPropertyExpr, PropertiesLocation.POST_EXPRESSION);\n m.set(StabilityPropertyExpr, PropertiesLocation.POST_CREATE);\n return m;\n };\n\n @cache\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static get ORIGINAL_TRANSFORMS (): Map<typeof Expression, (this: Generator, e: any) => string> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const m = new Map<typeof Expression, (this: Generator, e: any) => string>(Generator.TRANSFORMS);\n m.set(ArgMaxExpr, renameFunc('MAX_BY'));\n m.set(ArgMinExpr, renameFunc('MIN_BY'));\n m.set(CurrentDateExpr, () => 'DATE');\n m.set(CurrentTimeExpr, () => 'TIME');\n m.set(CurrentTimestampExpr, function (this: Generator, e) {\n return (this as TeradataGenerator).currentTimestampSql(e as CurrentTimestampExpr);\n });\n m.set(MaxExpr, function (this: Generator, e) {\n return maxOrGreatest.call(this, e as MaxExpr);\n });\n m.set(MinExpr, function (this: Generator, e) {\n return minOrLeast.call(this, e as MinExpr);\n });\n m.set(Md5Expr, renameFunc('HASHMD5'));\n m.set(ModExpr, function (this: Generator, e) {\n return (this as TeradataGenerator).binary(e as ModExpr, 'MOD');\n });\n m.set(PowExpr, function (this: Generator, e) {\n return this.binary(e as PowExpr, '**');\n });\n m.set(RandExpr, function (this: Generator, e) {\n return this.func('RANDOM', [\n (e as RandExpr).args.lower,\n (e as RandExpr).args.upper,\n ]);\n });\n m.set(SelectExpr, preprocess([\n eliminateDistinctOn,\n eliminateSemiAndAntiJoins,\n ]));\n m.set(StrPositionExpr, function (this: Generator, e) {\n return strPositionSql.call(this, e as StrPositionExpr, {\n funcName: 'INSTR',\n supportsPosition: true,\n supportsOccurrence: true,\n });\n });\n m.set(StrToDateExpr, function (this: Generator, e) {\n return `CAST(${this.sql(e, 'this')} AS DATE FORMAT ${this.formatTime(e as StrToDateExpr)})`;\n });\n m.set(StrToTimeExpr, function (this: Generator, e) {\n return this.castSql(e as StrToTimeExpr);\n });\n m.set(TimeToStrExpr, function (this: Generator, e) {\n return this.func('TO_CHAR', [\n (e as TimeToStrExpr).args.this,\n this.formatTime(e as TimeToStrExpr),\n ]);\n });\n m.set(ToCharExpr, function (this: Generator, e) {\n return this.functionFallbackSql(e as FuncExpr | JsonExtractExpr);\n });\n m.set(ToNumberExpr, toNumberWithNlsParam);\n m.set(UseExpr, function (this: Generator, e) {\n return `DATABASE ${this.sql(e, 'this')}`;\n });\n m.set(DateAddExpr, function (this: Generator, e) {\n return dateAddSqlTd('+').call(this, e as DateAddExpr);\n });\n m.set(DateSubExpr, function (this: Generator, e) {\n return dateAddSqlTd('-').call(this, e as DateSubExpr);\n });\n m.set(QuarterExpr, function (this: Generator, e) {\n return this.sql(new ExtractExpr({\n this: 'QUARTER',\n expression: (e as QuarterExpr).args.this,\n }));\n });\n return m;\n };\n\n public currentTimestampSql (expression: CurrentTimestampExpr): string {\n const prefix = expression.args.this ? '(' : '';\n const suffix = expression.args.this ? ')' : '';\n return this.func('CURRENT_TIMESTAMP', [\n expression.args.this,\n ], {\n prefix,\n suffix,\n });\n }\n\n public createableSql (expression: CreateExpr, locations: Map<string, Expression[]>): string {\n const kind = this.sql(expression, 'kind').toUpperCase();\n const postName = locations.get(PropertiesLocation.POST_NAME);\n if (kind === 'TABLE' && postName?.length) {\n const thisName = this.sql((expression.args.this as SchemaExpr).args.this);\n const thisProperties = this.properties(\n new PropertiesExpr({\n expressions: postName,\n }),\n {\n wrapped: false,\n prefix: ',',\n },\n );\n const thisSchema = this.schemaColumnsSql(expression.args.this as SchemaExpr);\n return `${thisName}${thisProperties}${this.sep()}${thisSchema}`;\n }\n return super.createableSql(expression, locations);\n }\n\n public castSql (expression: Expression, options: {safePrefix?: string} = {}): string {\n const {\n safePrefix,\n } = options;\n const to = (expression as TryCastExpr).args.to;\n if (to && (to as DataTypeExpr).args.this === DataTypeExprKind.UNKNOWN && (expression as TryCastExpr).args.format) {\n (to as DataTypeExpr).pop();\n }\n return super.castSql(expression, {\n safePrefix,\n });\n }\n\n public tryCastSql (expression: TryCastExpr): string {\n return this.castSql(expression, {\n safePrefix: 'TRY',\n });\n }\n\n public tableSampleSql (expression: TableSampleExpr, _options: {tablesampleKeyword?: string} = {}): string {\n return `${this.sql(expression, 'this')} SAMPLE ${this.expressions(expression)}`;\n }\n\n public partitionedByPropertySql (expression: PartitionedByPropertyExpr): string {\n return `PARTITION BY ${this.sql(expression, 'this')}`;\n }\n\n public updateSql (expression: UpdateExpr): string {\n const thisSql = this.sql(expression, 'this');\n const fromSql = this.sql(expression, 'from');\n const setSql = this.expressions(expression, {\n flat: true,\n });\n const whereSql = this.sql(expression, 'where');\n const sql = `UPDATE ${thisSql}${fromSql} SET ${setSql}${whereSql}`;\n return this.prependCtes(expression, sql);\n }\n\n public modSql (expression: ModExpr): string {\n return this.binary(expression, 'MOD');\n }\n\n public dataTypeSql (expression: DataTypeExpr): string {\n const typeSql = super.dataTypeSql(expression);\n const prefixSql = expression.args.prefix;\n return prefixSql ? `SYSUDTLIB.${typeSql}` : typeSql;\n }\n\n public rangeNSql (expression: RangeNExpr): string {\n const thisSql = this.sql(expression, 'this');\n const expressionsSql = this.expressions(expression);\n const eachSql = this.sql(expression, 'each');\n const eachStr = eachSql ? ` EACH ${eachSql}` : '';\n return `RANGE_N(${thisSql} BETWEEN ${expressionsSql}${eachStr})`;\n }\n\n public lockingStatementSql (expression: LockingStatementExpr): string {\n const lockingClause = this.sql(expression, 'this');\n const querySql = this.sql(expression, 'expression');\n return `${lockingClause} ${querySql}`;\n }\n\n public extractSql (expression: ExtractExpr): string {\n const thisSql = this.sql(expression, 'this');\n if (thisSql.toUpperCase() !== 'QUARTER') {\n return super.extractSql(expression);\n }\n\n const toChar = new AnonymousExpr({\n this: 'to_char',\n expressions: [\n expression.args.expression ?? '',\n LiteralExpr.string('Q'),\n ],\n });\n return this.sql(cast(toChar, DataTypeExprKind.INT));\n }\n\n public intervalSql (expression: IntervalExpr): string {\n const unit = expression.args.unit?.toString() ?? '';\n let multiplier = 0;\n\n if (unit.startsWith('WEEK')) {\n multiplier = 7;\n } else if (unit.startsWith('QUARTER')) {\n multiplier = 90;\n }\n\n if (multiplier) {\n const dayInterval = new IntervalExpr({\n this: expression.args.this,\n unit: new VarExpr({\n this: 'DAY',\n }),\n });\n return `(${multiplier} * ${super.intervalSql(dayInterval)})`;\n }\n\n return super.intervalSql(expression);\n }\n}\nexport class Teradata extends Dialect {\n static DIALECT_NAME = Dialects.TERADATA;\n\n @cache\n static get NORMALIZATION_STRATEGY () {\n return NormalizationStrategy.UPPERCASE;\n }\n\n static SUPPORTS_SEMI_ANTI_JOIN = false;\n\n static TYPED_DIVISION = true;\n\n @cache\n static get TIME_MAPPING () {\n return {\n YY: '%y',\n Y4: '%Y',\n YYYY: '%Y',\n M4: '%B',\n M3: '%b',\n M: '%-M',\n MI: '%M',\n MM: '%m',\n MMM: '%b',\n MMMM: '%B',\n D: '%-d',\n DD: '%d',\n D3: '%j',\n DDD: '%j',\n H: '%-H',\n HH: '%H',\n HH24: '%H',\n S: '%-S',\n SS: '%S',\n SSSSSS: '%f',\n E: '%a',\n EE: '%a',\n E3: '%a',\n E4: '%A',\n EEE: '%a',\n EEEE: '%A',\n };\n }\n\n static Tokenizer = TeradataTokenizer;\n static Parser = TeradataParser;\n static Generator = TeradataGenerator;\n}\n\nDialect.register(Dialects.TERADATA, Teradata);\n"],"mappings":"kgBAqFA,SAASA,GACPC,EACoE,CACpE,OAAO,SAA2BC,EAA+C,CAC/E,IAAMC,EAAU,KAAK,IAAID,EAAY,MAAM,EACrCE,EAAOF,EAAW,KAAK,KACzBG,EAAQH,EAAW,KAAK,YAAc,KAAK,sBAAsBA,EAAW,KAAK,UAAU,EAEzFG,aAAiBC,GACrB,KAAK,YAAY,wBAAwB,EAG3C,IAAIC,EACJ,OAAIF,aAAiBG,GACnBD,EAAWN,IAAS,IAAM,IAAM,IAChCI,EAAQC,EAAY,OAAQD,EAAM,KAAK,KAAqB,QAAQ,CAAC,IAErEE,EAAWN,EACVI,EAAsB,UAAU,WAAY,EAAI,GAG5C,GAAGF,CAAO,IAAII,CAAQ,IAAI,KAAK,IAAI,IAAIE,EAAa,CACzD,KAAMJ,EACN,KAAAD,CACF,CAAC,CAAC,CAAC,EACL,CACF,CA/GA,IAAAM,GAAAC,GAAAC,GAAAC,GAAAC,EAiHaC,EAAN,cAAgCF,GAAAG,EACrCJ,GAAA,CAACK,GAkBDN,GAAA,CAACM,GA+BDP,GAAA,CAACO,GAlDoCJ,GAAU,CAE/C,WAAW,aAA4B,CACrC,MAAO,CACL,CACE,KACA,GACF,EACA,CACE,KACA,GACF,EACA,CACE,KACA,EACF,CACF,CACF,CAGA,WAAW,mBAAgD,CACzD,IAAMK,EAAsC,CAC1C,GAAGF,EAAU,SACb,aACA,WACA,mBACA,kBACA,aACA,QACA,SACA,QACA,eACA,aACA,SACA,eACA,QACA,eACA,UACA,SACA,aACA,qBACA,aACA,uBACA,UACA,YACF,EACA,cAAOE,EAAS,KAAK,EACdA,CACT,CAGA,WAAW,eAA4C,CACrD,IAAMC,EAAS,CACb,GAAGH,EAAU,aACf,EACA,cAAOG,EAAO,GAAG,EACVA,CACT,CACF,EA1DOL,EAAAM,EAAAP,IAELQ,EAAAP,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A,CAAChH,GAZ2BJ,GAAQ,CAIpC,WAAW,wBAA0B,CACnC,iBACF,CAOA,WAAW,cAAgB,CACzB,MAAO,CACL,GAAI,KACJ,GAAI,KACJ,KAAM,KACN,GAAI,KACJ,GAAI,KACJ,EAAG,MACH,GAAI,KACJ,GAAI,KACJ,IAAK,KACL,KAAM,KACN,EAAG,MACH,GAAI,KACJ,GAAI,KACJ,IAAK,KACL,EAAG,MACH,GAAI,KACJ,KAAM,KACN,EAAG,MACH,GAAI,KACJ,OAAQ,KACR,EAAG,KACH,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,IAAK,KACL,KAAM,IACR,CACF,CAKF,EA/COC,EAAAM,EAAAP,IAILQ,EAAAP,EAAA,GAAW,yBADXoH,GAHWC,GAaX9G,EAAAP,EAAA,GAAW,eADXmH,GAZWE,GAAN7G,EAAAR,EAAMqH,GAAN5G,EAAAT,EAAA,EAAMqH,KACJ,aAAe,WADXA,EAQJ,wBAA0B,GARtBA,EAUJ,eAAiB,GAVbA,EA4CJ,UAAYpH,EA5CRoH,EA6CJ,OAASlE,EA7CLkE,EA8CJ,UAAY7D,EAGrB8D,EAAQ,oBAA4BD,CAAQ","names":["dateAddSqlTd","kind","expression","thisSql","unit","value","LiteralExpr","kindToOp","NegExpr","IntervalExpr","_SINGLE_TOKENS_dec","_ORIGINAL_KEYWORDS_dec","_HEX_STRINGS_dec","_a","_init","TeradataTokenizer","Tokenizer","cache","keywords","tokens","__decoratorStart","__decorateElement","__decoratorMetadata","__runInitializers","_TABLE_ALIAS_TOKENS_dec","_EXPONENT_dec","_FUNCTIONS_dec","_FUNCTION_PARSERS_dec","_SET_PARSERS_dec","_STATEMENT_PARSERS_dec","_FUNC_TOKENS_dec","_CHARSET_TRANSLATORS_dec","_NO_PAREN_FUNCTIONS_dec","_ID_VAR_TOKENS_dec","_TeradataParser","Parser","noParenFunctions","UseExpr","args","ArraySizeExpr","RandExpr","seqGet","CurrentDateExpr","Md5Expr","LogExpr","CurrentTimeExpr","PowExpr","lockingProperty","wrappedQuery","LockingStatementExpr","thisExpr","expressions","each","RangeNExpr","TranslateCharactersExpr","AnonymousExpr","options","result","fmtString","FormatPhraseExpr","queryBandString","VarExpr","update","scope","QueryBandExpr","TeradataParser","_ORIGINAL_TRANSFORMS_dec","_PROPERTIES_LOCATION_dec","_TYPE_MAPPING_dec","_AFTER_HAVING_MODIFIER_TRANSFORMS_dec","TeradataGenerator","Generator","modifiers","m","mapping","OnCommitPropertyExpr","PartitionedByPropertyExpr","StabilityPropertyExpr","ArgMaxExpr","renameFunc","ArgMinExpr","CurrentTimestampExpr","e","MaxExpr","maxOrGreatest","MinExpr","minOrLeast","ModExpr","SelectExpr","preprocess","eliminateDistinctOn","eliminateSemiAndAntiJoins","StrPositionExpr","strPositionSql","StrToDateExpr","StrToTimeExpr","TimeToStrExpr","ToCharExpr","ToNumberExpr","toNumberWithNlsParam","DateAddExpr","DateSubExpr","QuarterExpr","ExtractExpr","prefix","suffix","locations","postName","thisName","thisProperties","PropertiesExpr","thisSchema","safePrefix","to","_options","fromSql","setSql","whereSql","sql","typeSql","expressionsSql","eachSql","eachStr","lockingClause","querySql","toChar","cast","multiplier","dayInterval","_TIME_MAPPING_dec","_NORMALIZATION_STRATEGY_dec","Teradata","Dialect"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUHWHUDLEcjs = require('../chunk-UHWHUDLE.cjs');require('../chunk-YSS2WVCM.cjs');require('../chunk-XZQFOICX.cjs');require('../chunk-DOKMTZYO.cjs');require('../chunk-R7C3ZHVK.cjs');require('../chunk-2Z3O2CFM.cjs');exports.Trino = _chunkUHWHUDLEcjs.a;
|
|
2
|
+
//# sourceMappingURL=trino.cjs.map
|