sqlscope-rs 0.6.1 → 0.7.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/dist/api.d.ts +2 -0
- package/dist/api.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/wasm/sqlscope_wasm_bg.wasm +0 -0
package/dist/api.d.ts
CHANGED
|
@@ -83,6 +83,8 @@ export interface ColumnUsage {
|
|
|
83
83
|
column: string;
|
|
84
84
|
clause: Clause;
|
|
85
85
|
}
|
|
86
|
+
/** Convert Trino SQL and return one string per statement. */
|
|
87
|
+
export declare function transpile(sql: string, source: "trino", target: "starrocks" | "mysql", mode?: "strict" | "best_effort"): string[];
|
|
86
88
|
/**
|
|
87
89
|
* Wrap every in-scope table of a query in a derived table filtered by `predicate`.
|
|
88
90
|
*
|
package/dist/api.js
CHANGED
|
@@ -17,6 +17,10 @@ function table(ref) {
|
|
|
17
17
|
function run(operation, sql, fields, options) {
|
|
18
18
|
return call(operation, { sql, ...fields, options });
|
|
19
19
|
}
|
|
20
|
+
/** Convert Trino SQL and return one string per statement. */
|
|
21
|
+
export function transpile(sql, source, target, mode = "strict") {
|
|
22
|
+
return call("transpile", { sql, source, target, mode });
|
|
23
|
+
}
|
|
20
24
|
/**
|
|
21
25
|
* Wrap every in-scope table of a query in a derived table filtered by `predicate`.
|
|
22
26
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* | Function | Purpose |
|
|
5
5
|
* | --- | --- |
|
|
6
|
+
* | {@link transpile} | Convert Trino SQL to StarRocks or MySQL. |
|
|
6
7
|
* | {@link applyRowFilter} | Filter every in-scope table by a predicate. |
|
|
7
8
|
* | {@link injectCtes} | Prepend CTE definitions to a query's root `WITH`. |
|
|
8
9
|
* | {@link rewriteTables} | Replace table references with other tables or derived tables. |
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* | Function | Purpose |
|
|
5
5
|
* | --- | --- |
|
|
6
|
+
* | {@link transpile} | Convert Trino SQL to StarRocks or MySQL. |
|
|
6
7
|
* | {@link applyRowFilter} | Filter every in-scope table by a predicate. |
|
|
7
8
|
* | {@link injectCtes} | Prepend CTE definitions to a query's root `WITH`. |
|
|
8
9
|
* | {@link rewriteTables} | Replace table references with other tables or derived tables. |
|
package/package.json
CHANGED
|
Binary file
|