bq2cst 0.5.3 → 0.5.5
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/LICENSE +1 -1
- package/README.md +7 -3
- package/bq2cst.d.ts +14 -0
- package/bq2cst.js +6 -6
- package/bq2cst_bg.wasm +0 -0
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
# bq2cst
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Parse GoogleSQL, which is a dialect of [BigQuery](https://cloud.google.com/bigquery), into a concrete syntax tree.
|
|
3
4
|
|
|
4
5
|
> [!WARNING]
|
|
5
|
-
> This parser is designed to be used via [prettier-plugin-bq](https://github.com/
|
|
6
|
+
> This parser is designed to be used via [prettier-plugin-bq](https://github.com/kitta65/prettier-plugin-bq).
|
|
6
7
|
|
|
7
8
|
## Features
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
- forcused on GoogleSQL (in other words, other SQL dialects are out of scope)
|
|
9
11
|
- developed in Rust, using [wasm-pack](https://github.com/rustwasm/wasm-pack)
|
|
10
12
|
|
|
11
13
|
## Install
|
|
14
|
+
|
|
12
15
|
```shell
|
|
13
16
|
npm install bq2cst
|
|
14
17
|
```
|
|
15
18
|
|
|
16
19
|
## Usage
|
|
20
|
+
|
|
17
21
|
```javascript
|
|
18
22
|
const parser = require("bq2cst");
|
|
19
23
|
parser.parse("SELECT 1;")
|
package/bq2cst.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ export type UnknownNode =
|
|
|
118
118
|
| Type
|
|
119
119
|
| TypeDeclaration
|
|
120
120
|
| UnaryOperator
|
|
121
|
+
| UndropStatement
|
|
121
122
|
| UnpivotConfig
|
|
122
123
|
| UnpivotOperator
|
|
123
124
|
| UpdateStatement
|
|
@@ -570,6 +571,7 @@ export type CreateFunctionStatement = XXXStatement & {
|
|
|
570
571
|
or_replace?: NodeVecChild;
|
|
571
572
|
temp?: NodeChild;
|
|
572
573
|
table?: NodeChild;
|
|
574
|
+
aggregate?: NodeChild;
|
|
573
575
|
what: NodeChild;
|
|
574
576
|
if_not_exists?: NodeVecChild;
|
|
575
577
|
ident: NodeChild;
|
|
@@ -608,6 +610,7 @@ export type CreateProcedureStatement = XXXStatement & {
|
|
|
608
610
|
if_not_exists?: NodeVecChild;
|
|
609
611
|
ident: NodeChild;
|
|
610
612
|
group: NodeChild;
|
|
613
|
+
external?: NodeChild;
|
|
611
614
|
with_connection?: NodeChild;
|
|
612
615
|
options?: NodeChild;
|
|
613
616
|
language?: NodeChild;
|
|
@@ -664,6 +667,7 @@ export type CreateIndexStatement = XXXStatement & {
|
|
|
664
667
|
on: NodeChild;
|
|
665
668
|
tablename: NodeChild;
|
|
666
669
|
column_group: NodeChild;
|
|
670
|
+
storing?: NodeChild;
|
|
667
671
|
options?: NodeChild;
|
|
668
672
|
};
|
|
669
673
|
};
|
|
@@ -1328,6 +1332,7 @@ export type Type = BaseNode & {
|
|
|
1328
1332
|
default?: NodeChild;
|
|
1329
1333
|
options?: NodeChild;
|
|
1330
1334
|
collate?: NodeChild
|
|
1335
|
+
aggregate?: NodeChild;
|
|
1331
1336
|
};
|
|
1332
1337
|
};
|
|
1333
1338
|
|
|
@@ -1349,6 +1354,15 @@ export type UnaryOperator = Expr & {
|
|
|
1349
1354
|
};
|
|
1350
1355
|
};
|
|
1351
1356
|
|
|
1357
|
+
export type UndropStatement = XXXStatement & {
|
|
1358
|
+
node_type: "UndropStatement";
|
|
1359
|
+
children: {
|
|
1360
|
+
what: NodeChild;
|
|
1361
|
+
if_not_exists?: NodeVecChild;
|
|
1362
|
+
ident: NodeChild;
|
|
1363
|
+
};
|
|
1364
|
+
};
|
|
1365
|
+
|
|
1352
1366
|
export type UnpivotConfig = BaseNode & {
|
|
1353
1367
|
token: Token;
|
|
1354
1368
|
node_type: "UnpivotConfig";
|
package/bq2cst.js
CHANGED
|
@@ -282,21 +282,21 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
|
282
282
|
return addHeapObject(ret);
|
|
283
283
|
};
|
|
284
284
|
|
|
285
|
-
module.exports.
|
|
285
|
+
module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
|
|
286
286
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
287
287
|
};
|
|
288
288
|
|
|
289
|
-
module.exports.
|
|
289
|
+
module.exports.__wbg_new_16b304a2cfa7ff4a = function() {
|
|
290
290
|
const ret = new Array();
|
|
291
291
|
return addHeapObject(ret);
|
|
292
292
|
};
|
|
293
293
|
|
|
294
|
-
module.exports.
|
|
294
|
+
module.exports.__wbg_new_d9bc3a0147634640 = function() {
|
|
295
295
|
const ret = new Map();
|
|
296
296
|
return addHeapObject(ret);
|
|
297
297
|
};
|
|
298
298
|
|
|
299
|
-
module.exports.
|
|
299
|
+
module.exports.__wbg_new_72fb9a18b5ae2624 = function() {
|
|
300
300
|
const ret = new Object();
|
|
301
301
|
return addHeapObject(ret);
|
|
302
302
|
};
|
|
@@ -306,11 +306,11 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
306
306
|
return ret;
|
|
307
307
|
};
|
|
308
308
|
|
|
309
|
-
module.exports.
|
|
309
|
+
module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
|
|
310
310
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
311
311
|
};
|
|
312
312
|
|
|
313
|
-
module.exports.
|
|
313
|
+
module.exports.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
|
|
314
314
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
315
315
|
return addHeapObject(ret);
|
|
316
316
|
};
|
package/bq2cst_bg.wasm
CHANGED
|
Binary file
|