Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Mar 25, 2024
1 parent 7c3f608 commit e79dfe7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/network/sql/executeSQL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface IExecuteSQLParams {
* 是否拆分执行,传空的话像等于true
*/
split?: boolean;
addROWID?: boolean;
}
export interface ISQLExecuteTaskSQL {
sqlTuple: {
Expand Down
25 changes: 25 additions & 0 deletions src/component/ODCSetting/config/database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,31 @@ const databaseSettings: IODCSetting[] = [
);
},
},
{
label: '获取 RowId',
key: 'odc.sqlexecute.default.addInternalRowId',
group: databaseGroup,
secondGroup: databaseResultsetGroup,
storeType: 'server',
render: (value, onChange) => {
return (
<RadioItem
options={[
{
label: formatMessage({ id: 'src.component.ODCSetting.config.C5306019' }), //'是'
value: 'true',
},
{
label: formatMessage({ id: 'src.component.ODCSetting.config.DE21D1E7' }), //'否'
value: 'false',
},
]}
value={value}
onChange={onChange}
/>
);
},
},
{
label: formatMessage({ id: 'src.component.ODCSetting.config.B86084FC' }), //'查询条数限制'
key: 'odc.sqlexecute.default.queryLimit',
Expand Down
1 change: 1 addition & 0 deletions src/d.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export interface IUserConfig {
'odc.sqlexecute.default.queryLimit': string;
'odc.sqlexecute.default.fullLinkTraceEnabled': 'true' | 'false';
'odc.sqlexecute.default.continueExecutionOnError': 'true' | 'false';
'odc.sqlexecute.default.addInternalRowId': 'true' | 'false';
'odc.sqlexecute.default.objectDraggingOption': DragInsertType;
'odc.editor.style.theme': 'OceanBase' | 'VSCode';
'odc.editor.style.fontSize': 'Small' | 'Normal' | 'Large';
Expand Down
4 changes: 4 additions & 0 deletions src/store/sql/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { clone, isNil } from 'lodash';
import { action, observable, runInAction } from 'mobx';
import { generateResultSetColumns } from '../helper';
import sessionManager from '../sessionManager';
import setting from '../setting';
export enum ExcecuteSQLMode {
PL = 'PL',
TABLE = 'TABLE',
Expand Down Expand Up @@ -185,6 +186,9 @@ export class SQLStore {
showTableColumnInfo,
continueExecutionOnError,
fullLinkTraceEnabled,
addROWID:
setting.configurations?.['odc.sqlexecute.default.addInternalRowId'] === 'true' &&
session.supportFeature?.enableRowId,
},
sessionId,
dbName,
Expand Down

0 comments on commit e79dfe7

Please sign in to comment.