add: 增加对于查询得到的结果集直接进行数据编辑的功能。当查询是单表且包含主键(有联合主键时包含全部主键)时,可以在结果集内双击单元格修改数据,修改结果以事务形式提交或回滚。
This commit is contained in:
1 parent
ecbd94c7be
commit
814fda7433
15 files changed
+627
-2
No files matched your search
@@ -74,3 +74,21 @@ pub async fn execute_script(
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn execute_in_transaction(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
database: String,
|
||||
statements: Vec<String>,
|
||||
schema: Option<String>,
|
||||
) -> Result<db::QueryResult, String> {
|
||||
dbx_core::query::execute_statements_in_transaction(
|
||||
&state,
|
||||
&connection_id,
|
||||
&database,
|
||||
&statements,
|
||||
schema.as_deref(),
|
||||
)
|
||||
.await
|
||||
}
|
||||
Reference in new issue
Block a user