feat(postgres): support editing table owners
This commit is contained in:
32 files changed
+556
-36
No files matched your search
@@ -713,6 +713,13 @@ pub fn build_table_structure_change_sql(
|
||||
Ok(dbx_core::table_structure_sql::build_table_structure_change_sql(options))
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn build_table_owner_change_sql(
|
||||
options: dbx_core::table_structure_sql::TableOwnerChangeSqlOptions,
|
||||
) -> Result<dbx_core::table_structure_sql::TableStructureSqlResult, String> {
|
||||
Ok(dbx_core::table_structure_sql::build_table_owner_change_sql(options))
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn preview_sqlite_table_structure_change(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
|
||||
@@ -574,6 +574,17 @@ pub async fn list_owners(
|
||||
dbx_core::schema::list_owners_core(&state, &connection_id, &database, &schema).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn get_table_owner(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
database: String,
|
||||
schema: String,
|
||||
table: String,
|
||||
) -> Result<Option<String>, String> {
|
||||
dbx_core::schema::get_table_owner_core(&state, &connection_id, &database, &schema, &table).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn list_extensions(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
|
||||
@@ -1690,6 +1690,7 @@ pub fn run() {
|
||||
commands::schema::list_sequences,
|
||||
commands::schema::list_rules,
|
||||
commands::schema::list_owners,
|
||||
commands::schema::get_table_owner,
|
||||
commands::schema::list_extensions,
|
||||
commands::schema::list_available_extensions,
|
||||
commands::schema_diff::prepare_schema_diff,
|
||||
@@ -1756,6 +1757,7 @@ pub fn run() {
|
||||
commands::query::build_routine_rename_object_source_statements,
|
||||
commands::query::build_view_ddl_sql,
|
||||
commands::query::build_table_structure_change_sql,
|
||||
commands::query::build_table_owner_change_sql,
|
||||
commands::query::preview_sqlite_table_structure_change,
|
||||
commands::query::apply_sqlite_table_structure_change,
|
||||
commands::query::build_create_table_sql,
|
||||
|
||||
Reference in new issue
Block a user