@nongt/visql 0.7.0 → 0.9.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/README.md +23 -359
- package/dist/{MuiTimePicker-BjywwrRm.js → MuiTimePicker-DRqT6ByZ.js} +1 -1
- package/dist/PipelineEditor-C10lng6j.js +10544 -0
- package/dist/core.js +336 -78
- package/dist/explain.js +165 -0
- package/dist/fixtures.js +1 -1
- package/dist/index.js +114 -98
- package/dist/issueLocation-BOSdd1JX.js +1106 -0
- package/dist/mui-date-pickers-host.js +1 -1
- package/dist/mui-date-pickers.js +1 -1
- package/dist/mui.js +95 -84
- package/dist/params-MMOdKWnW.js +2217 -0
- package/dist/{schema-DFC26AhZ.js → schema-dP_ISylQ.js} +270 -242
- package/dist/sql-import.js +613 -627
- package/dist/sqlGen-B7-2-i9V.js +903 -0
- package/dist/style.css +1 -1
- package/dist/tokens-DV5rTGMj.js +171 -0
- package/dist/types/core/ast.d.ts +1 -1
- package/dist/types/core/components/flow/NodeActionFrame.d.ts +20 -0
- package/dist/types/core/components/flow/useNodeActions.d.ts +18 -0
- package/dist/types/core/i18n/defaultMessages.d.ts +15 -0
- package/dist/types/core/i18n/messages.d.ts +11 -0
- package/dist/types/core/params.d.ts +10 -0
- package/dist/types/core/planFindings.d.ts +27 -0
- package/dist/types/core/queryHelpers.d.ts +1 -1
- package/dist/types/core/schema.d.ts +35 -20
- package/dist/types/core/scopeQuery.d.ts +2 -2
- package/dist/types/core/sqlGen.d.ts +10 -0
- package/dist/types/core/theme/appearance.d.ts +27 -0
- package/dist/types/core/theme/looks.d.ts +14 -0
- package/dist/types/core/theme/tokens.d.ts +9 -1
- package/dist/types/core-api.d.ts +3 -2
- package/dist/types/explain/explainQuery.d.ts +53 -0
- package/dist/types/explain/postgresPlan.d.ts +12 -0
- package/dist/types/explain.d.ts +2 -0
- package/dist/types/features/queryEditor/CanvasBackground.d.ts +2 -0
- package/dist/types/features/queryEditor/ExplainButton.d.ts +13 -0
- package/dist/types/features/queryEditor/IssuesButton.d.ts +14 -6
- package/dist/types/features/queryEditor/PipelineEditor.d.ts +15 -0
- package/dist/types/features/queryEditor/planText.d.ts +8 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +14 -1
- package/dist/PipelineEditor-9-9xOJcB.js +0 -10214
- package/dist/core-api-BsEMnDQ1.js +0 -1141
- package/dist/issueLocation-732-e0B8.js +0 -3281
- package/dist/tokens-BTaVMSOx.js +0 -95
package/dist/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { D as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { D as f } from "./PipelineEditor-C10lng6j.js";
|
|
2
|
+
import { P as v, f as B, a as L } from "./PipelineEditor-C10lng6j.js";
|
|
3
|
+
import { D as R, E as I, M as k, b as C, f as O, c as q, h as H, i as G, v as Y } from "./schema-dP_ISylQ.js";
|
|
4
|
+
import { D as X, M as W, a as j, b as J, d as V, e as z, f as K, g as Z, c as $, h as ee, k as ae, m as se, q as te, i as re, j as ne, s as oe, l as ie, p as de, n as ce, o as ue, u as le } from "./params-MMOdKWnW.js";
|
|
5
|
+
import { c as fe, f as pe, i as he } from "./calendarDate-CYlr9TvX.js";
|
|
6
|
+
import { Q as Se, l as Te, S as ge, a as Ae, n as Ne, f as _e, j as De, m as Ue, b as be, k as ye, r as Me, c as Qe, g as xe, h as Fe, i as ve, s as Be, d as Le, e as Pe, v as Re } from "./issueLocation-BOSdd1JX.js";
|
|
7
|
+
import { w as p, a as h, b as E } from "./sqlGen-B7-2-i9V.js";
|
|
8
|
+
import { D as ke, c as Ce, S as Oe, s as qe, u as He } from "./sqlGen-B7-2-i9V.js";
|
|
9
|
+
import { QUERY_FORMAT_VERSION as Ye, QueryFormatError as we, addCondition as Xe, addGroupBy as We, addJoin as je, addOrderBy as Je, addSelectItem as Ve, expr as ze, loadQuery as Ke, removeJoin as Ze, requireBaseTable as $e, saveQuery as ea, setBaseTable as aa, setDistinct as sa, setHaving as ta, setPaging as ra } from "./core.js";
|
|
10
|
+
import { D as S, N as T } from "./tokens-DV5rTGMj.js";
|
|
11
|
+
function D(n, s, e = {}) {
|
|
12
|
+
const a = { paths: [] }, t = p(a, () => e.parameterized ? h(n, s, e).sql : E(n, s, e));
|
|
10
13
|
let r = "";
|
|
11
14
|
const c = [], u = [];
|
|
12
15
|
for (let o = 0; o < t.length; o += 1) {
|
|
@@ -15,18 +18,18 @@ function T(n, s, e = {}) {
|
|
|
15
18
|
const d = t.indexOf("", o);
|
|
16
19
|
u.push({ index: Number(t.slice(o + 1, d)), start: r.length }), o = d;
|
|
17
20
|
} else if (i === "") {
|
|
18
|
-
const { index: d, start:
|
|
19
|
-
c.push({ start:
|
|
21
|
+
const { index: d, start: m } = u.pop();
|
|
22
|
+
c.push({ start: m, end: r.length, pathSegments: a.paths[d] });
|
|
20
23
|
} else
|
|
21
24
|
r += i;
|
|
22
25
|
}
|
|
23
26
|
return c.sort((o, i) => o.start - i.start || i.end - o.end || o.pathSegments.length - i.pathSegments.length), { sql: r, spans: c };
|
|
24
27
|
}
|
|
25
|
-
function
|
|
28
|
+
function U(n, s) {
|
|
26
29
|
const e = n.filter((a) => a.start <= s && s < a.end);
|
|
27
30
|
return e[e.length - 1];
|
|
28
31
|
}
|
|
29
|
-
function
|
|
32
|
+
function b(n, s) {
|
|
30
33
|
const e = n.filter((a) => s.every((t, r) => a.pathSegments[r] === t));
|
|
31
34
|
return e.filter((a, t) => !e.slice(0, t).some(
|
|
32
35
|
(r) => r.start <= a.start && a.end <= r.end
|
|
@@ -37,7 +40,7 @@ function l(n) {
|
|
|
37
40
|
for (; s.nextNode(); ) e.push(s.currentNode);
|
|
38
41
|
return e;
|
|
39
42
|
}
|
|
40
|
-
function
|
|
43
|
+
function g(n, s, e) {
|
|
41
44
|
const a = document.createRange();
|
|
42
45
|
let t = 0;
|
|
43
46
|
return l(n).forEach((r) => {
|
|
@@ -45,7 +48,7 @@ function S(n, s, e) {
|
|
|
45
48
|
s >= t && s <= c && a.setStart(r, s - t), e >= t && e <= c && a.setEnd(r, e - t), t = c;
|
|
46
49
|
}), a;
|
|
47
50
|
}
|
|
48
|
-
function
|
|
51
|
+
function y(n, s, e) {
|
|
49
52
|
const a = document.caretPositionFromPoint ? document.caretPositionFromPoint(s, e) : document.caretRangeFromPoint(s, e);
|
|
50
53
|
if (!a) return;
|
|
51
54
|
const [t, r] = "offsetNode" in a ? [a.offsetNode, a.offset] : [a.startContainer, a.startOffset], c = l(n), u = c.indexOf(t);
|
|
@@ -53,93 +56,106 @@ function _(n, s, e) {
|
|
|
53
56
|
const o = c.slice(0, u).reduce((i, d) => i + d.length, 0) + r;
|
|
54
57
|
return [o, o - 1].find((i) => {
|
|
55
58
|
if (i < 0) return !1;
|
|
56
|
-
const d =
|
|
59
|
+
const d = g(n, i, i + 1).getBoundingClientRect();
|
|
57
60
|
return s >= d.left && s <= d.right && e >= d.top && e <= d.bottom;
|
|
58
61
|
});
|
|
59
62
|
}
|
|
63
|
+
const M = { theme: S, appearance: f }, Q = {
|
|
64
|
+
theme: T,
|
|
65
|
+
appearance: {
|
|
66
|
+
edges: "smoothstep",
|
|
67
|
+
background: "lines",
|
|
68
|
+
backgroundGap: 32,
|
|
69
|
+
groupFrame: "bar",
|
|
70
|
+
actions: "hover"
|
|
71
|
+
}
|
|
72
|
+
};
|
|
60
73
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
74
|
+
M as CHARCOAL,
|
|
75
|
+
f as DEFAULT_APPEARANCE,
|
|
76
|
+
R as DEFAULT_FUNCTIONS,
|
|
77
|
+
X as DEFAULT_MESSAGES,
|
|
78
|
+
S as DEFAULT_THEME,
|
|
79
|
+
ke as DIALECTS,
|
|
80
|
+
Ce as DIALECT_LABELS,
|
|
81
|
+
I as EMPTY_SCHEMA,
|
|
82
|
+
k as MAX_NAME_LENGTH,
|
|
83
|
+
W as MAX_NUMBER_DIGITS,
|
|
84
|
+
j as MAX_TEXT_LENGTH,
|
|
85
|
+
J as MAX_TYPE_NAME_LENGTH,
|
|
86
|
+
Q as NAVY,
|
|
87
|
+
Ye as QUERY_FORMAT_VERSION,
|
|
88
|
+
Se as QUERY_ISSUE_KINDS,
|
|
89
|
+
Te as QUERY_WARNING_KINDS,
|
|
90
|
+
v as QueryBuilder,
|
|
91
|
+
we as QueryFormatError,
|
|
92
|
+
Oe as ScopeError,
|
|
93
|
+
ge as SharedBaseError,
|
|
94
|
+
Xe as addCondition,
|
|
95
|
+
We as addGroupBy,
|
|
96
|
+
je as addJoin,
|
|
97
|
+
V as addMeasure,
|
|
98
|
+
Je as addOrderBy,
|
|
99
|
+
Ve as addSelectItem,
|
|
100
|
+
Ae as addSharedQuery,
|
|
101
|
+
z as addUnionBranch,
|
|
102
|
+
K as addUnionJoin,
|
|
103
|
+
Z as addUnionTable,
|
|
88
104
|
h as astToParameterizedSql,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
E as astToSql,
|
|
106
|
+
D as astToSqlWithSpans,
|
|
107
|
+
C as branchesOf,
|
|
108
|
+
fe as calendarDay,
|
|
109
|
+
$ as createEmptyQuery,
|
|
110
|
+
ee as createUnion,
|
|
111
|
+
ze as expr,
|
|
112
|
+
O as filterSchema,
|
|
113
|
+
B as formula,
|
|
114
|
+
L as formulaText,
|
|
115
|
+
pe as fromIsoDay,
|
|
116
|
+
q as functionsForDialect,
|
|
117
|
+
H as hasBaseTable,
|
|
118
|
+
G as isUnion,
|
|
119
|
+
he as isoDay,
|
|
120
|
+
Ne as issueLocation,
|
|
121
|
+
_e as joinMultiplicity,
|
|
122
|
+
De as joinSharedQuery,
|
|
107
123
|
ae as keepMeasuresInStep,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
124
|
+
Ke as loadQuery,
|
|
125
|
+
Ue as makeShared,
|
|
126
|
+
be as makeSubQuery,
|
|
127
|
+
se as measureFacts,
|
|
128
|
+
te as queryParams,
|
|
129
|
+
ye as relativeDateLabel,
|
|
130
|
+
Ze as removeJoin,
|
|
131
|
+
Me as removeSharedQuery,
|
|
132
|
+
re as removeUnionTable,
|
|
133
|
+
Qe as renameSharedQuery,
|
|
134
|
+
ne as renameUnionColumn,
|
|
135
|
+
xe as repeatedReads,
|
|
136
|
+
Fe as repeatedTables,
|
|
137
|
+
$e as requireBaseTable,
|
|
138
|
+
ve as rowsPerBase,
|
|
139
|
+
ea as saveQuery,
|
|
140
|
+
qe as scopeQuery,
|
|
141
|
+
aa as setBaseTable,
|
|
142
|
+
sa as setDistinct,
|
|
143
|
+
ta as setHaving,
|
|
144
|
+
ra as setPaging,
|
|
145
|
+
Be as setSharedBase,
|
|
146
|
+
oe as setUnionAll,
|
|
147
|
+
Le as sharedQueryName,
|
|
148
|
+
Pe as sharedUses,
|
|
149
|
+
U as spanAt,
|
|
150
|
+
b as spansFor,
|
|
151
|
+
y as sqlOffsetAt,
|
|
152
|
+
g as sqlRangeOf,
|
|
153
|
+
ie as unionName,
|
|
154
|
+
de as unionTableColumns,
|
|
155
|
+
ce as unionWithQuery,
|
|
156
|
+
ue as unionableTables,
|
|
157
|
+
He as unscopedBodies,
|
|
158
|
+
le as unwrapUnion,
|
|
159
|
+
Re as validateQuery,
|
|
160
|
+
Y as validateSchema
|
|
145
161
|
};
|