mirror of
https://github.com/lancedb/lancedb.git
synced 2026-05-17 12:00:39 +00:00
feat: add restore remote api (#2282)
This commit is contained in:
@@ -303,12 +303,16 @@ impl Table {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn restore(self_: PyRef<'_, Self>) -> PyResult<Bound<'_, PyAny>> {
|
||||
#[pyo3(signature = (version=None))]
|
||||
pub fn restore(self_: PyRef<'_, Self>, version: Option<u64>) -> PyResult<Bound<'_, PyAny>> {
|
||||
let inner = self_.inner_ref()?.clone();
|
||||
future_into_py(
|
||||
self_.py(),
|
||||
async move { inner.restore().await.infer_error() },
|
||||
)
|
||||
|
||||
future_into_py(self_.py(), async move {
|
||||
if let Some(version) = version {
|
||||
inner.checkout(version).await.infer_error()?;
|
||||
}
|
||||
inner.restore().await.infer_error()
|
||||
})
|
||||
}
|
||||
|
||||
pub fn query(&self) -> Query {
|
||||
|
||||
Reference in New Issue
Block a user