ydb-embedded-ui 6.4.0 → 6.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/components/AsyncReplicationState/AsyncReplicationState.d.ts +6 -0
- package/dist/components/AsyncReplicationState/AsyncReplicationState.js +20 -0
- package/dist/components/AsyncReplicationState/index.d.ts +1 -0
- package/dist/components/AsyncReplicationState/index.js +1 -0
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +6 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +12 -3
- package/dist/components/Errors/ResponseError/ResponseError.js +3 -0
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.d.ts +1 -2
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +2 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Clusters/Clusters.js +7 -2
- package/dist/containers/Clusters/constants.d.ts +1 -3
- package/dist/containers/Clusters/constants.js +0 -18
- package/dist/containers/PDiskPage/PDiskPage.js +2 -1
- package/dist/containers/PDiskPage/i18n/en.json +2 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Tablet/TabletControls/TabletControls.js +3 -1
- package/dist/containers/Tablet/i18n/en.json +3 -0
- package/dist/containers/Tablet/i18n/index.d.ts +1 -1
- package/dist/containers/Tablet/i18n/index.js +1 -2
- package/dist/containers/Tablets/Tablets.js +2 -1
- package/dist/containers/Tablets/i18n/en.json +2 -1
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +29 -18
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +14 -4
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/en.json +2 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +39 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.js +14 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/en.json +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.js +34 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.scss +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/en.json +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -3
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +20 -6
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -6
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +5 -13
- package/dist/containers/Tenant/Query/Preview/Preview.js +2 -2
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +1 -7
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +18 -19
- package/dist/containers/Tenant/Tenant.js +3 -2
- package/dist/containers/Tenant/utils/schema.js +8 -0
- package/dist/containers/Tenant/utils/schemaActions.js +1 -0
- package/dist/containers/Tenant/utils/schemaControls.js +1 -0
- package/dist/containers/VDiskPage/VDiskPage.js +2 -1
- package/dist/containers/VDiskPage/i18n/en.json +2 -1
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/services/api.d.ts +3 -3
- package/dist/services/settings.d.ts +1 -0
- package/dist/services/settings.js +2 -1
- package/dist/store/configureStore.d.ts +0 -4
- package/dist/store/defaultStore.d.ts +0 -2
- package/dist/store/reducers/authentication/authentication.d.ts +187 -7
- package/dist/store/reducers/authentication/authentication.js +12 -3
- package/dist/store/reducers/authentication/types.d.ts +5 -1
- package/dist/store/reducers/cluster/cluster.js +4 -0
- package/dist/store/reducers/executeQuery.d.ts +4 -63
- package/dist/store/reducers/executeQuery.js +38 -34
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +4 -1
- package/dist/store/reducers/explainQuery/explainQuery.d.ts +9 -0
- package/dist/store/reducers/explainQuery/explainQuery.js +32 -0
- package/dist/store/reducers/explainQuery/types.d.ts +12 -0
- package/dist/store/reducers/explainQuery/utils.d.ts +6 -0
- package/dist/store/reducers/explainQuery/utils.js +40 -0
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -20
- package/dist/store/reducers/host.d.ts +61 -2
- package/dist/store/reducers/index.d.ts +0 -3
- package/dist/store/reducers/index.js +0 -2
- package/dist/store/reducers/node/selectors.d.ts +0 -1
- package/dist/store/reducers/nodesList.d.ts +0 -1
- package/dist/store/reducers/olapStats.js +4 -1
- package/dist/store/reducers/preview.js +4 -1
- package/dist/store/reducers/schema/schema.d.ts +61 -2
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +61 -2
- package/dist/store/reducers/shardsWorkload/shardsWorkload.js +4 -1
- package/dist/store/reducers/tablets.d.ts +0 -1
- package/dist/store/reducers/tabletsFilters.d.ts +61 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +6 -3
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +6 -3
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +6 -3
- package/dist/store/reducers/tenants/selectors.d.ts +0 -9
- package/dist/store/reducers/topic.d.ts +0 -15
- package/dist/store/utils.d.ts +2 -3
- package/dist/store/utils.js +1 -1
- package/dist/types/api/schema/replication.d.ts +74 -0
- package/dist/types/api/schema/replication.js +7 -0
- package/dist/types/api/schema/schema.d.ts +4 -1
- package/dist/types/api/schema/schema.js +1 -0
- package/dist/types/api/whoami.d.ts +6 -0
- package/dist/types/store/executeQuery.d.ts +2 -9
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/dist/utils/monaco/yql/constants.d.ts +2 -0
- package/dist/utils/monaco/yql/constants.js +33 -0
- package/dist/utils/monaco/yql/generateSuggestions.d.ts +1 -0
- package/dist/utils/monaco/yql/generateSuggestions.js +28 -11
- package/dist/utils/monaco/yql/yqlSuggestions.js +6 -1
- package/dist/utils/query.d.ts +5 -3
- package/dist/utils/query.js +27 -4
- package/dist/utils/response.d.ts +4 -0
- package/dist/utils/response.js +9 -0
- package/package.json +3 -3
- package/dist/containers/Tablet/i18n/ru.json +0 -10
- package/dist/store/reducers/explainQuery.d.ts +0 -145
- package/dist/store/reducers/explainQuery.js +0 -94
- package/dist/types/store/explainQuery.d.ts +0 -27
- package/dist/utils/error.d.ts +0 -2
- package/dist/utils/error.js +0 -13
- /package/dist/{types/store/explainQuery.js → store/reducers/explainQuery/types.js} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TENANT_OVERVIEW_TABLES_LIMIT } from '../../../../utils/constants';
|
2
|
-
import { parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
2
|
+
import { isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
3
3
|
import { api } from '../../api';
|
4
4
|
const getQueryText = (path) => {
|
5
5
|
return `
|
@@ -16,13 +16,16 @@ export const topQueriesApi = api.injectEndpoints({
|
|
16
16
|
getOverviewTopQueries: builder.query({
|
17
17
|
queryFn: async ({ database }, { signal }) => {
|
18
18
|
try {
|
19
|
-
const
|
19
|
+
const response = await window.api.sendQuery({
|
20
20
|
schema: 'modern',
|
21
21
|
query: getQueryText(database),
|
22
22
|
database,
|
23
23
|
action: 'execute-scan',
|
24
24
|
}, { signal });
|
25
|
-
|
25
|
+
if (isQueryErrorResponse(response)) {
|
26
|
+
return { error: response };
|
27
|
+
}
|
28
|
+
return { data: parseQueryAPIExecuteResponse(response) };
|
26
29
|
}
|
27
30
|
catch (error) {
|
28
31
|
return { error: error || new Error('Unauthorized') };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TENANT_OVERVIEW_TABLES_LIMIT } from '../../../../utils/constants';
|
2
|
-
import { parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
2
|
+
import { isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../../../utils/query';
|
3
3
|
import { api } from '../../api';
|
4
4
|
function createShardQuery(path, tenantName) {
|
5
5
|
const pathSelect = tenantName
|
@@ -22,13 +22,16 @@ export const topShardsApi = api.injectEndpoints({
|
|
22
22
|
getTopShards: builder.query({
|
23
23
|
queryFn: async ({ database, path = '' }, { signal }) => {
|
24
24
|
try {
|
25
|
-
const
|
25
|
+
const response = await window.api.sendQuery({
|
26
26
|
schema: 'modern',
|
27
27
|
query: createShardQuery(path, database),
|
28
28
|
database,
|
29
29
|
action: queryAction,
|
30
30
|
}, { signal });
|
31
|
-
|
31
|
+
if (isQueryErrorResponse(response)) {
|
32
|
+
return { error: response };
|
33
|
+
}
|
34
|
+
return { data: parseQueryAPIExecuteResponse(response) };
|
32
35
|
}
|
33
36
|
catch (error) {
|
34
37
|
return { error: error || new Error('Unauthorized') };
|
@@ -13,7 +13,6 @@ export declare const selectTenants: ((state: {
|
|
13
13
|
tenants: import("./types").TenantsState;
|
14
14
|
partitions: import("../partitions/types").PartitionsState;
|
15
15
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
16
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
17
16
|
tabletsFilters: {
|
18
17
|
loading: boolean;
|
19
18
|
requestTime: number;
|
@@ -79,7 +78,6 @@ export declare const selectTenants: ((state: {
|
|
79
78
|
tenants: import("./types").TenantsState;
|
80
79
|
partitions: import("../partitions/types").PartitionsState;
|
81
80
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
82
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
83
81
|
tabletsFilters: {
|
84
82
|
loading: boolean;
|
85
83
|
requestTime: number;
|
@@ -211,7 +209,6 @@ export declare const selectTenants: ((state: {
|
|
211
209
|
tenants: import("./types").TenantsState;
|
212
210
|
partitions: import("../partitions/types").PartitionsState;
|
213
211
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
214
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
215
212
|
tabletsFilters: {
|
216
213
|
loading: boolean;
|
217
214
|
requestTime: number;
|
@@ -348,7 +345,6 @@ export declare const selectTenants: ((state: {
|
|
348
345
|
tenants: import("./types").TenantsState;
|
349
346
|
partitions: import("../partitions/types").PartitionsState;
|
350
347
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
351
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
352
348
|
tabletsFilters: {
|
353
349
|
loading: boolean;
|
354
350
|
requestTime: number;
|
@@ -489,7 +485,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
489
485
|
tenants: import("./types").TenantsState;
|
490
486
|
partitions: import("../partitions/types").PartitionsState;
|
491
487
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
492
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
493
488
|
tabletsFilters: {
|
494
489
|
loading: boolean;
|
495
490
|
requestTime: number;
|
@@ -562,7 +557,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
562
557
|
tenants: import("./types").TenantsState;
|
563
558
|
partitions: import("../partitions/types").PartitionsState;
|
564
559
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
565
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
566
560
|
tabletsFilters: {
|
567
561
|
loading: boolean;
|
568
562
|
requestTime: number;
|
@@ -628,7 +622,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
628
622
|
tenants: import("./types").TenantsState;
|
629
623
|
partitions: import("../partitions/types").PartitionsState;
|
630
624
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
631
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
632
625
|
tabletsFilters: {
|
633
626
|
loading: boolean;
|
634
627
|
requestTime: number;
|
@@ -760,7 +753,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
760
753
|
tenants: import("./types").TenantsState;
|
761
754
|
partitions: import("../partitions/types").PartitionsState;
|
762
755
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
763
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
764
756
|
tabletsFilters: {
|
765
757
|
loading: boolean;
|
766
758
|
requestTime: number;
|
@@ -897,7 +889,6 @@ export declare const selectFilteredTenants: ((state: {
|
|
897
889
|
tenants: import("./types").TenantsState;
|
898
890
|
partitions: import("../partitions/types").PartitionsState;
|
899
891
|
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
900
|
-
explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
|
901
892
|
tabletsFilters: {
|
902
893
|
loading: boolean;
|
903
894
|
requestTime: number;
|
@@ -16,7 +16,6 @@ export declare const selectConsumersNames: ((state: {
|
|
16
16
|
tenants: import("./tenants/types").TenantsState;
|
17
17
|
partitions: import("./partitions/types").PartitionsState;
|
18
18
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
19
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
20
19
|
tabletsFilters: {
|
21
20
|
loading: boolean;
|
22
21
|
requestTime: number;
|
@@ -89,7 +88,6 @@ export declare const selectConsumersNames: ((state: {
|
|
89
88
|
tenants: import("./tenants/types").TenantsState;
|
90
89
|
partitions: import("./partitions/types").PartitionsState;
|
91
90
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
92
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
93
91
|
tabletsFilters: {
|
94
92
|
loading: boolean;
|
95
93
|
requestTime: number;
|
@@ -155,7 +153,6 @@ export declare const selectConsumersNames: ((state: {
|
|
155
153
|
tenants: import("./tenants/types").TenantsState;
|
156
154
|
partitions: import("./partitions/types").PartitionsState;
|
157
155
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
158
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
159
156
|
tabletsFilters: {
|
160
157
|
loading: boolean;
|
161
158
|
requestTime: number;
|
@@ -287,7 +284,6 @@ export declare const selectConsumersNames: ((state: {
|
|
287
284
|
tenants: import("./tenants/types").TenantsState;
|
288
285
|
partitions: import("./partitions/types").PartitionsState;
|
289
286
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
290
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
291
287
|
tabletsFilters: {
|
292
288
|
loading: boolean;
|
293
289
|
requestTime: number;
|
@@ -424,7 +420,6 @@ export declare const selectConsumersNames: ((state: {
|
|
424
420
|
tenants: import("./tenants/types").TenantsState;
|
425
421
|
partitions: import("./partitions/types").PartitionsState;
|
426
422
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
427
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
428
423
|
tabletsFilters: {
|
429
424
|
loading: boolean;
|
430
425
|
requestTime: number;
|
@@ -572,7 +567,6 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
572
567
|
tenants: import("./tenants/types").TenantsState;
|
573
568
|
partitions: import("./partitions/types").PartitionsState;
|
574
569
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
575
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
576
570
|
tabletsFilters: {
|
577
571
|
loading: boolean;
|
578
572
|
requestTime: number;
|
@@ -665,7 +659,6 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
665
659
|
tenants: import("./tenants/types").TenantsState;
|
666
660
|
partitions: import("./partitions/types").PartitionsState;
|
667
661
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
668
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
669
662
|
tabletsFilters: {
|
670
663
|
loading: boolean;
|
671
664
|
requestTime: number;
|
@@ -731,7 +724,6 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
731
724
|
tenants: import("./tenants/types").TenantsState;
|
732
725
|
partitions: import("./partitions/types").PartitionsState;
|
733
726
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
734
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
735
727
|
tabletsFilters: {
|
736
728
|
loading: boolean;
|
737
729
|
requestTime: number;
|
@@ -863,7 +855,6 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
863
855
|
tenants: import("./tenants/types").TenantsState;
|
864
856
|
partitions: import("./partitions/types").PartitionsState;
|
865
857
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
866
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
867
858
|
tabletsFilters: {
|
868
859
|
loading: boolean;
|
869
860
|
requestTime: number;
|
@@ -1000,7 +991,6 @@ export declare const selectPreparedTopicStats: ((state: {
|
|
1000
991
|
tenants: import("./tenants/types").TenantsState;
|
1001
992
|
partitions: import("./partitions/types").PartitionsState;
|
1002
993
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
1003
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
1004
994
|
tabletsFilters: {
|
1005
995
|
loading: boolean;
|
1006
996
|
requestTime: number;
|
@@ -1148,7 +1138,6 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
1148
1138
|
tenants: import("./tenants/types").TenantsState;
|
1149
1139
|
partitions: import("./partitions/types").PartitionsState;
|
1150
1140
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
1151
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
1152
1141
|
tabletsFilters: {
|
1153
1142
|
loading: boolean;
|
1154
1143
|
requestTime: number;
|
@@ -1245,7 +1234,6 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
1245
1234
|
tenants: import("./tenants/types").TenantsState;
|
1246
1235
|
partitions: import("./partitions/types").PartitionsState;
|
1247
1236
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
1248
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
1249
1237
|
tabletsFilters: {
|
1250
1238
|
loading: boolean;
|
1251
1239
|
requestTime: number;
|
@@ -1311,7 +1299,6 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
1311
1299
|
tenants: import("./tenants/types").TenantsState;
|
1312
1300
|
partitions: import("./partitions/types").PartitionsState;
|
1313
1301
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
1314
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
1315
1302
|
tabletsFilters: {
|
1316
1303
|
loading: boolean;
|
1317
1304
|
requestTime: number;
|
@@ -1443,7 +1430,6 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
1443
1430
|
tenants: import("./tenants/types").TenantsState;
|
1444
1431
|
partitions: import("./partitions/types").PartitionsState;
|
1445
1432
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
1446
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
1447
1433
|
tabletsFilters: {
|
1448
1434
|
loading: boolean;
|
1449
1435
|
requestTime: number;
|
@@ -1580,7 +1566,6 @@ export declare const selectPreparedConsumersData: ((state: {
|
|
1580
1566
|
tenants: import("./tenants/types").TenantsState;
|
1581
1567
|
partitions: import("./partitions/types").PartitionsState;
|
1582
1568
|
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
1583
|
-
explainQuery: import("../../types/store/explainQuery").ExplainQueryState;
|
1584
1569
|
tabletsFilters: {
|
1585
1570
|
loading: boolean;
|
1586
1571
|
requestTime: number;
|
package/dist/store/utils.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
import type {
|
2
|
-
import type { GetState } from '.';
|
1
|
+
import type { AppDispatch, GetState } from '.';
|
3
2
|
export declare const nop: (result: any) => any;
|
4
3
|
export declare function createRequestActionTypes<Prefix extends string, Type extends string>(prefix: Prefix, type: Type): {
|
5
4
|
readonly REQUEST: `${Prefix}/${Type}_REQUEST`;
|
@@ -11,7 +10,7 @@ type CreateApiRequestParams<Actions, Response, HandledResponse> = {
|
|
11
10
|
request: Promise<Response>;
|
12
11
|
dataHandler?: (data: Response, getState: GetState) => HandledResponse;
|
13
12
|
};
|
14
|
-
export declare function createApiRequest<Actions extends ReturnType<typeof createRequestActionTypes>, Response, HandledResponse>({ actions, request, dataHandler, }: CreateApiRequestParams<Actions, Response, HandledResponse>): (dispatch:
|
13
|
+
export declare function createApiRequest<Actions extends ReturnType<typeof createRequestActionTypes>, Response, HandledResponse>({ actions, request, dataHandler, }: CreateApiRequestParams<Actions, Response, HandledResponse>): (dispatch: AppDispatch, getState: GetState) => Promise<HandledResponse | undefined>;
|
15
14
|
export type ApiRequestAction<Actions extends ReturnType<typeof createRequestActionTypes>, SuccessResponse = unknown, ErrorResponse = unknown> = {
|
16
15
|
type: Actions['REQUEST'];
|
17
16
|
} | {
|
package/dist/store/utils.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import createToast from '../utils/createToast';
|
2
|
+
import { isAxiosResponse } from '../utils/response';
|
2
3
|
import { SET_UNAUTHENTICATED } from './reducers/authentication/authentication';
|
3
4
|
export const nop = (result) => result;
|
4
5
|
export function createRequestActionTypes(prefix, type) {
|
@@ -8,7 +9,6 @@ export function createRequestActionTypes(prefix, type) {
|
|
8
9
|
FAILURE: `${prefix}/${type}_FAILURE`,
|
9
10
|
};
|
10
11
|
}
|
11
|
-
const isAxiosResponse = (response) => response && 'status' in response;
|
12
12
|
export function createApiRequest({ actions, request, dataHandler = nop, }) {
|
13
13
|
const doRequest = async function (dispatch, getState) {
|
14
14
|
dispatch({
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import type { IssueMessage } from '../query';
|
2
|
+
import type { TPathID } from './shared';
|
3
|
+
interface TStaticCredentials {
|
4
|
+
User?: string;
|
5
|
+
Password?: string;
|
6
|
+
PasswordSecretName?: string;
|
7
|
+
}
|
8
|
+
interface TOAuthToken {
|
9
|
+
Token?: string;
|
10
|
+
TokenSecretName?: string;
|
11
|
+
}
|
12
|
+
export interface TConnectionParams {
|
13
|
+
Endpoint?: string;
|
14
|
+
Database?: string;
|
15
|
+
StaticCredentials?: TStaticCredentials;
|
16
|
+
OAuthToken?: TOAuthToken;
|
17
|
+
}
|
18
|
+
interface TTargetEverything {
|
19
|
+
DstPrefix?: string;
|
20
|
+
}
|
21
|
+
export interface TTarget {
|
22
|
+
SrcPath?: string;
|
23
|
+
DstPath?: string;
|
24
|
+
}
|
25
|
+
interface TTargetSpecific {
|
26
|
+
Targets: TTarget[];
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/replication.proto
|
30
|
+
*/
|
31
|
+
export interface TReplicationConfig {
|
32
|
+
SrcConnectionParams?: TConnectionParams;
|
33
|
+
Everything?: TTargetEverything;
|
34
|
+
Specific?: TTargetSpecific;
|
35
|
+
InitialSync?: boolean;
|
36
|
+
}
|
37
|
+
interface TStandBy {
|
38
|
+
}
|
39
|
+
interface TPaused {
|
40
|
+
}
|
41
|
+
declare enum EFailoverMode {
|
42
|
+
FAILOVER_MODE_UNSPECIFIED = 0,
|
43
|
+
FAILOVER_MODE_CONSISTENT = 1,
|
44
|
+
FAILOVER_MODE_FORCE = 2
|
45
|
+
}
|
46
|
+
interface TDone {
|
47
|
+
FailoverMode?: EFailoverMode;
|
48
|
+
}
|
49
|
+
interface TError {
|
50
|
+
IssueMessage: IssueMessage[];
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/replication.proto
|
54
|
+
*/
|
55
|
+
export interface TReplicationState {
|
56
|
+
StandBy?: TStandBy;
|
57
|
+
Paused?: TPaused;
|
58
|
+
Done?: TDone;
|
59
|
+
Error?: TError;
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/flat_scheme_op.proto
|
63
|
+
*/
|
64
|
+
export interface TReplicationDescription {
|
65
|
+
Name?: string;
|
66
|
+
Config?: TReplicationConfig;
|
67
|
+
PathId?: TPathID;
|
68
|
+
/** uint64 */
|
69
|
+
Version?: string;
|
70
|
+
/** uint64 */
|
71
|
+
ControllerId?: string;
|
72
|
+
State?: TReplicationState;
|
73
|
+
}
|
74
|
+
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
var EFailoverMode;
|
2
|
+
(function (EFailoverMode) {
|
3
|
+
EFailoverMode[EFailoverMode["FAILOVER_MODE_UNSPECIFIED"] = 0] = "FAILOVER_MODE_UNSPECIFIED";
|
4
|
+
EFailoverMode[EFailoverMode["FAILOVER_MODE_CONSISTENT"] = 1] = "FAILOVER_MODE_CONSISTENT";
|
5
|
+
EFailoverMode[EFailoverMode["FAILOVER_MODE_FORCE"] = 2] = "FAILOVER_MODE_FORCE";
|
6
|
+
})(EFailoverMode || (EFailoverMode = {}));
|
7
|
+
export {};
|
@@ -4,6 +4,7 @@ import type { TColumnStoreDescription, TColumnTableDescription } from './columnE
|
|
4
4
|
import type { TExternalDataSourceDescription } from './externalDataSource';
|
5
5
|
import type { TExternalTableDescription } from './externalTable';
|
6
6
|
import type { TPersQueueGroupDescription } from './persQueueGroup';
|
7
|
+
import type { TReplicationDescription } from './replication';
|
7
8
|
import type { TTableDescription, TTableStats } from './table';
|
8
9
|
import type { TIndexDescription } from './tableIndex';
|
9
10
|
import type { TViewDescription } from './view';
|
@@ -70,6 +71,7 @@ export interface TPathDescription {
|
|
70
71
|
ExternalTableDescription?: TExternalTableDescription;
|
71
72
|
ExternalDataSourceDescription?: TExternalDataSourceDescription;
|
72
73
|
ViewDescription?: TViewDescription;
|
74
|
+
ReplicationDescription?: TReplicationDescription;
|
73
75
|
}
|
74
76
|
export interface TDirEntry {
|
75
77
|
Name?: string;
|
@@ -214,7 +216,8 @@ export declare enum EPathType {
|
|
214
216
|
EPathTypeCdcStream = "EPathTypeCdcStream",
|
215
217
|
EPathTypeExternalDataSource = "EPathTypeExternalDataSource",
|
216
218
|
EPathTypeExternalTable = "EPathTypeExternalTable",
|
217
|
-
EPathTypeView = "EPathTypeView"
|
219
|
+
EPathTypeView = "EPathTypeView",
|
220
|
+
EPathTypeReplication = "EPathTypeReplication"
|
218
221
|
}
|
219
222
|
export declare enum EPathSubType {
|
220
223
|
EPathSubTypeEmpty = "EPathSubTypeEmpty",
|
@@ -41,6 +41,7 @@ export var EPathType;
|
|
41
41
|
EPathType["EPathTypeExternalDataSource"] = "EPathTypeExternalDataSource";
|
42
42
|
EPathType["EPathTypeExternalTable"] = "EPathTypeExternalTable";
|
43
43
|
EPathType["EPathTypeView"] = "EPathTypeView";
|
44
|
+
EPathType["EPathTypeReplication"] = "EPathTypeReplication";
|
44
45
|
})(EPathType || (EPathType = {}));
|
45
46
|
export var EPathSubType;
|
46
47
|
(function (EPathSubType) {
|
@@ -8,6 +8,12 @@ export interface TUserToken {
|
|
8
8
|
GroupSIDs?: TProtoHashTable;
|
9
9
|
OriginalUserToken?: string;
|
10
10
|
AuthType?: string;
|
11
|
+
/** Is user allowed to view data */
|
12
|
+
IsViewerAllowed?: boolean;
|
13
|
+
/** Is user allowed to view deeper and make simple changes */
|
14
|
+
IsMonitoringAllowed?: boolean;
|
15
|
+
/** Is user allowed to do unrestricted changes in the system */
|
16
|
+
IsAdministrationAllowed?: boolean;
|
11
17
|
}
|
12
18
|
interface TProtoHashTable {
|
13
19
|
Buckets?: TProtoHashBucket[];
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import type {
|
2
|
-
import type { ApiRequestAction } from '../../store/utils';
|
3
|
-
import type { IQueryResult, QueryError, QueryErrorResponse } from './query';
|
1
|
+
import type { changeUserInput, goToNextQuery, goToPreviousQuery, saveQueryToHistory, setTenantPath } from '../../store/reducers/executeQuery';
|
4
2
|
export interface QueryInHistory {
|
5
3
|
queryText: string;
|
6
4
|
syntax?: string;
|
@@ -13,13 +11,8 @@ export interface ExecuteQueryState {
|
|
13
11
|
currentIndex: number;
|
14
12
|
};
|
15
13
|
tenantPath?: string;
|
16
|
-
data?: IQueryResult;
|
17
|
-
stats?: IQueryResult['stats'];
|
18
|
-
error?: string | QueryErrorResponse;
|
19
14
|
}
|
20
|
-
type
|
21
|
-
export type ExecuteQueryAction = SendQueryAction | ReturnType<typeof goToNextQuery> | ReturnType<typeof goToPreviousQuery> | ReturnType<typeof changeUserInput> | ReturnType<typeof saveQueryToHistory> | ReturnType<typeof setTenantPath>;
|
15
|
+
export type ExecuteQueryAction = ReturnType<typeof goToNextQuery> | ReturnType<typeof goToPreviousQuery> | ReturnType<typeof changeUserInput> | ReturnType<typeof saveQueryToHistory> | ReturnType<typeof setTenantPath>;
|
22
16
|
export interface ExecuteQueryStateSlice {
|
23
17
|
executeQuery: ExecuteQueryState;
|
24
18
|
}
|
25
|
-
export {};
|
@@ -104,3 +104,4 @@ export declare const QUERY_USE_MULTI_SCHEMA_KEY = "queryUseMultiSchema";
|
|
104
104
|
export declare const USE_CLUSTER_BALANCER_AS_BACKEND_KEY = "useClusterBalancerAsBacked";
|
105
105
|
export declare const ENABLE_AUTOCOMPLETE = "enableAutocomplete";
|
106
106
|
export declare const AUTOCOMPLETE_ON_ENTER = "autocompleteOnEnter";
|
107
|
+
export declare const IS_HOTKEYS_HELP_HIDDDEN_KEY = "isHotKeysHelpHidden";
|
package/dist/utils/constants.js
CHANGED
@@ -102,3 +102,4 @@ export const QUERY_USE_MULTI_SCHEMA_KEY = 'queryUseMultiSchema';
|
|
102
102
|
export const USE_CLUSTER_BALANCER_AS_BACKEND_KEY = 'useClusterBalancerAsBacked';
|
103
103
|
export const ENABLE_AUTOCOMPLETE = 'enableAutocomplete';
|
104
104
|
export const AUTOCOMPLETE_ON_ENTER = 'autocompleteOnEnter';
|
105
|
+
export const IS_HOTKEYS_HELP_HIDDDEN_KEY = 'isHotKeysHelpHidden';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { YQLEntity } from '@gravity-ui/websql-autocomplete';
|
1
2
|
export declare const LANGUAGE_YQL_ID = "yql";
|
2
3
|
export declare const SimpleTypes: string[];
|
3
4
|
export declare const SimpleFunctions: string[];
|
@@ -6,3 +7,4 @@ export declare const Udfs: string[];
|
|
6
7
|
export declare const WindowFunctions: string[];
|
7
8
|
export declare const TableFunction: never[];
|
8
9
|
export declare const Pragmas: string[];
|
10
|
+
export declare const EntitySettings: Record<YQLEntity, string[]>;
|
@@ -695,3 +695,36 @@ export const WindowFunctions = [
|
|
695
695
|
];
|
696
696
|
export const TableFunction = [];
|
697
697
|
export const Pragmas = ['TablePathPrefix', 'Warning'];
|
698
|
+
export const EntitySettings = {
|
699
|
+
table: [
|
700
|
+
'AUTO_PARTITIONING_BY_SIZE',
|
701
|
+
'AUTO_PARTITIONING_PARTITION_SIZE_MB',
|
702
|
+
'AUTO_PARTITIONING_BY_LOAD',
|
703
|
+
'AUTO_PARTITIONING_MIN_PARTITIONS_COUNT',
|
704
|
+
'AUTO_PARTITIONING_MAX_PARTITIONS_COUNT',
|
705
|
+
'UNIFORM_PARTITIONS',
|
706
|
+
'READ_REPLICAS_SETTINGS',
|
707
|
+
'TTL',
|
708
|
+
'KEY_BLOOM_FILTER',
|
709
|
+
'STORE',
|
710
|
+
],
|
711
|
+
view: ['security_invoker'],
|
712
|
+
topic: [
|
713
|
+
'min_active_partitions',
|
714
|
+
'partition_count_limit',
|
715
|
+
'retention_period',
|
716
|
+
'retention_storage_mb',
|
717
|
+
'partition_write_speed_bytes_per_second',
|
718
|
+
'partition_write_burst_bytes',
|
719
|
+
'metering_mode',
|
720
|
+
],
|
721
|
+
object: [],
|
722
|
+
user: [],
|
723
|
+
group: [],
|
724
|
+
externalDataSource: [],
|
725
|
+
externalTable: [],
|
726
|
+
tableStore: [],
|
727
|
+
replication: ['ENDPOINT', 'DATABASE', 'USER', 'PASSWORD'],
|
728
|
+
tableIndex: [],
|
729
|
+
topicConsumer: ['important', 'read_from'],
|
730
|
+
};
|
@@ -25,3 +25,4 @@ export declare function generateWindowFunctionsSuggestion(rangeToInsertSuggestio
|
|
25
25
|
export declare function generateTableFunctionsSuggestion(rangeToInsertSuggestion: monaco.IRange): Promise<monaco.languages.CompletionItem[]>;
|
26
26
|
export declare function generateAggregateFunctionsSuggestion(rangeToInsertSuggestion: monaco.IRange): Promise<monaco.languages.CompletionItem[]>;
|
27
27
|
export declare function generatePragmasSuggestion(rangeToInsertSuggestion: monaco.IRange): Promise<monaco.languages.CompletionItem[]>;
|
28
|
+
export declare function generateEntitySettingsSuggestion(rangeToInsertSuggestion: monaco.IRange, entityType: YQLEntity): Promise<monaco.languages.CompletionItem[]>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
2
|
-
import { AggregateFunctions, Pragmas, SimpleFunctions, SimpleTypes, TableFunction, Udfs, WindowFunctions, } from './constants';
|
2
|
+
import { AggregateFunctions, EntitySettings, Pragmas, SimpleFunctions, SimpleTypes, TableFunction, Udfs, WindowFunctions, } from './constants';
|
3
3
|
const CompletionItemKind = {
|
4
4
|
Method: 0,
|
5
5
|
Function: 1,
|
@@ -33,13 +33,13 @@ const CompletionItemKind = {
|
|
33
33
|
const re = /[\s'"-/@]/;
|
34
34
|
const suggestionEntityToAutocomplete = {
|
35
35
|
externalDataSource: ['external_data_source'],
|
36
|
+
externalTable: ['external_table'],
|
36
37
|
replication: ['replication'],
|
37
|
-
table: ['table'],
|
38
|
+
table: ['table', 'column_table'],
|
38
39
|
tableStore: ['column_store'],
|
39
40
|
topic: ['pers_queue_group'],
|
40
41
|
view: ['view'],
|
41
|
-
|
42
|
-
// index: ['table_index', 'index'],
|
42
|
+
tableIndex: ['table_index', 'index'],
|
43
43
|
};
|
44
44
|
const commonSuggestionEntities = ['dir', 'unknown'];
|
45
45
|
function filterAutocompleteEntities(autocompleteEntities, suggestions) {
|
@@ -90,13 +90,16 @@ const SuggestionsWeight = {
|
|
90
90
|
suggestEntity: 2,
|
91
91
|
suggestColumns: 3,
|
92
92
|
suggestColumnAliases: 4,
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
93
|
+
suggestTableIndexes: 5,
|
94
|
+
suggestTableHints: 6,
|
95
|
+
suggestEntitySettings: 7,
|
96
|
+
suggestSimpleTypes: 8,
|
97
|
+
suggestKeywords: 9,
|
98
|
+
suggestAggregateFunctions: 10,
|
99
|
+
suggestTableFunctions: 11,
|
100
|
+
suggestWindowFunctions: 12,
|
101
|
+
suggestFunctions: 13,
|
102
|
+
suggestUdfs: 14,
|
100
103
|
};
|
101
104
|
function getSuggestionIndex(suggestionType) {
|
102
105
|
return SuggestionsWeight[suggestionType];
|
@@ -116,6 +119,9 @@ async function getAggregateFunctions() {
|
|
116
119
|
async function getPragmas() {
|
117
120
|
return Pragmas;
|
118
121
|
}
|
122
|
+
async function getEntitySettings(entityType) {
|
123
|
+
return EntitySettings[entityType];
|
124
|
+
}
|
119
125
|
async function getUdfs() {
|
120
126
|
return Udfs;
|
121
127
|
}
|
@@ -328,6 +334,17 @@ export async function generatePragmasSuggestion(rangeToInsertSuggestion) {
|
|
328
334
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestPragmas')),
|
329
335
|
}));
|
330
336
|
}
|
337
|
+
export async function generateEntitySettingsSuggestion(rangeToInsertSuggestion, entityType) {
|
338
|
+
const entitySettings = await getEntitySettings(entityType);
|
339
|
+
return entitySettings.map((el) => ({
|
340
|
+
label: el,
|
341
|
+
insertText: el,
|
342
|
+
kind: CompletionItemKind.Property,
|
343
|
+
detail: 'Setting',
|
344
|
+
range: rangeToInsertSuggestion,
|
345
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestEntitySettings')),
|
346
|
+
}));
|
347
|
+
}
|
331
348
|
const alphabet = 'abcdefghijklmnopqrstuvwxyz';
|
332
349
|
function suggestionIndexToWeight(index) {
|
333
350
|
const characterInsideAlphabet = alphabet[index];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { generateAggregateFunctionsSuggestion, generateColumnAliasesSuggestion, generateColumnsSuggestion, generateEntitiesSuggestion, generateKeywordsSuggestion, generatePragmasSuggestion, generateSimpleFunctionsSuggestion, generateSimpleTypesSuggestion, generateTableFunctionsSuggestion, generateUdfSuggestion, generateWindowFunctionsSuggestion, } from './generateSuggestions';
|
1
|
+
import { generateAggregateFunctionsSuggestion, generateColumnAliasesSuggestion, generateColumnsSuggestion, generateEntitiesSuggestion, generateEntitySettingsSuggestion, generateKeywordsSuggestion, generatePragmasSuggestion, generateSimpleFunctionsSuggestion, generateSimpleTypesSuggestion, generateTableFunctionsSuggestion, generateUdfSuggestion, generateWindowFunctionsSuggestion, } from './generateSuggestions';
|
2
2
|
export function createProvideSuggestionsFunction(database) {
|
3
3
|
return async (model, monacoCursorPosition, _context, _token) => {
|
4
4
|
const rangeToInsertSuggestion = getRangeToInsertSuggestion(model, monacoCursorPosition);
|
@@ -27,6 +27,7 @@ async function getSuggestions(model, cursorPosition, rangeToInsertSuggestion, da
|
|
27
27
|
let udfsSuggestions = [];
|
28
28
|
let simpleTypesSuggestions = [];
|
29
29
|
let pragmasSuggestions = [];
|
30
|
+
let entitySettingsSuggestions = [];
|
30
31
|
if (parseResult.suggestEntity) {
|
31
32
|
const entityNamePrefix = getEntityNameAtCursor(model, cursorPosition);
|
32
33
|
entitiesSuggestions = await generateEntitiesSuggestion(rangeToInsertSuggestion, parseResult.suggestEntity, database, entityNamePrefix);
|
@@ -54,6 +55,9 @@ async function getSuggestions(model, cursorPosition, rangeToInsertSuggestion, da
|
|
54
55
|
if (parseResult.suggestPragmas) {
|
55
56
|
pragmasSuggestions = await generatePragmasSuggestion(rangeToInsertSuggestion);
|
56
57
|
}
|
58
|
+
if (parseResult.suggestEntitySettings) {
|
59
|
+
entitySettingsSuggestions = await generateEntitySettingsSuggestion(rangeToInsertSuggestion, parseResult.suggestEntitySettings);
|
60
|
+
}
|
57
61
|
const columnAliasSuggestion = await generateColumnAliasesSuggestion(rangeToInsertSuggestion, parseResult.suggestColumnAliases);
|
58
62
|
const columnsSuggestions = await generateColumnsSuggestion(rangeToInsertSuggestion, parseResult.suggestColumns, database);
|
59
63
|
const keywordsSuggestions = generateKeywordsSuggestion(rangeToInsertSuggestion, parseResult.suggestKeywords);
|
@@ -69,6 +73,7 @@ async function getSuggestions(model, cursorPosition, rangeToInsertSuggestion, da
|
|
69
73
|
...columnsSuggestions,
|
70
74
|
...keywordsSuggestions,
|
71
75
|
...aggregateFunctionsSuggestions,
|
76
|
+
...entitySettingsSuggestions,
|
72
77
|
];
|
73
78
|
return suggestions;
|
74
79
|
}
|
package/dist/utils/query.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { AnyExecuteResponse, AnyExplainResponse, KeyValueRow, QueryPlan, ScriptPlan } from '../types/api/query';
|
2
|
-
import type { IQueryResult,
|
1
|
+
import type { AnyExecuteResponse, AnyExplainResponse, ErrorResponse, KeyValueRow, QueryPlan, ScriptPlan } from '../types/api/query';
|
2
|
+
import type { IQueryResult, QueryMode } from '../types/store/query';
|
3
3
|
export declare const QUERY_ACTIONS: {
|
4
4
|
readonly execute: "execute";
|
5
5
|
readonly explain: "explain";
|
@@ -20,9 +20,11 @@ export declare const getColumnType: (type: string) => "boolean" | "number" | "st
|
|
20
20
|
type UnsupportedQueryResponseFormat = Array<unknown> | string | null | undefined | {
|
21
21
|
result: string | Record<string, unknown>;
|
22
22
|
};
|
23
|
+
export declare function isQueryErrorResponse(data: unknown): data is ErrorResponse;
|
23
24
|
export declare const parseQueryAPIExecuteResponse: (data: AnyExecuteResponse | UnsupportedQueryResponseFormat) => IQueryResult;
|
24
25
|
export declare const parseQueryAPIExplainResponse: (data: AnyExplainResponse | UnsupportedQueryResponseFormat) => IQueryResult;
|
25
26
|
export declare const parseQueryExplainPlan: (plan: ScriptPlan | QueryPlan) => QueryPlan;
|
26
27
|
export declare const prepareQueryResponse: (data?: KeyValueRow[]) => KeyValueRow[];
|
27
|
-
export declare
|
28
|
+
export declare const parseQueryError: (error: unknown) => ErrorResponse | string | undefined;
|
29
|
+
export declare const parseQueryErrorToString: (error: unknown) => string | undefined;
|
28
30
|
export {};
|