mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-03 07:23:33 +00:00
* refactor(proxy): inject database repositories through per-repository dependencies Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(proxy): model Prisma client cleanup * test(rust): include NativeDatabase in bridge API surface --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
19 lines
675 B
Rust
19 lines
675 B
Rust
use litellm_host_python::ready_future;
|
|
use pyo3::{prelude::*, types::PyNone};
|
|
|
|
#[pyclass(frozen)]
|
|
pub(crate) struct NativeDatabase {}
|
|
|
|
// TODO: take typed writer/reader settings and a token provider, then open a sqlx PgPool, once the first
|
|
// repository moves to native. The Prisma DATABASE_URL carries Prisma-only params and rotating IAM tokens
|
|
#[pymethods]
|
|
impl NativeDatabase {
|
|
#[staticmethod]
|
|
fn connect(py: Python<'_>) -> PyResult<Bound<'_, PyAny>> {
|
|
ready_future(py, Bound::new(py, NativeDatabase {})?.as_any())
|
|
}
|
|
|
|
fn close<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {
|
|
ready_future(py, PyNone::get(py).as_any())
|
|
}
|
|
}
|