feat(postgres): support concurrent index creation
This commit is contained in:
1 parent
ebf412b144
commit
aa6d60533c
38 files changed
+1917
-34
No files matched your search
@@ -420,6 +420,8 @@ async fn main() {
|
||||
.route("/schema/triggers", get(routes::schema::list_triggers))
|
||||
.route("/schema/constraints", get(routes::schema::list_constraints))
|
||||
.route("/schema/partitions", get(routes::schema::list_partitions))
|
||||
.route("/schema/table-partition-status", get(routes::schema::get_table_partition_status))
|
||||
.route("/schema/invalid-indexes", get(routes::schema::list_invalid_indexes))
|
||||
.route("/schema/subpartitions", get(routes::schema::list_subpartitions))
|
||||
.route("/schema/functions", get(routes::schema::list_functions))
|
||||
.route("/schema/sequences", get(routes::schema::list_sequences))
|
||||
|
||||
@@ -623,6 +623,32 @@ pub async fn list_partitions(
|
||||
Ok(Json(serde_json::to_value(result).map_err(|e| AppError::from(e.to_string()))?))
|
||||
}
|
||||
|
||||
pub async fn get_table_partition_status(
|
||||
State(state): State<Arc<WebState>>,
|
||||
Query(q): Query<SchemaQuery>,
|
||||
) -> Result<Json<dbx_core::schema::TablePartitionStatus>, AppError> {
|
||||
let database = q.database.as_deref().unwrap_or("");
|
||||
let schema = q.schema.as_deref().unwrap_or("");
|
||||
let table = q.table.as_deref().unwrap_or("");
|
||||
dbx_core::schema::table_partition_status_core(&state.app, &q.connection_id, database, schema, table)
|
||||
.await
|
||||
.map(Json)
|
||||
.map_err(AppError::from)
|
||||
}
|
||||
|
||||
pub async fn list_invalid_indexes(
|
||||
State(state): State<Arc<WebState>>,
|
||||
Query(q): Query<SchemaQuery>,
|
||||
) -> Result<Json<Vec<String>>, AppError> {
|
||||
let database = q.database.as_deref().unwrap_or("");
|
||||
let schema = q.schema.as_deref().unwrap_or("");
|
||||
let table = q.table.as_deref().unwrap_or("");
|
||||
dbx_core::schema::list_invalid_indexes_core(&state.app, &q.connection_id, database, schema, table)
|
||||
.await
|
||||
.map(Json)
|
||||
.map_err(AppError::from)
|
||||
}
|
||||
|
||||
pub async fn list_subpartitions(
|
||||
State(state): State<Arc<WebState>>,
|
||||
Query(q): Query<SchemaQuery>,
|
||||
|
||||
Reference in new issue
Block a user