@finos/legend-application-studio 28.15.9 → 28.15.11
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js +87 -14
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +6 -3
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts +11 -7
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js +22 -15
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +1 -1
- package/package.json +6 -6
- package/src/components/editor/panel-group/SQLPlaygroundPanel.tsx +226 -42
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +10 -7
- package/src/stores/editor/panel-group/SQLPlaygroundPanelState.ts +29 -15
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SQLPlaygroundPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/panel-group/SQLPlaygroundPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"SQLPlaygroundPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/panel-group/SQLPlaygroundPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4gBH,eAAO,MAAM,kBAAkB;;CAqR7B,CAAC"}
|
@@ -15,7 +15,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
* limitations under the License.
|
16
16
|
*/
|
17
17
|
import { observer } from 'mobx-react-lite';
|
18
|
-
import { ResizablePanelGroup, ResizablePanel, ResizablePanelSplitter, CustomSelectorInput, createFilter, PURE_ConnectionIcon, BlankPanelPlaceholder, PanelDropZone, ResizablePanelSplitterLine, PlayIcon, PanelLoadingIndicator, BlankPanelContent,
|
18
|
+
import { ResizablePanelGroup, ResizablePanel, ResizablePanelSplitter, CustomSelectorInput, createFilter, PURE_ConnectionIcon, BlankPanelPlaceholder, PanelDropZone, ResizablePanelSplitterLine, PlayIcon, PanelLoadingIndicator, BlankPanelContent, PURE_DatabaseIcon, SyncIcon, clsx, CheckSquareIcon, SquareIcon, } from '@finos/legend-art';
|
19
19
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
20
20
|
import { useApplicationStore, useCommands, useConditionedApplicationNavigationContext, } from '@finos/legend-application';
|
21
21
|
import { flowResult } from 'mobx';
|
@@ -28,8 +28,8 @@ import { useEditorStore } from '../EditorStoreProvider.js';
|
|
28
28
|
import { PANEL_MODE } from '../../../stores/editor/EditorConfig.js';
|
29
29
|
import { useDrag, useDrop } from 'react-dnd';
|
30
30
|
import { CORE_DND_TYPE, } from '../../../stores/editor/utils/DnDUtils.js';
|
31
|
-
import { DataGrid } from '@finos/legend-lego/data-grid';
|
32
|
-
import { getNonNullableEntry, getNullableEntry, getNullableLastEntry, isNonNullable, isString, parseCSVString, uniqBy, } from '@finos/legend-shared';
|
31
|
+
import { DataGrid, } from '@finos/legend-lego/data-grid';
|
32
|
+
import { getNonNullableEntry, getNullableEntry, getNullableLastEntry, isNonNullable, isNumber, isString, isValidURL, parseCSVString, prettyDuration, uniqBy, } from '@finos/legend-shared';
|
33
33
|
import { DatabaseSchemaExplorer, DatabaseSchemaExplorerTreeNodeContainer, } from '../editor-group/connection-editor/DatabaseSchemaExplorer.js';
|
34
34
|
import { DatabaseSchemaExplorerTreeTableNodeData } from '../../../stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js';
|
35
35
|
import { buildRelationalDatabaseConnectionOption, } from '../editor-group/connection-editor/RelationalDatabaseConnectionEditor.js';
|
@@ -109,12 +109,6 @@ const PlaygroundSQLCodeEditor = observer(() => {
|
|
109
109
|
const codeEditorRef = useRef(null);
|
110
110
|
const [editor, setEditor] = useState();
|
111
111
|
const sqlIdentifierSuggestionProviderDisposer = useRef(undefined);
|
112
|
-
const executeRawSQL = () => {
|
113
|
-
flowResult(playgroundState.executeRawSQL()).catch(applicationStore.alertUnhandledError);
|
114
|
-
};
|
115
|
-
const reset = () => {
|
116
|
-
playgroundState.resetSQL();
|
117
|
-
};
|
118
112
|
useEffect(() => {
|
119
113
|
if (!editor && codeEditorRef.current) {
|
120
114
|
const element = codeEditorRef.current;
|
@@ -201,7 +195,7 @@ const PlaygroundSQLCodeEditor = observer(() => {
|
|
201
195
|
isDatabaseNodeDragOver: monitor.isOver({ shallow: true }),
|
202
196
|
}),
|
203
197
|
}), [handleDatabaseNodeDrop]);
|
204
|
-
return (
|
198
|
+
return (_jsx("div", { className: "sql-playground__code-editor", children: _jsx(PanelDropZone, { className: "sql-playground__code-editor__content", isDragOver: isDatabaseNodeDragOver, dropTargetConnector: dropConnector, children: _jsx("div", { className: "code-editor__container", children: _jsx("div", { className: "code-editor__body", ref: codeEditorRef }) }) }) }));
|
205
199
|
});
|
206
200
|
const parseExecutionResultData = (data) => {
|
207
201
|
const lines = data.split('\n').filter((line) => line.trim().length);
|
@@ -225,12 +219,78 @@ const parseExecutionResultData = (data) => {
|
|
225
219
|
}
|
226
220
|
return undefined;
|
227
221
|
};
|
222
|
+
const TDSResultCellRenderer = observer((params) => {
|
223
|
+
const cellValue = params.value;
|
224
|
+
const formattedCellValue = () => {
|
225
|
+
if (isNumber(cellValue)) {
|
226
|
+
return Intl.NumberFormat('en-US', {
|
227
|
+
maximumFractionDigits: 4,
|
228
|
+
}).format(Number(cellValue));
|
229
|
+
}
|
230
|
+
return cellValue;
|
231
|
+
};
|
232
|
+
const cellValueUrlLink = isString(cellValue) && isValidURL(cellValue) ? cellValue : undefined;
|
233
|
+
return (_jsx("div", { className: clsx('query-builder__result__values__table__cell'), children: cellValueUrlLink ? (_jsx("a", { href: cellValueUrlLink, target: "_blank", rel: "noreferrer", children: cellValueUrlLink })) : (_jsx("span", { children: formattedCellValue() })) }));
|
234
|
+
});
|
228
235
|
const PlayGroundSQLExecutionResultGrid = observer((props) => {
|
229
|
-
const { result } = props;
|
236
|
+
const { result, useAdvancedGrid, useLocalMode } = props;
|
230
237
|
const data = parseExecutionResultData(result);
|
231
238
|
if (!data) {
|
232
239
|
return (_jsx(BlankPanelContent, { children: `Can't parse result, displaying raw form:\n${result}` }));
|
233
240
|
}
|
241
|
+
if (useAdvancedGrid) {
|
242
|
+
if (useLocalMode) {
|
243
|
+
const localcolDefs = data.columns.map((colName) => ({
|
244
|
+
minWidth: 50,
|
245
|
+
sortable: true,
|
246
|
+
resizable: true,
|
247
|
+
field: colName,
|
248
|
+
flex: 1,
|
249
|
+
enablePivot: true,
|
250
|
+
enableRowGroup: true,
|
251
|
+
enableValue: true,
|
252
|
+
allowedAggFuncs: ['count'],
|
253
|
+
}));
|
254
|
+
return (_jsx(DataGrid, { rowData: data.rowData, gridOptions: {
|
255
|
+
suppressScrollOnNewData: true,
|
256
|
+
rowSelection: 'multiple',
|
257
|
+
pivotPanelShow: 'always',
|
258
|
+
rowGroupPanelShow: 'always',
|
259
|
+
enableRangeSelection: true,
|
260
|
+
},
|
261
|
+
// NOTE: when column definition changed, we need to force refresh the cell to make sure the cell renderer is updated
|
262
|
+
// See https://stackoverflow.com/questions/56341073/how-to-refresh-an-ag-grid-when-a-change-occurs-inside-a-custom-cell-renderer-com
|
263
|
+
onRowDataUpdated: (params) => {
|
264
|
+
params.api.refreshCells({ force: true });
|
265
|
+
}, suppressFieldDotNotation: true, suppressContextMenu: false, columnDefs: localcolDefs, sideBar: ['columns', 'filters'] }));
|
266
|
+
}
|
267
|
+
const colDefs = data.columns.map((colName) => ({
|
268
|
+
minWidth: 50,
|
269
|
+
sortable: true,
|
270
|
+
resizable: true,
|
271
|
+
field: colName,
|
272
|
+
flex: 1,
|
273
|
+
cellRenderer: TDSResultCellRenderer,
|
274
|
+
filter: true,
|
275
|
+
}));
|
276
|
+
const getContextMenuItems = useCallback((params) => [
|
277
|
+
'copy',
|
278
|
+
'copyWithHeaders',
|
279
|
+
{
|
280
|
+
name: 'Copy Row Value',
|
281
|
+
action: () => {
|
282
|
+
params.api.copySelectedRowsToClipboard();
|
283
|
+
},
|
284
|
+
},
|
285
|
+
], []);
|
286
|
+
return (_jsx("div", { className: "sql-playground__result__grid ag-theme-balham-dark", children: _jsx(DataGrid, { rowData: data.rowData, overlayNoRowsTemplate: `<div class="sql-playground__result__grid--empty">No results</div>`, gridOptions: {
|
287
|
+
suppressScrollOnNewData: true,
|
288
|
+
rowSelection: 'multiple',
|
289
|
+
enableRangeSelection: true,
|
290
|
+
}, onRowDataUpdated: (params) => {
|
291
|
+
params.api.refreshCells({ force: true });
|
292
|
+
}, suppressFieldDotNotation: true, suppressClipboardPaste: false, suppressContextMenu: false, columnDefs: colDefs, getContextMenuItems: (params) => getContextMenuItems(params) }) }));
|
293
|
+
}
|
234
294
|
return (_jsx("div", { className: "sql-playground__result__grid ag-theme-balham-dark", children: _jsx(DataGrid, { rowData: data.rowData, overlayNoRowsTemplate: `<div class="sql-playground__result__grid--empty">No results</div>`, alwaysShowVerticalScroll: true, suppressFieldDotNotation: true, columnDefs: data.columns.map((column) => ({
|
235
295
|
minWidth: 50,
|
236
296
|
sortable: true,
|
@@ -295,14 +355,27 @@ export const SQLPlaygroundPanel = observer(() => {
|
|
295
355
|
flowResult(playgroundState.schemaExplorerState.updateDatabase()).catch(applicationStore.alertUnhandledError);
|
296
356
|
}
|
297
357
|
};
|
358
|
+
const executeRawSQL = () => {
|
359
|
+
flowResult(playgroundState.executeRawSQL()).catch(applicationStore.alertUnhandledError);
|
360
|
+
};
|
361
|
+
const advancedMode = Boolean(editorStore.applicationStore.config.options.queryBuilderConfig
|
362
|
+
?.TEMPORARY__enableGridEnterpriseMode);
|
363
|
+
const resultDescription = playgroundState.sqlExecutionResult
|
364
|
+
? `query ran in ${prettyDuration(playgroundState.sqlExecutionResult.sqlDuration, {
|
365
|
+
ms: true,
|
366
|
+
})}`
|
367
|
+
: undefined;
|
368
|
+
const toggleocalMode = () => {
|
369
|
+
playgroundState.toggleIsLocalModeEnabled();
|
370
|
+
};
|
298
371
|
useEffect(() => {
|
299
372
|
if (playgroundState.schemaExplorerState) {
|
300
373
|
flowResult(playgroundState.schemaExplorerState.fetchDatabaseMetadata()).catch(applicationStore.alertUnhandledError);
|
301
374
|
}
|
302
375
|
}, [playgroundState, applicationStore, playgroundState.schemaExplorerState]);
|
303
376
|
useConditionedApplicationNavigationContext(LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY.SQL_PLAYGROUND, editorStore.activePanelMode === PANEL_MODE.SQL_PLAYGROUND);
|
304
|
-
return (_jsx(PanelDropZone, { isDragOver: isConnectionDragOver, dropTargetConnector: dropConnector, children: _jsxs("div", { className: "sql-playground", children: [playgroundState.connection && (_jsxs(ResizablePanelGroup, { orientation: "vertical", children: [_jsx(ResizablePanel, { size: 300, children: _jsxs("div", { className: "sql-playground__config", children: [_jsxs("div", { className: "sql-playground__config__setup", children: [_jsxs("div", { className: "sql-playground__config__connection-selector", children: [_jsx("div", { className: "sql-playground__config__connection-selector__icon", children: _jsx(PURE_ConnectionIcon, {}) }), _jsx(CustomSelectorInput, { ref: connectionSelectorRef, className: "sql-playground__config__connection-selector__input", options: connectionOptions, onChange: changeConnection, value: selectedConnectionOption, darkMode: true, placeholder: "Choose a connection...", filterOption: connectionFilterOption })] }), _jsxs("div", { className: "sql-playground__config__database-selector", children: [_jsx("div", { className: "sql-playground__config__database-selector__icon", children: _jsx(PURE_DatabaseIcon, {}) }), _jsx(CustomSelectorInput, { ref: connectionSelectorRef, className: "sql-playground__config__database-selector__input", options: connectionOptions, onChange: changeConnection, value: selectedConnectionOption, darkMode: true, placeholder: "Choose a connection...", filterOption: connectionFilterOption }), _jsx("button", { className: "sql-playground__config__database-selector__update-btn btn--sm btn--dark", disabled: !playgroundState.database
|
305
|
-
|
306
|
-
|
377
|
+
return (_jsx(PanelDropZone, { isDragOver: isConnectionDragOver, dropTargetConnector: dropConnector, children: _jsxs("div", { className: "sql-playground", children: [playgroundState.connection && (_jsxs(ResizablePanelGroup, { orientation: "vertical", children: [_jsx(ResizablePanel, { size: 300, children: _jsxs("div", { className: "sql-playground__config", children: [_jsxs("div", { className: "sql-playground__config__setup", children: [_jsxs("div", { className: "sql-playground__config__connection-selector", children: [_jsx("div", { className: "sql-playground__config__connection-selector__icon", children: _jsx(PURE_ConnectionIcon, {}) }), _jsx(CustomSelectorInput, { ref: connectionSelectorRef, className: "sql-playground__config__connection-selector__input", options: connectionOptions, onChange: changeConnection, value: selectedConnectionOption, darkMode: true, placeholder: "Choose a connection...", filterOption: connectionFilterOption })] }), _jsxs("div", { className: "sql-playground__config__database-selector", children: [_jsx("div", { className: "sql-playground__config__database-selector__icon", children: _jsx(PURE_DatabaseIcon, {}) }), _jsx(CustomSelectorInput, { ref: connectionSelectorRef, className: "sql-playground__config__database-selector__input", options: connectionOptions, onChange: changeConnection, value: selectedConnectionOption, darkMode: true, placeholder: "Choose a connection...", filterOption: connectionFilterOption }), _jsx("button", { className: "sql-playground__config__database-selector__update-btn btn--sm btn--dark", disabled: !playgroundState.database, onClick: updateDatabase, title: "Update database", children: _jsx(SyncIcon, {}) })] })] }), _jsxs("div", { className: "sql-playground__config__schema-explorer", children: [_jsx(PanelLoadingIndicator, { isLoading: Boolean(playgroundState.schemaExplorerState?.isGeneratingDatabase) }), playgroundState.schemaExplorerState?.treeData && (_jsx(DatabaseSchemaExplorer, { treeData: playgroundState.schemaExplorerState.treeData, schemaExplorerState: playgroundState.schemaExplorerState, treeNodeContainerComponent: SQLPlaygroundDatabaseSchemaExplorerTreeNodeContainer }))] })] }) }), _jsx(ResizablePanelSplitter, {}), _jsx(ResizablePanel, { children: _jsx("div", { className: "panel sql-playground__sql-editor", children: _jsxs(ResizablePanelGroup, { orientation: "horizontal", children: [_jsx(ResizablePanel, { children: _jsx(PlaygroundSQLCodeEditor, {}) }), _jsx(ResizablePanelSplitter, { children: _jsx(ResizablePanelSplitterLine, { color: "var(--color-dark-grey-250)" }) }), _jsxs(ResizablePanel, { size: 300, children: [_jsxs("div", { className: "panel__header", children: [_jsxs("div", { className: "panel__header__title", children: [_jsx("div", { className: "panel__header__title__label", children: "result" }), playgroundState.executeRawSQLState.isInProgress && (_jsx("div", { className: "panel__header__title__label__status", children: "Running SQL..." })), _jsx("div", { className: "query-builder__result__analytics", children: resultDescription ?? '' })] }), _jsxs("div", { className: "panel__header__actions query-builder__result__header__actions", children: [advancedMode && (_jsxs("div", { className: "query-builder__result__advanced__mode", children: [_jsx("div", { className: "query-builder__result__advanced__mode__label", children: "Local Mode" }), _jsx("button", { className: clsx('query-builder__result__advanced__mode__toggler__btn', {
|
378
|
+
'query-builder__result__advanced__mode__toggler__btn--toggled': playgroundState.isLocalModeEnabled,
|
379
|
+
}), onClick: toggleocalMode, tabIndex: -1, children: playgroundState.isLocalModeEnabled ? (_jsx(CheckSquareIcon, {})) : (_jsx(SquareIcon, {})) })] })), _jsx("div", { className: "query-builder__result__execute-btn btn__dropdown-combo btn__dropdown-combo--primary", children: _jsxs("button", { className: "btn__dropdown-combo__label", onClick: executeRawSQL, disabled: playgroundState.executeRawSQLState.isInProgress, tabIndex: -1, children: [_jsx(PlayIcon, { className: "btn__dropdown-combo__label__icon" }), _jsx("div", { className: "btn__dropdown-combo__label__title", children: "Run Query" })] }) })] })] }), playgroundState.sqlExecutionResult !== undefined && (_jsx(PlayGroundSQLExecutionResultGrid, { result: playgroundState.sqlExecutionResult.value, useAdvancedGrid: advancedMode, useLocalMode: playgroundState.isLocalModeEnabled })), playgroundState.sqlExecutionResult === undefined && (_jsx("div", {}))] })] }) }) })] })), !playgroundState.connection && (_jsx(BlankPanelPlaceholder, { onClick: onPickConnection, clickActionType: "add", text: "Pick a connection to start", tooltipText: "Drop a connection to start...", isDropZoneActive: isConnectionDragOver }))] }) }));
|
307
380
|
});
|
308
381
|
//# sourceMappingURL=SQLPlaygroundPanel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SQLPlaygroundPanel.js","sourceRoot":"","sources":["../../../../src/components/editor/panel-group/SQLPlaygroundPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EAEnB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,0BAA0B,EAC1B,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,0CAA0C,GAC3C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,MAAM,IAAI,eAAe,EACzB,SAAS,IAAI,kBAAkB,GAGhC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gDAAgD,EAAE,MAAM,8DAA8D,CAAC;AAChI,OAAO,EAAgC,MAAM,+DAA+D,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,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,MAAM,EAAE,eAAe,CAAC,kBAAkB,GAC1C,CACH,EACA,eAAe,CAAC,kBAAkB,KAAK,SAAS,IAAI,CACnD,eAAO,CACR,IACc,IACG,GAClB,GACS,IACG,CACvB,EACA,CAAC,eAAe,CAAC,UAAU,IAAI,CAC9B,KAAC,qBAAqB,IACpB,OAAO,EAAE,gBAAgB,EACzB,eAAe,EAAC,KAAK,EACrB,IAAI,EAAC,4BAA4B,EACjC,WAAW,EAAC,+BAA+B,EAC3C,gBAAgB,EAAE,oBAAoB,GACtC,CACH,IACG,GACQ,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"SQLPlaygroundPanel.js","sourceRoot":"","sources":["../../../../src/components/editor/panel-group/SQLPlaygroundPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EAEnB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,0BAA0B,EAC1B,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,IAAI,EACJ,eAAe,EACf,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,0CAA0C,GAC3C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,MAAM,IAAI,eAAe,EACzB,SAAS,IAAI,kBAAkB,GAGhC,MAAM,eAAe,CAAC;A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AAqF,YAClG,kBACE,SAAS,EAAC,4BAA4B,EACtC,OAAO,EAAE,aAAa,EACtB,QAAQ,EACN,eAAe,CAAC,kBAAkB,CAAC,YAAY,EAEjD,QAAQ,EAAE,CAAC,CAAC,aAEZ,KAAC,QAAQ,IAAC,SAAS,EAAC,kCAAkC,GAAG,EACzD,cAAK,SAAS,EAAC,mCAAmC,0BAE5C,IACC,GACL,IACF,IACF,EACL,eAAe,CAAC,kBAAkB,KAAK,SAAS,IAAI,CACnD,KAAC,gCAAgC,IAC/B,MAAM,EAAE,eAAe,CAAC,kBAAkB,CAAC,KAAK,EAChD,eAAe,EAAE,YAAY,EAC7B,YAAY,EAAE,eAAe,CAAC,kBAAkB,GAChD,CACH,EACA,eAAe,CAAC,kBAAkB,KAAK,SAAS,IAAI,CACnD,eAAO,CACR,IACc,IACG,GAClB,GACS,IACG,CACvB,EACA,CAAC,eAAe,CAAC,UAAU,IAAI,CAC9B,KAAC,qBAAqB,IACpB,OAAO,EAAE,gBAAgB,EACzB,eAAe,EAAC,KAAK,EACrB,IAAI,EAAC,4BAA4B,EACjC,WAAW,EAAC,+BAA+B,EAC3C,gBAAgB,EAAE,oBAAoB,GACtC,CACH,IACG,GACQ,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts
CHANGED
@@ -74,7 +74,7 @@ export declare class DatabaseSchemaExplorerState {
|
|
74
74
|
private buildIntermediateDatabase;
|
75
75
|
previewData(node: DatabaseSchemaExplorerTreeNodeData): GeneratorFn<void>;
|
76
76
|
generateDatabase(): GeneratorFn<Entity>;
|
77
|
-
updateDatabase(): GeneratorFn<Database>;
|
77
|
+
updateDatabase(forceRename?: boolean): GeneratorFn<Database>;
|
78
78
|
updateDatabaseAndGraph(): GeneratorFn<void>;
|
79
79
|
}
|
80
80
|
//# sourceMappingURL=DatabaseBuilderState.d.ts.map
|
package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DatabaseBuilderState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EACL,KAAK,WAAW,EAQhB,WAAW,EAMZ,MAAM,sBAAsB,CAAC;AAU9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAKL,kBAAkB,EAKlB,KAAK,MAAM,EACX,KAAK,EACL,4BAA4B,EAI5B,MAAM,EACN,QAAQ,EAgBT,MAAM,qBAAqB,CAAC;AAmK7B,8BAAsB,kCACpB,YAAW,YAAY;IAEvB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACnC,SAAS,UAAS;gBAEN,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS;IAWnE,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;CAG/B;AAED,qBAAa,wCAAyC,SAAQ,kCAAkC;IAC9F,MAAM,EAAE,MAAM,CAAC;gBAEH,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAIvC;AAED,qBAAa,uCAAwC,SAAQ,kCAAkC;IACpF,QAAQ,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,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AAE,kCAAkC,EACxC,QAAQ,EAAE,wBAAwB,GACjC,WAAW,CAAC,IAAI,CAAC;IAgBpB,aAAa,CACX,IAAI,EAAE,kCAAkC,EACxC,QAAQ,EAAE,wBAAwB,GACjC,kCAAkC,EAAE,GAAG,SAAS;IAMnD,iBAAiB,CACf,IAAI,EAAE,kCAAkC,EACxC,QAAQ,EAAE,wBAAwB,GACjC,IAAI;IAwBN,qBAAqB,IAAI,WAAW,CAAC,IAAI,CAAC;IAsD1C,mBAAmB,CAClB,UAAU,EAAE,wCAAwC,EACpD,QAAQ,EAAE,wBAAwB,GACjC,WAAW,CAAC,IAAI,CAAC;IA6DnB,kBAAkB,CACjB,SAAS,EAAE,uCAAuC,EAClD,QAAQ,EAAE,wBAAwB,GACjC,WAAW,CAAC,IAAI,CAAC;YA+DN,yBAAyB;IAoBtC,WAAW,CAAC,IAAI,EAAE,kCAAkC,GAAG,WAAW,CAAC,IAAI,CAAC;IA2GxE,gBAAgB,IAAI,WAAW,CAAC,MAAM,CAAC;IA2DvC,cAAc,
|
1
|
+
{"version":3,"file":"DatabaseBuilderState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EACL,KAAK,WAAW,EAQhB,WAAW,EAMZ,MAAM,sBAAsB,CAAC;AAU9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAKL,kBAAkB,EAKlB,KAAK,MAAM,EACX,KAAK,EACL,4BAA4B,EAI5B,MAAM,EACN,QAAQ,EAgBT,MAAM,qBAAqB,CAAC;AAmK7B,8BAAsB,kCACpB,YAAW,YAAY;IAEvB,MAAM,CAAC,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AAC,EAAE,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC;IA6D5D,sBAAsB,IAAI,WAAW,CAAC,IAAI,CAAC;CAkD7C"}
|
package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js
CHANGED
@@ -542,7 +542,7 @@ export class DatabaseSchemaExplorerState {
|
|
542
542
|
}
|
543
543
|
}
|
544
544
|
// this method just updates database
|
545
|
-
*updateDatabase() {
|
545
|
+
*updateDatabase(forceRename) {
|
546
546
|
this.isUpdatingDatabase = true;
|
547
547
|
const graph = this.editorStore.graphManagerState.createNewGraph();
|
548
548
|
(yield this.editorStore.graphManagerState.graphManager.buildGraph(graph, [(yield flowResult(this.generateDatabase()))], ActionState.create()));
|
@@ -557,8 +557,11 @@ export class DatabaseSchemaExplorerState {
|
|
557
557
|
})
|
558
558
|
.filter(isNonNullable);
|
559
559
|
// update this.database packge and name
|
560
|
-
this.database.
|
561
|
-
|
560
|
+
if (forceRename || this.database.name === '' || !this.database.package) {
|
561
|
+
this.database.package = getOrCreateGraphPackage(graph, extractPackagePathFromPath(this.targetDatabasePath), undefined);
|
562
|
+
this.database.name = extractElementNameFromPath(this.targetDatabasePath);
|
563
|
+
}
|
564
|
+
// update schemas
|
562
565
|
this.database.schemas = this.database.schemas.filter((schema) => {
|
563
566
|
if (schemas.find((item) => item.name === schema.name) &&
|
564
567
|
!database.schemas.find((s) => s.name === schema.name)) {
|
package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DatabaseBuilderState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAGL,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,oBA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AAa,CAAC;YACvE,IAAI,cAAc,EAAE;gBAClB,mBAAmB,CACjB,IAAI,CAAC,UAAU,EACf,mCAAmC,CAAC,MAAM,CAAC,QAAQ,CAAC,CACrD,CAAC;gBACF,MAAM,WAAW,GAAG,oBAAoB,CACtC,QAAQ,CAAC,OAAO,EAAE,IAAI,EACtB,6BAA6B,CAC9B,CAAC;gBACF,MAAM,UAAU,CACd,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,UAAU,CACzC,QAAQ,EACR,WAAW,EACX,KAAK,CACN,CACF,CAAC;aACH;YACD,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,aAAa,CACjE,+BAA+B,CAChC,CAAC;YACF,MAAM,UAAU,CACd,IAAI,CAAC,WAAW;iBACb,kBAAkB,CAAC,sBAAsB,CAAC;iBAC1C,aAAa,CAAC;gBACb,OAAO,EAAE,0EAA0E;aACpF,CAAC,CACL,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,CAChD,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,wBAAwB,CAAC,EACjE,KAAK,CACN,CAAC;YACF,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC1E;gBAAS;YACR,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;SACjC;IACH,CAAC;CACF"}
|
1
|
+
{"version":3,"file":"DatabaseBuilderState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAGL,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aA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CAC1D,IAAI,CAAC,QAAQ,CACd,CAAC;YACJ,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;YAC/B,MAAM,QAAQ,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAa,CAAC;YACvE,IAAI,cAAc,EAAE;gBAClB,mBAAmB,CACjB,IAAI,CAAC,UAAU,EACf,mCAAmC,CAAC,MAAM,CAAC,QAAQ,CAAC,CACrD,CAAC;gBACF,MAAM,WAAW,GAAG,oBAAoB,CACtC,QAAQ,CAAC,OAAO,EAAE,IAAI,EACtB,6BAA6B,CAC9B,CAAC;gBACF,MAAM,UAAU,CACd,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,UAAU,CACzC,QAAQ,EACR,WAAW,EACX,KAAK,CACN,CACF,CAAC;aACH;YACD,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,aAAa,CACjE,+BAA+B,CAChC,CAAC;YACF,MAAM,UAAU,CACd,IAAI,CAAC,WAAW;iBACb,kBAAkB,CAAC,sBAAsB,CAAC;iBAC1C,aAAa,CAAC;gBACb,OAAO,EAAE,0EAA0E;aACpF,CAAC,CACL,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,CAChD,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,wBAAwB,CAAC,EACjE,KAAK,CACN,CAAC;YACF,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC1E;gBAAS;YACR,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;SACjC;IACH,CAAC;CACF"}
|
@@ -13,16 +13,20 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { type GeneratorFn } from '@finos/legend-shared';
|
16
|
+
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
17
17
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
18
18
|
import { type Database, type PackageableConnection } from '@finos/legend-graph';
|
19
19
|
import type { EditorStore } from '../EditorStore.js';
|
20
20
|
import type { CommandRegistrar } from '@finos/legend-application';
|
21
21
|
import { DatabaseSchemaExplorerState } from '../editor-state/element-editor-state/connection/DatabaseBuilderState.js';
|
22
|
+
export interface SQL_ExecutionResult {
|
23
|
+
value: string;
|
24
|
+
sqlDuration: number;
|
25
|
+
}
|
22
26
|
export declare class SQLPlaygroundPanelState implements CommandRegistrar {
|
23
27
|
readonly editorStore: EditorStore;
|
24
|
-
isFetchingSchema:
|
25
|
-
|
28
|
+
isFetchingSchema: ActionState;
|
29
|
+
executeRawSQLState: ActionState;
|
26
30
|
connection?: PackageableConnection | undefined;
|
27
31
|
database?: Database | undefined;
|
28
32
|
schemaExplorerState?: DatabaseSchemaExplorerState | undefined;
|
@@ -30,17 +34,17 @@ export declare class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
30
34
|
sqlEditor?: monacoEditorAPI.IStandaloneCodeEditor | undefined;
|
31
35
|
sqlEditorViewState?: monacoEditorAPI.ICodeEditorViewState | undefined;
|
32
36
|
sqlText: string;
|
33
|
-
sqlExecutionResult?:
|
34
|
-
|
35
|
-
isUpdatingDatabase: boolean;
|
37
|
+
sqlExecutionResult?: SQL_ExecutionResult | undefined;
|
38
|
+
isLocalModeEnabled: boolean;
|
36
39
|
constructor(editorStore: EditorStore);
|
37
40
|
setConnection(val: PackageableConnection | undefined): void;
|
38
41
|
setSQLText(val: string): void;
|
39
42
|
setSQLEditor(val: monacoEditorAPI.IStandaloneCodeEditor | undefined): void;
|
40
|
-
|
43
|
+
stopExecuteSQL(): void;
|
41
44
|
setSQLEditorViewState(val: monacoEditorAPI.ICodeEditorViewState | undefined): void;
|
42
45
|
registerCommands(): void;
|
43
46
|
deregisterCommands(): void;
|
47
|
+
toggleIsLocalModeEnabled(): void;
|
44
48
|
executeRawSQL(): GeneratorFn<void>;
|
45
49
|
}
|
46
50
|
//# sourceMappingURL=SQLPlaygroundPanelState.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SQLPlaygroundPanelState.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/panel-group/SQLPlaygroundPanelState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,
|
1
|
+
{"version":3,"file":"SQLPlaygroundPanelState.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/panel-group/SQLPlaygroundPanelState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,EAIhB,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,qBAAqB,EAG3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yEAAyE,CAAC;AAItH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,uBAAwB,YAAW,gBAAgB;IAC9D,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAElC,gBAAgB,cAAwB;IACxC,kBAAkB,cAAwB;IAE1C,UAAU,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,mBAAmB,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IAE9D,QAAQ,CAAC,kBAAkB,EAAE,eAAe,CAAC,UAAU,CAAC;IACxD,SAAS,CAAC,EAAE,eAAe,CAAC,qBAAqB,GAAG,SAAS,CAAC;IAC9D,kBAAkB,CAAC,EAAE,eAAe,CAAC,oBAAoB,GAAG,SAAS,CAAC;IACtE,OAAO,SAAoB;IAC3B,kBAAkB,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAErD,kBAAkB,UAAS;gBAEf,WAAW,EAAE,WAAW;IA4BpC,aAAa,CAAC,GAAG,EAAE,qBAAqB,GAAG,SAAS,GAAG,IAAI;IAgB3D,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,YAAY,CAAC,GAAG,EAAE,eAAe,CAAC,qBAAqB,GAAG,SAAS,GAAG,IAAI;IAW1E,cAAc,IAAI,IAAI;IAItB,qBAAqB,CACnB,GAAG,EAAE,eAAe,CAAC,oBAAoB,GAAG,SAAS,GACpD,IAAI;IAIP,gBAAgB,IAAI,IAAI;IAgBxB,kBAAkB,IAAI,IAAI;IAO1B,wBAAwB,IAAI,IAAI;IAK/B,aAAa,IAAI,WAAW,CAAC,IAAI,CAAC;CAsCpC"}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { assertErrorThrown, LogEvent, getNullableLastEntry, } from '@finos/legend-shared';
|
16
|
+
import { assertErrorThrown, LogEvent, getNullableLastEntry, ActionState, } from '@finos/legend-shared';
|
17
17
|
import { observable, makeObservable, flow, flowResult, action } from 'mobx';
|
18
18
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
19
19
|
import { guaranteeRelationalDatabaseConnection, GRAPH_MANAGER_EVENT, } from '@finos/legend-graph';
|
@@ -24,8 +24,8 @@ import { DatabaseSchemaExplorerState } from '../editor-state/element-editor-stat
|
|
24
24
|
const DEFAULT_SQL_TEXT = `--Start building your SQL. Note that you can also drag-and-drop nodes from schema explorer\n`;
|
25
25
|
export class SQLPlaygroundPanelState {
|
26
26
|
editorStore;
|
27
|
-
isFetchingSchema =
|
28
|
-
|
27
|
+
isFetchingSchema = ActionState.create();
|
28
|
+
executeRawSQLState = ActionState.create();
|
29
29
|
connection;
|
30
30
|
database;
|
31
31
|
schemaExplorerState;
|
@@ -34,20 +34,21 @@ export class SQLPlaygroundPanelState {
|
|
34
34
|
sqlEditorViewState;
|
35
35
|
sqlText = DEFAULT_SQL_TEXT;
|
36
36
|
sqlExecutionResult;
|
37
|
-
|
38
|
-
isUpdatingDatabase = false;
|
37
|
+
isLocalModeEnabled = false;
|
39
38
|
constructor(editorStore) {
|
40
39
|
makeObservable(this, {
|
41
40
|
isFetchingSchema: observable,
|
42
|
-
|
41
|
+
executeRawSQLState: observable,
|
43
42
|
connection: observable,
|
44
43
|
database: observable,
|
45
44
|
schemaExplorerState: observable,
|
46
45
|
sqlText: observable,
|
47
|
-
|
46
|
+
isLocalModeEnabled: observable,
|
48
47
|
sqlExecutionResult: observable,
|
49
48
|
sqlEditor: observable.ref,
|
50
49
|
sqlEditorViewState: observable.ref,
|
50
|
+
stopExecuteSQL: action,
|
51
|
+
toggleIsLocalModeEnabled: action,
|
51
52
|
setConnection: action,
|
52
53
|
setSQLEditor: action,
|
53
54
|
setSQLEditorViewState: action,
|
@@ -83,9 +84,7 @@ export class SQLPlaygroundPanelState {
|
|
83
84
|
});
|
84
85
|
}
|
85
86
|
}
|
86
|
-
|
87
|
-
this.setSQLText(DEFAULT_SQL_TEXT);
|
88
|
-
this.sqlEditorTextModel.setValue(DEFAULT_SQL_TEXT);
|
87
|
+
stopExecuteSQL() {
|
89
88
|
this.sqlExecutionResult = undefined;
|
90
89
|
}
|
91
90
|
setSQLEditorViewState(val) {
|
@@ -106,12 +105,16 @@ export class SQLPlaygroundPanelState {
|
|
106
105
|
deregisterCommands() {
|
107
106
|
[STO_RELATIONAL_LEGEND_STUDIO_COMMAND_KEY.SQL_PLAYGROUND_EXECUTE].forEach((key) => this.editorStore.applicationStore.commandService.deregisterCommand(key));
|
108
107
|
}
|
108
|
+
toggleIsLocalModeEnabled() {
|
109
|
+
this.isLocalModeEnabled = !this.isLocalModeEnabled;
|
110
|
+
this.sqlExecutionResult = undefined;
|
111
|
+
}
|
109
112
|
*executeRawSQL() {
|
110
|
-
if (!this.connection || this.
|
113
|
+
if (!this.connection || this.executeRawSQLState.isInProgress) {
|
111
114
|
return;
|
112
115
|
}
|
113
116
|
try {
|
114
|
-
this.
|
117
|
+
this.executeRawSQLState.inProgress();
|
115
118
|
let sql = this.sqlText;
|
116
119
|
const currentSelection = this.sqlEditor?.getSelection();
|
117
120
|
if (currentSelection) {
|
@@ -120,8 +123,12 @@ export class SQLPlaygroundPanelState {
|
|
120
123
|
sql = selectionValue;
|
121
124
|
}
|
122
125
|
}
|
123
|
-
|
124
|
-
|
126
|
+
const start = Date.now();
|
127
|
+
const value = (yield this.editorStore.graphManagerState.graphManager.executeRawSQL(guaranteeRelationalDatabaseConnection(this.connection), sql));
|
128
|
+
this.sqlExecutionResult = {
|
129
|
+
value: value,
|
130
|
+
sqlDuration: Date.now() - start,
|
131
|
+
};
|
125
132
|
}
|
126
133
|
catch (error) {
|
127
134
|
assertErrorThrown(error);
|
@@ -129,7 +136,7 @@ export class SQLPlaygroundPanelState {
|
|
129
136
|
this.editorStore.applicationStore.notificationService.notifyError(error);
|
130
137
|
}
|
131
138
|
finally {
|
132
|
-
this.
|
139
|
+
this.executeRawSQLState.complete();
|
133
140
|
}
|
134
141
|
}
|
135
142
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SQLPlaygroundPanelState.js","sourceRoot":"","sources":["../../../../src/stores/editor/panel-group/SQLPlaygroundPanelState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,iBAAiB,EACjB,QAAQ,EACR,oBAAoB,
|
1
|
+
{"version":3,"file":"SQLPlaygroundPanelState.js","sourceRoot":"","sources":["../../../../src/stores/editor/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|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-application-studio",
|
3
|
-
"version": "28.15.
|
3
|
+
"version": "28.15.11",
|
4
4
|
"description": "Legend Studio application core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -45,11 +45,11 @@
|
|
45
45
|
"test:watch": "jest --watch"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"@finos/legend-application": "15.0.
|
49
|
-
"@finos/legend-art": "7.1.
|
50
|
-
"@finos/legend-graph": "31.8.
|
51
|
-
"@finos/legend-lego": "1.2.
|
52
|
-
"@finos/legend-query-builder": "4.14.
|
48
|
+
"@finos/legend-application": "15.0.70",
|
49
|
+
"@finos/legend-art": "7.1.22",
|
50
|
+
"@finos/legend-graph": "31.8.6",
|
51
|
+
"@finos/legend-lego": "1.2.11",
|
52
|
+
"@finos/legend-query-builder": "4.14.11",
|
53
53
|
"@finos/legend-server-depot": "6.0.36",
|
54
54
|
"@finos/legend-server-sdlc": "5.3.8",
|
55
55
|
"@finos/legend-server-showcase": "0.2.5",
|
@@ -29,9 +29,11 @@ import {
|
|
29
29
|
PlayIcon,
|
30
30
|
PanelLoadingIndicator,
|
31
31
|
BlankPanelContent,
|
32
|
-
TrashIcon,
|
33
32
|
PURE_DatabaseIcon,
|
34
33
|
SyncIcon,
|
34
|
+
clsx,
|
35
|
+
CheckSquareIcon,
|
36
|
+
SquareIcon,
|
35
37
|
} from '@finos/legend-art';
|
36
38
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
37
39
|
import {
|
@@ -64,14 +66,23 @@ import {
|
|
64
66
|
CORE_DND_TYPE,
|
65
67
|
type ElementDragSource,
|
66
68
|
} from '../../../stores/editor/utils/DnDUtils.js';
|
67
|
-
import {
|
69
|
+
import {
|
70
|
+
DataGrid,
|
71
|
+
type DataGridCellRendererParams,
|
72
|
+
type DataGridColumnDefinition,
|
73
|
+
type DataGridGetContextMenuItemsParams,
|
74
|
+
type DataGridMenuItemDef,
|
75
|
+
} from '@finos/legend-lego/data-grid';
|
68
76
|
import {
|
69
77
|
getNonNullableEntry,
|
70
78
|
getNullableEntry,
|
71
79
|
getNullableLastEntry,
|
72
80
|
isNonNullable,
|
81
|
+
isNumber,
|
73
82
|
isString,
|
83
|
+
isValidURL,
|
74
84
|
parseCSVString,
|
85
|
+
prettyDuration,
|
75
86
|
uniqBy,
|
76
87
|
} from '@finos/legend-shared';
|
77
88
|
import {
|
@@ -203,15 +214,6 @@ const PlaygroundSQLCodeEditor = observer(() => {
|
|
203
214
|
IDisposable | undefined
|
204
215
|
>(undefined);
|
205
216
|
|
206
|
-
const executeRawSQL = (): void => {
|
207
|
-
flowResult(playgroundState.executeRawSQL()).catch(
|
208
|
-
applicationStore.alertUnhandledError,
|
209
|
-
);
|
210
|
-
};
|
211
|
-
const reset = (): void => {
|
212
|
-
playgroundState.resetSQL();
|
213
|
-
};
|
214
|
-
|
215
217
|
useEffect(() => {
|
216
218
|
if (!editor && codeEditorRef.current) {
|
217
219
|
const element = codeEditorRef.current;
|
@@ -340,28 +342,6 @@ const PlaygroundSQLCodeEditor = observer(() => {
|
|
340
342
|
|
341
343
|
return (
|
342
344
|
<div className="sql-playground__code-editor">
|
343
|
-
<PanelLoadingIndicator isLoading={playgroundState.isExecutingRawSQL} />
|
344
|
-
<div className="sql-playground__code-editor__header">
|
345
|
-
<div className="sql-playground__code-editor__header__actions">
|
346
|
-
<button
|
347
|
-
className="sql-playground__code-editor__header__action"
|
348
|
-
tabIndex={-1}
|
349
|
-
onClick={executeRawSQL}
|
350
|
-
disabled={playgroundState.isExecutingRawSQL}
|
351
|
-
title="Execute (Ctrl + Enter)"
|
352
|
-
>
|
353
|
-
<PlayIcon />
|
354
|
-
</button>
|
355
|
-
<button
|
356
|
-
className="sql-playground__code-editor__header__action"
|
357
|
-
tabIndex={-1}
|
358
|
-
onClick={reset}
|
359
|
-
title="Reset"
|
360
|
-
>
|
361
|
-
<TrashIcon />
|
362
|
-
</button>
|
363
|
-
</div>
|
364
|
-
</div>
|
365
345
|
<PanelDropZone
|
366
346
|
className="sql-playground__code-editor__content"
|
367
347
|
isDragOver={isDatabaseNodeDragOver}
|
@@ -400,9 +380,39 @@ const parseExecutionResultData = (
|
|
400
380
|
return undefined;
|
401
381
|
};
|
402
382
|
|
383
|
+
const TDSResultCellRenderer = observer((params: DataGridCellRendererParams) => {
|
384
|
+
const cellValue = params.value as string;
|
385
|
+
const formattedCellValue = (): string => {
|
386
|
+
if (isNumber(cellValue)) {
|
387
|
+
return Intl.NumberFormat('en-US', {
|
388
|
+
maximumFractionDigits: 4,
|
389
|
+
}).format(Number(cellValue));
|
390
|
+
}
|
391
|
+
return cellValue;
|
392
|
+
};
|
393
|
+
const cellValueUrlLink =
|
394
|
+
isString(cellValue) && isValidURL(cellValue) ? cellValue : undefined;
|
395
|
+
|
396
|
+
return (
|
397
|
+
<div className={clsx('query-builder__result__values__table__cell')}>
|
398
|
+
{cellValueUrlLink ? (
|
399
|
+
<a href={cellValueUrlLink} target="_blank" rel="noreferrer">
|
400
|
+
{cellValueUrlLink}
|
401
|
+
</a>
|
402
|
+
) : (
|
403
|
+
<span>{formattedCellValue()}</span>
|
404
|
+
)}
|
405
|
+
</div>
|
406
|
+
);
|
407
|
+
});
|
408
|
+
|
403
409
|
const PlayGroundSQLExecutionResultGrid = observer(
|
404
|
-
(props: {
|
405
|
-
|
410
|
+
(props: {
|
411
|
+
result: string;
|
412
|
+
useAdvancedGrid?: boolean;
|
413
|
+
useLocalMode?: boolean;
|
414
|
+
}) => {
|
415
|
+
const { result, useAdvancedGrid, useLocalMode } = props;
|
406
416
|
const data = parseExecutionResultData(result);
|
407
417
|
|
408
418
|
if (!data) {
|
@@ -410,6 +420,99 @@ const PlayGroundSQLExecutionResultGrid = observer(
|
|
410
420
|
<BlankPanelContent>{`Can't parse result, displaying raw form:\n${result}`}</BlankPanelContent>
|
411
421
|
);
|
412
422
|
}
|
423
|
+
if (useAdvancedGrid) {
|
424
|
+
if (useLocalMode) {
|
425
|
+
const localcolDefs = data.columns.map(
|
426
|
+
(colName) =>
|
427
|
+
({
|
428
|
+
minWidth: 50,
|
429
|
+
sortable: true,
|
430
|
+
resizable: true,
|
431
|
+
field: colName,
|
432
|
+
flex: 1,
|
433
|
+
enablePivot: true,
|
434
|
+
enableRowGroup: true,
|
435
|
+
enableValue: true,
|
436
|
+
allowedAggFuncs: ['count'],
|
437
|
+
}) as DataGridColumnDefinition,
|
438
|
+
);
|
439
|
+
|
440
|
+
return (
|
441
|
+
<DataGrid
|
442
|
+
rowData={data.rowData}
|
443
|
+
gridOptions={{
|
444
|
+
suppressScrollOnNewData: true,
|
445
|
+
rowSelection: 'multiple',
|
446
|
+
pivotPanelShow: 'always',
|
447
|
+
rowGroupPanelShow: 'always',
|
448
|
+
enableRangeSelection: true,
|
449
|
+
}}
|
450
|
+
// NOTE: when column definition changed, we need to force refresh the cell to make sure the cell renderer is updated
|
451
|
+
// See https://stackoverflow.com/questions/56341073/how-to-refresh-an-ag-grid-when-a-change-occurs-inside-a-custom-cell-renderer-com
|
452
|
+
onRowDataUpdated={(params) => {
|
453
|
+
params.api.refreshCells({ force: true });
|
454
|
+
}}
|
455
|
+
suppressFieldDotNotation={true}
|
456
|
+
suppressContextMenu={false}
|
457
|
+
columnDefs={localcolDefs}
|
458
|
+
sideBar={['columns', 'filters']}
|
459
|
+
/>
|
460
|
+
);
|
461
|
+
}
|
462
|
+
const colDefs = data.columns.map(
|
463
|
+
(colName) =>
|
464
|
+
({
|
465
|
+
minWidth: 50,
|
466
|
+
sortable: true,
|
467
|
+
resizable: true,
|
468
|
+
field: colName,
|
469
|
+
flex: 1,
|
470
|
+
cellRenderer: TDSResultCellRenderer,
|
471
|
+
filter: true,
|
472
|
+
}) as DataGridColumnDefinition,
|
473
|
+
);
|
474
|
+
const getContextMenuItems = useCallback(
|
475
|
+
(
|
476
|
+
params: DataGridGetContextMenuItemsParams<{
|
477
|
+
[key: string]: string;
|
478
|
+
}>,
|
479
|
+
): (string | DataGridMenuItemDef)[] => [
|
480
|
+
'copy',
|
481
|
+
'copyWithHeaders',
|
482
|
+
{
|
483
|
+
name: 'Copy Row Value',
|
484
|
+
action: () => {
|
485
|
+
params.api.copySelectedRowsToClipboard();
|
486
|
+
},
|
487
|
+
},
|
488
|
+
],
|
489
|
+
[],
|
490
|
+
);
|
491
|
+
return (
|
492
|
+
<div className="sql-playground__result__grid ag-theme-balham-dark">
|
493
|
+
<DataGrid
|
494
|
+
rowData={data.rowData}
|
495
|
+
overlayNoRowsTemplate={`<div class="sql-playground__result__grid--empty">No results</div>`}
|
496
|
+
gridOptions={{
|
497
|
+
suppressScrollOnNewData: true,
|
498
|
+
rowSelection: 'multiple',
|
499
|
+
enableRangeSelection: true,
|
500
|
+
}}
|
501
|
+
onRowDataUpdated={(params) => {
|
502
|
+
params.api.refreshCells({ force: true });
|
503
|
+
}}
|
504
|
+
suppressFieldDotNotation={true}
|
505
|
+
suppressClipboardPaste={false}
|
506
|
+
suppressContextMenu={false}
|
507
|
+
columnDefs={colDefs}
|
508
|
+
getContextMenuItems={(params): (string | DataGridMenuItemDef)[] =>
|
509
|
+
getContextMenuItems(params)
|
510
|
+
}
|
511
|
+
/>
|
512
|
+
</div>
|
513
|
+
);
|
514
|
+
}
|
515
|
+
|
413
516
|
return (
|
414
517
|
<div className="sql-playground__result__grid ag-theme-balham-dark">
|
415
518
|
<DataGrid
|
@@ -512,6 +615,26 @@ export const SQLPlaygroundPanel = observer(() => {
|
|
512
615
|
}
|
513
616
|
};
|
514
617
|
|
618
|
+
const executeRawSQL = (): void => {
|
619
|
+
flowResult(playgroundState.executeRawSQL()).catch(
|
620
|
+
applicationStore.alertUnhandledError,
|
621
|
+
);
|
622
|
+
};
|
623
|
+
const advancedMode = Boolean(
|
624
|
+
editorStore.applicationStore.config.options.queryBuilderConfig
|
625
|
+
?.TEMPORARY__enableGridEnterpriseMode,
|
626
|
+
);
|
627
|
+
const resultDescription = playgroundState.sqlExecutionResult
|
628
|
+
? `query ran in ${prettyDuration(
|
629
|
+
playgroundState.sqlExecutionResult.sqlDuration,
|
630
|
+
{
|
631
|
+
ms: true,
|
632
|
+
},
|
633
|
+
)}`
|
634
|
+
: undefined;
|
635
|
+
const toggleocalMode = (): void => {
|
636
|
+
playgroundState.toggleIsLocalModeEnabled();
|
637
|
+
};
|
515
638
|
useEffect(() => {
|
516
639
|
if (playgroundState.schemaExplorerState) {
|
517
640
|
flowResult(
|
@@ -524,7 +647,6 @@ export const SQLPlaygroundPanel = observer(() => {
|
|
524
647
|
LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY.SQL_PLAYGROUND,
|
525
648
|
editorStore.activePanelMode === PANEL_MODE.SQL_PLAYGROUND,
|
526
649
|
);
|
527
|
-
|
528
650
|
return (
|
529
651
|
<PanelDropZone
|
530
652
|
isDragOver={isConnectionDragOver}
|
@@ -567,11 +689,7 @@ export const SQLPlaygroundPanel = observer(() => {
|
|
567
689
|
/>
|
568
690
|
<button
|
569
691
|
className="sql-playground__config__database-selector__update-btn btn--sm btn--dark"
|
570
|
-
disabled={
|
571
|
-
!playgroundState.database ||
|
572
|
-
playgroundState.isBuildingDatabase ||
|
573
|
-
playgroundState.isUpdatingDatabase
|
574
|
-
}
|
692
|
+
disabled={!playgroundState.database}
|
575
693
|
onClick={updateDatabase}
|
576
694
|
title="Update database"
|
577
695
|
>
|
@@ -580,6 +698,11 @@ export const SQLPlaygroundPanel = observer(() => {
|
|
580
698
|
</div>
|
581
699
|
</div>
|
582
700
|
<div className="sql-playground__config__schema-explorer">
|
701
|
+
<PanelLoadingIndicator
|
702
|
+
isLoading={Boolean(
|
703
|
+
playgroundState.schemaExplorerState?.isGeneratingDatabase,
|
704
|
+
)}
|
705
|
+
/>
|
583
706
|
{playgroundState.schemaExplorerState?.treeData && (
|
584
707
|
<DatabaseSchemaExplorer
|
585
708
|
treeData={playgroundState.schemaExplorerState.treeData}
|
@@ -603,9 +726,70 @@ export const SQLPlaygroundPanel = observer(() => {
|
|
603
726
|
<ResizablePanelSplitterLine color="var(--color-dark-grey-250)" />
|
604
727
|
</ResizablePanelSplitter>
|
605
728
|
<ResizablePanel size={300}>
|
729
|
+
<div className="panel__header">
|
730
|
+
<div className="panel__header__title">
|
731
|
+
<div className="panel__header__title__label">
|
732
|
+
result
|
733
|
+
</div>
|
734
|
+
|
735
|
+
{playgroundState.executeRawSQLState.isInProgress && (
|
736
|
+
<div className="panel__header__title__label__status">
|
737
|
+
Running SQL...
|
738
|
+
</div>
|
739
|
+
)}
|
740
|
+
|
741
|
+
<div className="query-builder__result__analytics">
|
742
|
+
{resultDescription ?? ''}
|
743
|
+
</div>
|
744
|
+
</div>
|
745
|
+
<div className="panel__header__actions query-builder__result__header__actions">
|
746
|
+
{advancedMode && (
|
747
|
+
<div className="query-builder__result__advanced__mode">
|
748
|
+
<div className="query-builder__result__advanced__mode__label">
|
749
|
+
Local Mode
|
750
|
+
</div>
|
751
|
+
<button
|
752
|
+
className={clsx(
|
753
|
+
'query-builder__result__advanced__mode__toggler__btn',
|
754
|
+
{
|
755
|
+
'query-builder__result__advanced__mode__toggler__btn--toggled':
|
756
|
+
playgroundState.isLocalModeEnabled,
|
757
|
+
},
|
758
|
+
)}
|
759
|
+
onClick={toggleocalMode}
|
760
|
+
tabIndex={-1}
|
761
|
+
>
|
762
|
+
{playgroundState.isLocalModeEnabled ? (
|
763
|
+
<CheckSquareIcon />
|
764
|
+
) : (
|
765
|
+
<SquareIcon />
|
766
|
+
)}
|
767
|
+
</button>
|
768
|
+
</div>
|
769
|
+
)}
|
770
|
+
|
771
|
+
<div className="query-builder__result__execute-btn btn__dropdown-combo btn__dropdown-combo--primary">
|
772
|
+
<button
|
773
|
+
className="btn__dropdown-combo__label"
|
774
|
+
onClick={executeRawSQL}
|
775
|
+
disabled={
|
776
|
+
playgroundState.executeRawSQLState.isInProgress
|
777
|
+
}
|
778
|
+
tabIndex={-1}
|
779
|
+
>
|
780
|
+
<PlayIcon className="btn__dropdown-combo__label__icon" />
|
781
|
+
<div className="btn__dropdown-combo__label__title">
|
782
|
+
Run Query
|
783
|
+
</div>
|
784
|
+
</button>
|
785
|
+
</div>
|
786
|
+
</div>
|
787
|
+
</div>
|
606
788
|
{playgroundState.sqlExecutionResult !== undefined && (
|
607
789
|
<PlayGroundSQLExecutionResultGrid
|
608
|
-
result={playgroundState.sqlExecutionResult}
|
790
|
+
result={playgroundState.sqlExecutionResult.value}
|
791
|
+
useAdvancedGrid={advancedMode}
|
792
|
+
useLocalMode={playgroundState.isLocalModeEnabled}
|
609
793
|
/>
|
610
794
|
)}
|
611
795
|
{playgroundState.sqlExecutionResult === undefined && (
|
package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts
CHANGED
@@ -812,7 +812,7 @@ export class DatabaseSchemaExplorerState {
|
|
812
812
|
}
|
813
813
|
|
814
814
|
// this method just updates database
|
815
|
-
*updateDatabase(): GeneratorFn<Database> {
|
815
|
+
*updateDatabase(forceRename?: boolean): GeneratorFn<Database> {
|
816
816
|
this.isUpdatingDatabase = true;
|
817
817
|
const graph = this.editorStore.graphManagerState.createNewGraph();
|
818
818
|
(yield this.editorStore.graphManagerState.graphManager.buildGraph(
|
@@ -838,12 +838,15 @@ export class DatabaseSchemaExplorerState {
|
|
838
838
|
.filter(isNonNullable);
|
839
839
|
|
840
840
|
// update this.database packge and name
|
841
|
-
this.database.package
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
841
|
+
if (forceRename || this.database.name === '' || !this.database.package) {
|
842
|
+
this.database.package = getOrCreateGraphPackage(
|
843
|
+
graph,
|
844
|
+
extractPackagePathFromPath(this.targetDatabasePath),
|
845
|
+
undefined,
|
846
|
+
);
|
847
|
+
this.database.name = extractElementNameFromPath(this.targetDatabasePath);
|
848
|
+
}
|
849
|
+
// update schemas
|
847
850
|
this.database.schemas = this.database.schemas.filter((schema) => {
|
848
851
|
if (
|
849
852
|
schemas.find((item) => item.name === schema.name) &&
|
@@ -19,6 +19,7 @@ import {
|
|
19
19
|
assertErrorThrown,
|
20
20
|
LogEvent,
|
21
21
|
getNullableLastEntry,
|
22
|
+
ActionState,
|
22
23
|
} from '@finos/legend-shared';
|
23
24
|
import { observable, makeObservable, flow, flowResult, action } from 'mobx';
|
24
25
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
@@ -40,11 +41,16 @@ import { DatabaseSchemaExplorerState } from '../editor-state/element-editor-stat
|
|
40
41
|
|
41
42
|
const DEFAULT_SQL_TEXT = `--Start building your SQL. Note that you can also drag-and-drop nodes from schema explorer\n`;
|
42
43
|
|
44
|
+
export interface SQL_ExecutionResult {
|
45
|
+
value: string;
|
46
|
+
sqlDuration: number;
|
47
|
+
}
|
48
|
+
|
43
49
|
export class SQLPlaygroundPanelState implements CommandRegistrar {
|
44
50
|
readonly editorStore: EditorStore;
|
45
51
|
|
46
|
-
isFetchingSchema =
|
47
|
-
|
52
|
+
isFetchingSchema = ActionState.create();
|
53
|
+
executeRawSQLState = ActionState.create();
|
48
54
|
|
49
55
|
connection?: PackageableConnection | undefined;
|
50
56
|
database?: Database | undefined;
|
@@ -54,23 +60,24 @@ export class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
54
60
|
sqlEditor?: monacoEditorAPI.IStandaloneCodeEditor | undefined;
|
55
61
|
sqlEditorViewState?: monacoEditorAPI.ICodeEditorViewState | undefined;
|
56
62
|
sqlText = DEFAULT_SQL_TEXT;
|
57
|
-
sqlExecutionResult?:
|
63
|
+
sqlExecutionResult?: SQL_ExecutionResult | undefined;
|
58
64
|
|
59
|
-
|
60
|
-
isUpdatingDatabase = false;
|
65
|
+
isLocalModeEnabled = false;
|
61
66
|
|
62
67
|
constructor(editorStore: EditorStore) {
|
63
68
|
makeObservable(this, {
|
64
69
|
isFetchingSchema: observable,
|
65
|
-
|
70
|
+
executeRawSQLState: observable,
|
66
71
|
connection: observable,
|
67
72
|
database: observable,
|
68
73
|
schemaExplorerState: observable,
|
69
74
|
sqlText: observable,
|
70
|
-
|
75
|
+
isLocalModeEnabled: observable,
|
71
76
|
sqlExecutionResult: observable,
|
72
77
|
sqlEditor: observable.ref,
|
73
78
|
sqlEditorViewState: observable.ref,
|
79
|
+
stopExecuteSQL: action,
|
80
|
+
toggleIsLocalModeEnabled: action,
|
74
81
|
setConnection: action,
|
75
82
|
setSQLEditor: action,
|
76
83
|
setSQLEditorViewState: action,
|
@@ -116,9 +123,7 @@ export class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
116
123
|
}
|
117
124
|
}
|
118
125
|
|
119
|
-
|
120
|
-
this.setSQLText(DEFAULT_SQL_TEXT);
|
121
|
-
this.sqlEditorTextModel.setValue(DEFAULT_SQL_TEXT);
|
126
|
+
stopExecuteSQL(): void {
|
122
127
|
this.sqlExecutionResult = undefined;
|
123
128
|
}
|
124
129
|
|
@@ -151,13 +156,18 @@ export class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
151
156
|
);
|
152
157
|
}
|
153
158
|
|
159
|
+
toggleIsLocalModeEnabled(): void {
|
160
|
+
this.isLocalModeEnabled = !this.isLocalModeEnabled;
|
161
|
+
this.sqlExecutionResult = undefined;
|
162
|
+
}
|
163
|
+
|
154
164
|
*executeRawSQL(): GeneratorFn<void> {
|
155
|
-
if (!this.connection || this.
|
165
|
+
if (!this.connection || this.executeRawSQLState.isInProgress) {
|
156
166
|
return;
|
157
167
|
}
|
158
168
|
|
159
169
|
try {
|
160
|
-
this.
|
170
|
+
this.executeRawSQLState.inProgress();
|
161
171
|
|
162
172
|
let sql = this.sqlText;
|
163
173
|
const currentSelection = this.sqlEditor?.getSelection();
|
@@ -168,12 +178,16 @@ export class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
168
178
|
sql = selectionValue;
|
169
179
|
}
|
170
180
|
}
|
171
|
-
|
172
|
-
|
181
|
+
const start = Date.now();
|
182
|
+
const value =
|
173
183
|
(yield this.editorStore.graphManagerState.graphManager.executeRawSQL(
|
174
184
|
guaranteeRelationalDatabaseConnection(this.connection),
|
175
185
|
sql,
|
176
186
|
)) as string;
|
187
|
+
this.sqlExecutionResult = {
|
188
|
+
value: value,
|
189
|
+
sqlDuration: Date.now() - start,
|
190
|
+
};
|
177
191
|
} catch (error) {
|
178
192
|
assertErrorThrown(error);
|
179
193
|
this.editorStore.applicationStore.logService.error(
|
@@ -182,7 +196,7 @@ export class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
182
196
|
);
|
183
197
|
this.editorStore.applicationStore.notificationService.notifyError(error);
|
184
198
|
} finally {
|
185
|
-
this.
|
199
|
+
this.executeRawSQLState.complete();
|
186
200
|
}
|
187
201
|
}
|
188
202
|
}
|