Skip to content

Commit fa7bfec

Browse files
authored
Merge branch 'main' into astandrik.paginated-tables-enable-setting-by-default-1391
2 parents 04e49ed + d7a8e0b commit fa7bfec

File tree

7 files changed

+176
-288
lines changed

7 files changed

+176
-288
lines changed

src/containers/Tenant/Query/NewSQL/NewSQL.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ export function NewSQL() {
5858
text: i18n('action.drop-external-table'),
5959
action: actions.dropExternalTable,
6060
},
61+
{
62+
text: i18n('action.add-index'),
63+
action: actions.addTableIndex,
64+
},
65+
{
66+
text: i18n('action.drop-index'),
67+
action: actions.dropTableIndex,
68+
},
6169
],
6270
},
6371
{

src/containers/Tenant/Query/NewSQL/i18n/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"action.select-from-external-table": "Select from external table",
1111
"action.delete-rows": "Delete rows",
1212
"action.drop-table": "Drop table",
13+
"action.add-index": "Add index",
14+
"action.drop-index": "Drop index",
1315
"action.drop-external-table": "Drop external table",
1416
"menu.tables": "Tables",
1517
"menu.topics": "Topics",

src/containers/Tenant/i18n/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"actions.copied": "The path is copied to the clipboard",
2626
"actions.notCopied": "Couldn’t copy the path",
2727
"actions.copyPath": "Copy path",
28+
"actions.dropIndex": "Drop index",
2829
"actions.openPreview": "Open preview",
2930
"actions.createTable": "Create table...",
3031
"actions.createExternalTable": "Create external table...",
@@ -36,6 +37,7 @@
3637
"actions.dropTopic": "Drop topic...",
3738
"actions.dropView": "Drop view...",
3839
"actions.alterTable": "Alter table...",
40+
"actions.addTableIndex": "Add index...",
3941
"actions.alterTopic": "Alter topic...",
4042
"actions.selectQuery": "Select query...",
4143
"actions.upsertQuery": "Upsert query...",

src/containers/Tenant/utils/newSQLQueryActions.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {changeUserInput} from '../../../store/reducers/executeQuery';
22

33
import {
4+
addTableIndex,
45
alterAsyncReplicationTemplate,
56
alterTableTemplate,
67
alterTopicTemplate,
@@ -17,6 +18,7 @@ import {
1718
dropAsyncReplicationTemplate,
1819
dropExternalTableTemplate,
1920
dropGroupTemplate,
21+
dropTableIndex,
2022
dropTableTemplate,
2123
dropTopicTemplate,
2224
dropUserTemplate,
@@ -25,7 +27,7 @@ import {
2527
selectQueryTemplate,
2628
updateTableTemplate,
2729
upsertQueryTemplate,
28-
} from './newSQLQueryTemplates';
30+
} from './schemaQueryTemplates';
2931

3032
export const bindActions = (dispatch: React.Dispatch<any>) => {
3133
const inputQuery = (query: () => string) => () => {
@@ -58,5 +60,7 @@ export const bindActions = (dispatch: React.Dispatch<any>) => {
5860
revokePrivilege: inputQuery(revokePrivilegeTemplate),
5961
dropUser: inputQuery(dropUserTemplate),
6062
dropGroup: inputQuery(dropGroupTemplate),
63+
addTableIndex: inputQuery(addTableIndex),
64+
dropTableIndex: inputQuery(dropTableIndex),
6165
};
6266
};

src/containers/Tenant/utils/newSQLQueryTemplates.ts

Lines changed: 0 additions & 250 deletions
This file was deleted.

0 commit comments

Comments
 (0)