feat(editor): add table copy/paste keyboard shortcuts
* feat: add table copy/paste with configurable structure and data options - Implement Navicat-style table copy/paste functionality - Support multi-table selection and batch operations - Configurable paste modes: structure+data (default), structure only, data only - Backend: add build_copy_table_data_sql API (INSERT INTO ... SELECT) - TreeItem.vue: copy/paste context menus, paste dialog with mode selection - ObjectBrowser.vue: batch toolbar buttons, context menu, paste dialog - Refactor TreeClipboard type to support multi-table entries - Add i18n keys for all 7 locale files (en, zh-CN, zh-TW, ja, es, it, pt-BR) * Fix table paste shortcuts * Fix Kafka MQ sidebar detection * Restrict table paste scope * Support data copy for primary SQL databases
This commit is contained in:
1 parent
5d2ce9f189
commit
0c91fecf5d
26 files changed
+943
-34
No files matched your search
@@ -331,6 +331,7 @@ async fn main() {
|
||||
.route("/query/build-create-schema-sql", post(routes::query::build_create_schema_sql))
|
||||
.route("/query/build-drop-schema-sql", post(routes::query::build_drop_schema_sql))
|
||||
.route("/query/build-duplicate-table-structure-sql", post(routes::query::build_duplicate_table_structure_sql))
|
||||
.route("/query/build-copy-table-data-sql", post(routes::query::build_copy_table_data_sql))
|
||||
.route(
|
||||
"/query/build-executable-object-source-statements",
|
||||
post(routes::query::build_executable_object_source_statements),
|
||||
|
||||
@@ -174,6 +174,12 @@ pub struct BuildDuplicateTableStructureSqlRequest {
|
||||
pub options: dbx_core::db_admin_sql::DuplicateTableStructureSqlOptions,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct BuildCopyTableDataSqlRequest {
|
||||
pub options: dbx_core::db_admin_sql::CopyTableDataSqlOptions,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct BuildExecutableObjectSourceRequest {
|
||||
@@ -622,6 +628,10 @@ pub async fn build_duplicate_table_structure_sql(
|
||||
Json(dbx_core::db_admin_sql::build_duplicate_table_structure_sql(req.options))
|
||||
}
|
||||
|
||||
pub async fn build_copy_table_data_sql(Json(req): Json<BuildCopyTableDataSqlRequest>) -> Json<String> {
|
||||
Json(dbx_core::db_admin_sql::build_copy_table_data_sql(req.options))
|
||||
}
|
||||
|
||||
pub async fn build_executable_object_source_statements(
|
||||
Json(req): Json<BuildExecutableObjectSourceRequest>,
|
||||
) -> Result<Json<Vec<String>>, AppError> {
|
||||
|
||||
Reference in new issue
Block a user