@@ -6,7 +6,7 @@ import {changeUserInput} from '../../../store/reducers/executeQuery';
66import type { GetTableSchemaDataParams } from '../../../store/reducers/tableSchemaData' ;
77import { TENANT_PAGES_IDS , TENANT_QUERY_TABS_ID } from '../../../store/reducers/tenant/constants' ;
88import { setQueryTab , setTenantPage } from '../../../store/reducers/tenant/tenant' ;
9- import type { QueryMode , QuerySettings } from '../../../types/store/query' ;
9+ import type { QuerySettings } from '../../../types/store/query' ;
1010import createToast from '../../../utils/createToast' ;
1111import { transformPath } from '../ObjectSummary/transformPath' ;
1212import type { SchemaData } from '../Schema/SchemaViewer/types' ;
@@ -57,18 +57,9 @@ const bindActions = (
5757 dispatch : AppDispatch ,
5858 additionalEffects : ActionsAdditionalEffects ,
5959) => {
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 ;
7161
62+ const inputQuery = ( tmpl : TemplateFn ) => ( ) => {
7263 const pathType = nodeTableTypeToPathType [ params . type ] ;
7364 const withTableData = [ selectQueryTemplate , upsertQueryTemplate ] . includes ( tmpl ) ;
7465
@@ -96,26 +87,26 @@ const bindActions = (
9687 showCreateDirectoryDialog ( params . path ) ;
9788 }
9889 : 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 ) ,
10697 selectQuery : inputQuery ( selectQueryTemplate ) ,
10798 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 ) ,
119110 copyPath : ( ) => {
120111 try {
121112 copy ( params . relativePath ) ;
0 commit comments