feat(mysql): manage and edit MySQL events

This commit is contained in:
miracle authored and GitHub committed 2026-08-23 12:23:46 +08:00
1 parent 701f188e45
commit d8bc5153d2
35 files changed
+981 -27

No files matched your search

+1
View File
@@ -418,6 +418,7 @@ async fn main() {
.route("/schema/completion-objects", get(routes::schema::list_completion_objects))
.route("/schema/completion-assistant", post(routes::schema::completion_assistant_search))
.route("/schema/object-source", get(routes::schema::get_object_source))
.route("/schema/event-info", get(routes::schema::get_event_info))
.route("/schema/custom-type-details", get(routes::schema::get_custom_type_details))
.route("/schema/columns", get(routes::schema::list_columns))
.route("/schema/all-columns", get(routes::schema::get_all_columns))
+16
View File
@@ -351,6 +351,22 @@ pub async fn get_object_source(
Ok(Json(result))
}
pub async fn get_event_info(
State(state): State<Arc<WebState>>,
Query(q): Query<SchemaQuery>,
) -> Result<Json<dbx_core::db::MysqlEventInfo>, AppError> {
let result = dbx_core::schema::get_event_info_core(
&state.app,
&q.connection_id,
q.database.as_deref().unwrap_or(""),
q.schema.as_deref().unwrap_or(""),
q.table.as_deref().unwrap_or(""),
)
.await
.map_err(AppError::from)?;
Ok(Json(result))
}
pub async fn get_custom_type_details(
State(state): State<Arc<WebState>>,
Query(q): Query<SchemaQuery>,