@@ -6,7 +6,7 @@ import {changeUserInput} from '../../../store/reducers/executeQuery';
6
6
import type { GetTableSchemaDataParams } from '../../../store/reducers/tableSchemaData' ;
7
7
import { TENANT_PAGES_IDS , TENANT_QUERY_TABS_ID } from '../../../store/reducers/tenant/constants' ;
8
8
import { setQueryTab , setTenantPage } from '../../../store/reducers/tenant/tenant' ;
9
- import type { QueryMode , QuerySettings } from '../../../types/store/query' ;
9
+ import type { QuerySettings } from '../../../types/store/query' ;
10
10
import createToast from '../../../utils/createToast' ;
11
11
import { transformPath } from '../ObjectSummary/transformPath' ;
12
12
import type { SchemaData } from '../Schema/SchemaViewer/types' ;
@@ -57,18 +57,9 @@ const bindActions = (
57
57
dispatch : AppDispatch ,
58
58
additionalEffects : ActionsAdditionalEffects ,
59
59
) => {
60
- const {
61
- setActivePath,
62
- updateQueryExecutionSettings,
63
- showCreateDirectoryDialog,
64
- getTableSchemaDataPromise,
65
- } = additionalEffects ;
66
-
67
- const inputQuery = ( tmpl : TemplateFn , mode ?: QueryMode ) => ( ) => {
68
- if ( mode ) {
69
- updateQueryExecutionSettings ( { queryMode : mode } ) ;
70
- }
60
+ const { setActivePath, showCreateDirectoryDialog, getTableSchemaDataPromise} = additionalEffects ;
71
61
62
+ const inputQuery = ( tmpl : TemplateFn ) => ( ) => {
72
63
const pathType = nodeTableTypeToPathType [ params . type ] ;
73
64
const withTableData = [ selectQueryTemplate , upsertQueryTemplate ] . includes ( tmpl ) ;
74
65
@@ -96,26 +87,26 @@ const bindActions = (
96
87
showCreateDirectoryDialog ( params . path ) ;
97
88
}
98
89
: undefined ,
99
- createTable : inputQuery ( createTableTemplate , 'script' ) ,
100
- createColumnTable : inputQuery ( createColumnTableTemplate , 'script' ) ,
101
- createAsyncReplication : inputQuery ( createAsyncReplicationTemplate , 'script' ) ,
102
- alterAsyncReplication : inputQuery ( alterAsyncReplicationTemplate , 'script' ) ,
103
- dropAsyncReplication : inputQuery ( dropAsyncReplicationTemplate , 'script' ) ,
104
- alterTable : inputQuery ( alterTableTemplate , 'script' ) ,
105
- dropTable : inputQuery ( dropTableTemplate , 'script' ) ,
90
+ createTable : inputQuery ( createTableTemplate ) ,
91
+ createColumnTable : inputQuery ( createColumnTableTemplate ) ,
92
+ createAsyncReplication : inputQuery ( createAsyncReplicationTemplate ) ,
93
+ alterAsyncReplication : inputQuery ( alterAsyncReplicationTemplate ) ,
94
+ dropAsyncReplication : inputQuery ( dropAsyncReplicationTemplate ) ,
95
+ alterTable : inputQuery ( alterTableTemplate ) ,
96
+ dropTable : inputQuery ( dropTableTemplate ) ,
106
97
selectQuery : inputQuery ( selectQueryTemplate ) ,
107
98
upsertQuery : inputQuery ( upsertQueryTemplate ) ,
108
- createExternalTable : inputQuery ( createExternalTableTemplate , 'script' ) ,
109
- dropExternalTable : inputQuery ( dropExternalTableTemplate , 'script' ) ,
110
- selectQueryFromExternalTable : inputQuery ( selectQueryTemplate , 'query' ) ,
111
- createTopic : inputQuery ( createTopicTemplate , 'script' ) ,
112
- alterTopic : inputQuery ( alterTopicTemplate , 'script' ) ,
113
- dropTopic : inputQuery ( dropTopicTemplate , 'script' ) ,
114
- createView : inputQuery ( createViewTemplate , 'script' ) ,
115
- dropView : inputQuery ( dropViewTemplate , 'script' ) ,
116
- dropIndex : inputQuery ( dropTableIndex , 'script' ) ,
117
- addTableIndex : inputQuery ( addTableIndex , 'script' ) ,
118
- createCdcStream : inputQuery ( createCdcStreamTemplate , 'script' ) ,
99
+ createExternalTable : inputQuery ( createExternalTableTemplate ) ,
100
+ dropExternalTable : inputQuery ( dropExternalTableTemplate ) ,
101
+ selectQueryFromExternalTable : inputQuery ( selectQueryTemplate ) ,
102
+ createTopic : inputQuery ( createTopicTemplate ) ,
103
+ alterTopic : inputQuery ( alterTopicTemplate ) ,
104
+ dropTopic : inputQuery ( dropTopicTemplate ) ,
105
+ createView : inputQuery ( createViewTemplate ) ,
106
+ dropView : inputQuery ( dropViewTemplate ) ,
107
+ dropIndex : inputQuery ( dropTableIndex ) ,
108
+ addTableIndex : inputQuery ( addTableIndex ) ,
109
+ createCdcStream : inputQuery ( createCdcStreamTemplate ) ,
119
110
copyPath : ( ) => {
120
111
try {
121
112
copy ( params . relativePath ) ;
0 commit comments