feat: add list_functions client APIs

This commit is contained in:
Xuanwo
2026-09-01 16:11:20 +08:00
parent 5cbd979455
commit 4b81a35fda
8 changed files with 223 additions and 0 deletions
+13
View File
@@ -629,6 +629,19 @@ impl Connection {
})
}
pub fn list_functions(self_: PyRef<'_, Self>) -> PyResult<Bound<'_, PyAny>> {
let inner = self_.get_inner()?.clone();
future_into_py(self_.py(), async move {
inner
.list_functions()
.await
.infer_error()?
.into_iter()
.map(|function| function.to_canonical_json().infer_error())
.collect::<PyResult<Vec<_>>>()
})
}
pub fn drop_function(
self_: PyRef<'_, Self>,
name: String,