Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use-QueryService-by-default-for-running-queries-1171 #1188

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '../../../../../utils/query';

const DEFAULT_QUERY_SETTINGS: QuerySettings = {
queryMode: QUERY_MODES.script,
queryMode: QUERY_MODES.query,
isolationLevel: ISOLATION_LEVELS.serializable,
timeout: '60',
statisticsMode: STATISTICS_MODES.none,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {QUERY_SETTINGS_FIELD_SETTINGS} from '../../QuerySettingsDialog/constants
import getChangedQueryExecutionSettingsDescription from './getChangedQueryExecutionSettingsDescription';

const DEFAULT_QUERY_SETTINGS: QuerySettings = {
queryMode: QUERY_MODES.script,
queryMode: QUERY_MODES.query,
isolationLevel: ISOLATION_LEVELS.serializable,
timeout: '60',
statisticsMode: STATISTICS_MODES.none,
Expand Down
12 changes: 6 additions & 6 deletions src/containers/Tenant/Query/QuerySettingsDialog/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ export const ISOLATION_LEVEL_SELECT_OPTIONS = [
];

export const QUERY_MODE_SELECT_OPTIONS = [
{
value: QUERY_MODES.query,
content: QUERY_MODES_TITLES[QUERY_MODES.query],
text: i18n('method-description.query'),
isDefault: true,
},
{
value: QUERY_MODES.script,
content: QUERY_MODES_TITLES[QUERY_MODES.script],
text: i18n('method-description.script'),
isDefault: true,
},
{
value: QUERY_MODES.scan,
Expand All @@ -53,11 +58,6 @@ export const QUERY_MODE_SELECT_OPTIONS = [
content: QUERY_MODES_TITLES[QUERY_MODES.data],
text: i18n('method-description.data'),
},
{
value: QUERY_MODES.query,
content: QUERY_MODES_TITLES[QUERY_MODES.query],
text: i18n('method-description.query'),
},
{
value: QUERY_MODES.pg,
content: QUERY_MODES_TITLES[QUERY_MODES.pg],
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const TENANT_OVERVIEW_TABLES_SETTINGS = {
} as const;

export const DEFAULT_QUERY_SETTINGS = {
queryMode: QUERY_MODES.script,
queryMode: QUERY_MODES.query,
isolationLevel: ISOLATION_LEVELS.serializable,
timeout: '60',
statisticsMode: STATISTICS_MODES.none,
Expand Down
1 change: 1 addition & 0 deletions tests/suites/tenant/queryEditor/QueryEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const VISIBILITY_TIMEOUT = 5000;

export enum QueryMode {
YQLScript = 'YQL Script',
Data = 'DML',
Scan = 'Scan',
}

Expand Down
2 changes: 1 addition & 1 deletion tests/suites/tenant/queryEditor/queryEditor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ test.describe('Test Query Editor', async () => {
// Test for Execute mode
await queryEditor.setQuery(longRunningQuery);
await queryEditor.clickGearButton();
await queryEditor.settingsDialog.changeStatsLevel('Profile');
await queryEditor.settingsDialog.changeQueryMode(QueryMode.Data);
await queryEditor.settingsDialog.clickButton(ButtonNames.Save);

// Test for Explain mode
Expand Down
Loading