mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-06-30 11:52:22 +08:00
✨ feat(editor): 支持 SQL 编辑器增删改事务提交
- 为 SQL 编辑器 DML 新增后端托管事务会话和提交回滚接口 - 增加手动提交与自动提交设置,并显示待提交状态 - 补充前后端事务执行、提交、回滚和自动提交测试
This commit is contained in:
@@ -33,6 +33,7 @@ interface QueryEditorResultsPanelProps {
|
||||
currentDb: string;
|
||||
currentConnectionId: string;
|
||||
toggleShortcutLabel: string;
|
||||
transactionToolbar?: React.ReactNode;
|
||||
onActiveResultKeyChange: (key: string) => void;
|
||||
onHide: () => void;
|
||||
onCloseResult: (key: string) => void;
|
||||
@@ -57,6 +58,7 @@ const QueryEditorResultsPanel: React.FC<QueryEditorResultsPanelProps> = ({
|
||||
currentDb,
|
||||
currentConnectionId,
|
||||
toggleShortcutLabel,
|
||||
transactionToolbar,
|
||||
onActiveResultKeyChange,
|
||||
onHide,
|
||||
onCloseResult,
|
||||
@@ -132,6 +134,16 @@ const QueryEditorResultsPanel: React.FC<QueryEditorResultsPanelProps> = ({
|
||||
/>
|
||||
</Tooltip>
|
||||
);
|
||||
const tabsExtraContent = transactionToolbar || !activeResultUsesDataGrid
|
||||
? {
|
||||
right: (
|
||||
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}>
|
||||
{transactionToolbar}
|
||||
{!activeResultUsesDataGrid ? tabsHideButton : null}
|
||||
</div>
|
||||
),
|
||||
}
|
||||
: undefined;
|
||||
|
||||
const toolbarHideButton = (
|
||||
<Tooltip title={hideTooltipTitle}>
|
||||
@@ -321,7 +333,7 @@ const QueryEditorResultsPanel: React.FC<QueryEditorResultsPanelProps> = ({
|
||||
onChange={onActiveResultKeyChange}
|
||||
animated={false}
|
||||
style={{ flex: 1, minHeight: 0 }}
|
||||
tabBarExtraContent={!activeResultUsesDataGrid ? { right: tabsHideButton } : undefined}
|
||||
tabBarExtraContent={tabsExtraContent}
|
||||
items={resultSets.map((rs, idx) => ({
|
||||
key: rs.key,
|
||||
label: (
|
||||
|
||||
Reference in New Issue
Block a user