dt-sql-parser 4.4.2 → 4.5.0-beta.1
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/README.md +140 -3
- package/dist/lib/SQLParserBase.d.ts +13 -1
- package/dist/lib/SQLParserBase.js +40 -5
- package/dist/lib/flink/FlinkSqlLexer.d.ts +397 -399
- package/dist/lib/flink/FlinkSqlLexer.js +2489 -2504
- package/dist/lib/flink/FlinkSqlParser.d.ts +726 -728
- package/dist/lib/flink/FlinkSqlParser.js +4727 -5330
- package/dist/lib/flink/FlinkSqlParserListener.d.ts +132 -90
- package/dist/lib/flink/FlinkSqlParserVisitor.d.ts +84 -57
- package/dist/lib/hive/HiveSqlParser.d.ts +338 -239
- package/dist/lib/hive/HiveSqlParser.js +6466 -5794
- package/dist/lib/hive/HiveSqlParserListener.d.ts +88 -0
- package/dist/lib/hive/HiveSqlParserVisitor.d.ts +56 -0
- package/dist/lib/impala/ImpalaSqlParser.d.ts +236 -125
- package/dist/lib/impala/ImpalaSqlParser.js +4257 -3483
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +109 -14
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +69 -8
- package/dist/lib/mysql/MySqlParser.d.ts +403 -306
- package/dist/lib/mysql/MySqlParser.js +10694 -10030
- package/dist/lib/mysql/MySqlParserListener.d.ts +121 -18
- package/dist/lib/mysql/MySqlParserVisitor.d.ts +75 -10
- package/dist/lib/postgresql/PostgreSqlParser.d.ts +256 -173
- package/dist/lib/postgresql/PostgreSqlParser.js +14934 -11710
- package/dist/lib/postgresql/PostgreSqlParserListener.d.ts +97 -5
- package/dist/lib/postgresql/PostgreSqlParserVisitor.d.ts +61 -3
- package/dist/lib/spark/SparkSqlParser.d.ts +314 -149
- package/dist/lib/spark/SparkSqlParser.js +6185 -5227
- package/dist/lib/spark/SparkSqlParserListener.d.ts +180 -5
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +113 -3
- package/dist/lib/trino/TrinoSqlListener.d.ts +90 -37
- package/dist/lib/trino/TrinoSqlParser.d.ts +219 -165
- package/dist/lib/trino/TrinoSqlParser.js +4942 -4615
- package/dist/lib/trino/TrinoSqlVisitor.d.ts +55 -21
- package/dist/parser/common/basicSQL.d.ts +5 -5
- package/dist/parser/common/basicSQL.js +4 -2
- package/dist/parser/common/entityCollector.d.ts +91 -4
- package/dist/parser/common/entityCollector.js +227 -11
- package/dist/parser/common/textAndWord.d.ts +9 -1
- package/dist/parser/common/textAndWord.js +2 -0
- package/dist/parser/common/types.d.ts +2 -0
- package/dist/parser/common/types.js +2 -0
- package/dist/parser/flink/flinkEntityCollector.d.ts +10 -2
- package/dist/parser/flink/flinkEntityCollector.js +76 -14
- package/dist/parser/flink/index.js +5 -2
- package/dist/parser/hive/hiveEntityCollector.d.ts +13 -1
- package/dist/parser/hive/hiveEntityCollector.js +85 -12
- package/dist/parser/impala/impalaEntityCollector.d.ts +7 -1
- package/dist/parser/impala/impalaEntityCollector.js +63 -12
- package/dist/parser/impala/index.js +2 -1
- package/dist/parser/mysql/index.js +3 -1
- package/dist/parser/mysql/mysqlEntityCollector.d.ts +10 -1
- package/dist/parser/mysql/mysqlEntityCollector.js +65 -12
- package/dist/parser/mysql/mysqlErrorListener.js +2 -0
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +12 -1
- package/dist/parser/postgresql/postgreEntityCollector.js +99 -22
- package/dist/parser/spark/index.js +3 -1
- package/dist/parser/spark/sparkEntityCollector.d.ts +13 -1
- package/dist/parser/spark/sparkEntityCollector.js +88 -12
- package/dist/parser/trino/trinoEntityCollector.d.ts +7 -1
- package/dist/parser/trino/trinoEntityCollector.js +53 -12
- package/package.json +1 -1
|
@@ -116,6 +116,7 @@ import { SortItemContext } from "./TrinoSqlParser.js";
|
|
|
116
116
|
import { QuerySpecificationContext } from "./TrinoSqlParser.js";
|
|
117
117
|
import { WhereClauseContext } from "./TrinoSqlParser.js";
|
|
118
118
|
import { HavingClauseContext } from "./TrinoSqlParser.js";
|
|
119
|
+
import { SelectListContext } from "./TrinoSqlParser.js";
|
|
119
120
|
import { GroupByContext } from "./TrinoSqlParser.js";
|
|
120
121
|
import { PartitionByContext } from "./TrinoSqlParser.js";
|
|
121
122
|
import { SingleGroupingSetContext } from "./TrinoSqlParser.js";
|
|
@@ -128,8 +129,11 @@ import { WindowDefinitionContext } from "./TrinoSqlParser.js";
|
|
|
128
129
|
import { WindowSpecificationContext } from "./TrinoSqlParser.js";
|
|
129
130
|
import { NamedQueryContext } from "./TrinoSqlParser.js";
|
|
130
131
|
import { SetQuantifierContext } from "./TrinoSqlParser.js";
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
132
|
+
import { SelectItemContext } from "./TrinoSqlParser.js";
|
|
133
|
+
import { SelectAllWithoutTableContext } from "./TrinoSqlParser.js";
|
|
134
|
+
import { TableAllColumnsContext } from "./TrinoSqlParser.js";
|
|
135
|
+
import { SelectLiteralColumnNameContext } from "./TrinoSqlParser.js";
|
|
136
|
+
import { SelectExpressionColumnNameContext } from "./TrinoSqlParser.js";
|
|
133
137
|
import { RelationDefaultContext } from "./TrinoSqlParser.js";
|
|
134
138
|
import { JoinRelationContext } from "./TrinoSqlParser.js";
|
|
135
139
|
import { JoinTypeContext } from "./TrinoSqlParser.js";
|
|
@@ -151,11 +155,12 @@ import { ColumnListCreateContext } from "./TrinoSqlParser.js";
|
|
|
151
155
|
import { ColumnListContext } from "./TrinoSqlParser.js";
|
|
152
156
|
import { ColumnAliasesContext } from "./TrinoSqlParser.js";
|
|
153
157
|
import { TableNameContext } from "./TrinoSqlParser.js";
|
|
158
|
+
import { ExpressionSourceTableContext } from "./TrinoSqlParser.js";
|
|
159
|
+
import { ParenthesizedRelationContext } from "./TrinoSqlParser.js";
|
|
154
160
|
import { SubqueryRelationContext } from "./TrinoSqlParser.js";
|
|
155
161
|
import { UnnestContext } from "./TrinoSqlParser.js";
|
|
156
162
|
import { LateralContext } from "./TrinoSqlParser.js";
|
|
157
163
|
import { TableFunctionInvocationContext } from "./TrinoSqlParser.js";
|
|
158
|
-
import { ParenthesizedRelationContext } from "./TrinoSqlParser.js";
|
|
159
164
|
import { JsonTableContext } from "./TrinoSqlParser.js";
|
|
160
165
|
import { OrdinalityColumnContext } from "./TrinoSqlParser.js";
|
|
161
166
|
import { ValueColumnContext } from "./TrinoSqlParser.js";
|
|
@@ -1734,6 +1739,16 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
1734
1739
|
* @param ctx the parse tree
|
|
1735
1740
|
*/
|
|
1736
1741
|
exitHavingClause?: (ctx: HavingClauseContext) => void;
|
|
1742
|
+
/**
|
|
1743
|
+
* Enter a parse tree produced by `TrinoSqlParser.selectList`.
|
|
1744
|
+
* @param ctx the parse tree
|
|
1745
|
+
*/
|
|
1746
|
+
enterSelectList?: (ctx: SelectListContext) => void;
|
|
1747
|
+
/**
|
|
1748
|
+
* Exit a parse tree produced by `TrinoSqlParser.selectList`.
|
|
1749
|
+
* @param ctx the parse tree
|
|
1750
|
+
*/
|
|
1751
|
+
exitSelectList?: (ctx: SelectListContext) => void;
|
|
1737
1752
|
/**
|
|
1738
1753
|
* Enter a parse tree produced by `TrinoSqlParser.groupBy`.
|
|
1739
1754
|
* @param ctx the parse tree
|
|
@@ -1863,29 +1878,55 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
1863
1878
|
*/
|
|
1864
1879
|
exitSetQuantifier?: (ctx: SetQuantifierContext) => void;
|
|
1865
1880
|
/**
|
|
1866
|
-
* Enter a parse tree produced by
|
|
1867
|
-
*
|
|
1881
|
+
* Enter a parse tree produced by `TrinoSqlParser.selectItem`.
|
|
1882
|
+
* @param ctx the parse tree
|
|
1883
|
+
*/
|
|
1884
|
+
enterSelectItem?: (ctx: SelectItemContext) => void;
|
|
1885
|
+
/**
|
|
1886
|
+
* Exit a parse tree produced by `TrinoSqlParser.selectItem`.
|
|
1887
|
+
* @param ctx the parse tree
|
|
1888
|
+
*/
|
|
1889
|
+
exitSelectItem?: (ctx: SelectItemContext) => void;
|
|
1890
|
+
/**
|
|
1891
|
+
* Enter a parse tree produced by `TrinoSqlParser.selectAllWithoutTable`.
|
|
1892
|
+
* @param ctx the parse tree
|
|
1893
|
+
*/
|
|
1894
|
+
enterSelectAllWithoutTable?: (ctx: SelectAllWithoutTableContext) => void;
|
|
1895
|
+
/**
|
|
1896
|
+
* Exit a parse tree produced by `TrinoSqlParser.selectAllWithoutTable`.
|
|
1868
1897
|
* @param ctx the parse tree
|
|
1869
1898
|
*/
|
|
1870
|
-
|
|
1899
|
+
exitSelectAllWithoutTable?: (ctx: SelectAllWithoutTableContext) => void;
|
|
1871
1900
|
/**
|
|
1872
|
-
*
|
|
1873
|
-
* labeled alternative in `TrinoSqlParser.selectItem`.
|
|
1901
|
+
* Enter a parse tree produced by `TrinoSqlParser.tableAllColumns`.
|
|
1874
1902
|
* @param ctx the parse tree
|
|
1875
1903
|
*/
|
|
1876
|
-
|
|
1904
|
+
enterTableAllColumns?: (ctx: TableAllColumnsContext) => void;
|
|
1877
1905
|
/**
|
|
1878
|
-
*
|
|
1879
|
-
* labeled alternative in `TrinoSqlParser.selectItem`.
|
|
1906
|
+
* Exit a parse tree produced by `TrinoSqlParser.tableAllColumns`.
|
|
1880
1907
|
* @param ctx the parse tree
|
|
1881
1908
|
*/
|
|
1882
|
-
|
|
1909
|
+
exitTableAllColumns?: (ctx: TableAllColumnsContext) => void;
|
|
1883
1910
|
/**
|
|
1884
|
-
*
|
|
1885
|
-
* labeled alternative in `TrinoSqlParser.selectItem`.
|
|
1911
|
+
* Enter a parse tree produced by `TrinoSqlParser.selectLiteralColumnName`.
|
|
1886
1912
|
* @param ctx the parse tree
|
|
1887
1913
|
*/
|
|
1888
|
-
|
|
1914
|
+
enterSelectLiteralColumnName?: (ctx: SelectLiteralColumnNameContext) => void;
|
|
1915
|
+
/**
|
|
1916
|
+
* Exit a parse tree produced by `TrinoSqlParser.selectLiteralColumnName`.
|
|
1917
|
+
* @param ctx the parse tree
|
|
1918
|
+
*/
|
|
1919
|
+
exitSelectLiteralColumnName?: (ctx: SelectLiteralColumnNameContext) => void;
|
|
1920
|
+
/**
|
|
1921
|
+
* Enter a parse tree produced by `TrinoSqlParser.selectExpressionColumnName`.
|
|
1922
|
+
* @param ctx the parse tree
|
|
1923
|
+
*/
|
|
1924
|
+
enterSelectExpressionColumnName?: (ctx: SelectExpressionColumnNameContext) => void;
|
|
1925
|
+
/**
|
|
1926
|
+
* Exit a parse tree produced by `TrinoSqlParser.selectExpressionColumnName`.
|
|
1927
|
+
* @param ctx the parse tree
|
|
1928
|
+
*/
|
|
1929
|
+
exitSelectExpressionColumnName?: (ctx: SelectExpressionColumnNameContext) => void;
|
|
1889
1930
|
/**
|
|
1890
1931
|
* Enter a parse tree produced by the `relationDefault`
|
|
1891
1932
|
* labeled alternative in `TrinoSqlParser.relation`.
|
|
@@ -2103,74 +2144,86 @@ export declare class TrinoSqlListener implements ParseTreeListener {
|
|
|
2103
2144
|
*/
|
|
2104
2145
|
exitTableName?: (ctx: TableNameContext) => void;
|
|
2105
2146
|
/**
|
|
2106
|
-
* Enter a parse tree produced by the `
|
|
2147
|
+
* Enter a parse tree produced by the `expressionSourceTable`
|
|
2148
|
+
* labeled alternative in `TrinoSqlParser.relationPrimary`.
|
|
2149
|
+
* @param ctx the parse tree
|
|
2150
|
+
*/
|
|
2151
|
+
enterExpressionSourceTable?: (ctx: ExpressionSourceTableContext) => void;
|
|
2152
|
+
/**
|
|
2153
|
+
* Exit a parse tree produced by the `expressionSourceTable`
|
|
2154
|
+
* labeled alternative in `TrinoSqlParser.relationPrimary`.
|
|
2155
|
+
* @param ctx the parse tree
|
|
2156
|
+
*/
|
|
2157
|
+
exitExpressionSourceTable?: (ctx: ExpressionSourceTableContext) => void;
|
|
2158
|
+
/**
|
|
2159
|
+
* Enter a parse tree produced by the `parenthesizedRelation`
|
|
2107
2160
|
* labeled alternative in `TrinoSqlParser.relationPrimary`.
|
|
2108
2161
|
* @param ctx the parse tree
|
|
2109
2162
|
*/
|
|
2163
|
+
enterParenthesizedRelation?: (ctx: ParenthesizedRelationContext) => void;
|
|
2164
|
+
/**
|
|
2165
|
+
* Exit a parse tree produced by the `parenthesizedRelation`
|
|
2166
|
+
* labeled alternative in `TrinoSqlParser.relationPrimary`.
|
|
2167
|
+
* @param ctx the parse tree
|
|
2168
|
+
*/
|
|
2169
|
+
exitParenthesizedRelation?: (ctx: ParenthesizedRelationContext) => void;
|
|
2170
|
+
/**
|
|
2171
|
+
* Enter a parse tree produced by the `subqueryRelation`
|
|
2172
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2173
|
+
* @param ctx the parse tree
|
|
2174
|
+
*/
|
|
2110
2175
|
enterSubqueryRelation?: (ctx: SubqueryRelationContext) => void;
|
|
2111
2176
|
/**
|
|
2112
2177
|
* Exit a parse tree produced by the `subqueryRelation`
|
|
2113
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2178
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2114
2179
|
* @param ctx the parse tree
|
|
2115
2180
|
*/
|
|
2116
2181
|
exitSubqueryRelation?: (ctx: SubqueryRelationContext) => void;
|
|
2117
2182
|
/**
|
|
2118
2183
|
* Enter a parse tree produced by the `unnest`
|
|
2119
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2184
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2120
2185
|
* @param ctx the parse tree
|
|
2121
2186
|
*/
|
|
2122
2187
|
enterUnnest?: (ctx: UnnestContext) => void;
|
|
2123
2188
|
/**
|
|
2124
2189
|
* Exit a parse tree produced by the `unnest`
|
|
2125
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2190
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2126
2191
|
* @param ctx the parse tree
|
|
2127
2192
|
*/
|
|
2128
2193
|
exitUnnest?: (ctx: UnnestContext) => void;
|
|
2129
2194
|
/**
|
|
2130
2195
|
* Enter a parse tree produced by the `lateral`
|
|
2131
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2196
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2132
2197
|
* @param ctx the parse tree
|
|
2133
2198
|
*/
|
|
2134
2199
|
enterLateral?: (ctx: LateralContext) => void;
|
|
2135
2200
|
/**
|
|
2136
2201
|
* Exit a parse tree produced by the `lateral`
|
|
2137
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2202
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2138
2203
|
* @param ctx the parse tree
|
|
2139
2204
|
*/
|
|
2140
2205
|
exitLateral?: (ctx: LateralContext) => void;
|
|
2141
2206
|
/**
|
|
2142
2207
|
* Enter a parse tree produced by the `tableFunctionInvocation`
|
|
2143
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2208
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2144
2209
|
* @param ctx the parse tree
|
|
2145
2210
|
*/
|
|
2146
2211
|
enterTableFunctionInvocation?: (ctx: TableFunctionInvocationContext) => void;
|
|
2147
2212
|
/**
|
|
2148
2213
|
* Exit a parse tree produced by the `tableFunctionInvocation`
|
|
2149
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2214
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2150
2215
|
* @param ctx the parse tree
|
|
2151
2216
|
*/
|
|
2152
2217
|
exitTableFunctionInvocation?: (ctx: TableFunctionInvocationContext) => void;
|
|
2153
|
-
/**
|
|
2154
|
-
* Enter a parse tree produced by the `parenthesizedRelation`
|
|
2155
|
-
* labeled alternative in `TrinoSqlParser.relationPrimary`.
|
|
2156
|
-
* @param ctx the parse tree
|
|
2157
|
-
*/
|
|
2158
|
-
enterParenthesizedRelation?: (ctx: ParenthesizedRelationContext) => void;
|
|
2159
|
-
/**
|
|
2160
|
-
* Exit a parse tree produced by the `parenthesizedRelation`
|
|
2161
|
-
* labeled alternative in `TrinoSqlParser.relationPrimary`.
|
|
2162
|
-
* @param ctx the parse tree
|
|
2163
|
-
*/
|
|
2164
|
-
exitParenthesizedRelation?: (ctx: ParenthesizedRelationContext) => void;
|
|
2165
2218
|
/**
|
|
2166
2219
|
* Enter a parse tree produced by the `jsonTable`
|
|
2167
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2220
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2168
2221
|
* @param ctx the parse tree
|
|
2169
2222
|
*/
|
|
2170
2223
|
enterJsonTable?: (ctx: JsonTableContext) => void;
|
|
2171
2224
|
/**
|
|
2172
2225
|
* Exit a parse tree produced by the `jsonTable`
|
|
2173
|
-
* labeled alternative in `TrinoSqlParser.
|
|
2226
|
+
* labeled alternative in `TrinoSqlParser.relationSourceTable`.
|
|
2174
2227
|
* @param ctx the parse tree
|
|
2175
2228
|
*/
|
|
2176
2229
|
exitJsonTable?: (ctx: JsonTableContext) => void;
|