2023-07-29 09:46:24 +08:00
|
|
|
use anyhow::Error;
|
2023-12-29 13:02:27 +08:00
|
|
|
use collab::core::collab::CollabDocState;
|
2023-10-10 19:05:55 +08:00
|
|
|
use collab_entity::CollabType;
|
2023-07-29 09:46:24 +08:00
|
|
|
|
2024-01-11 14:42:03 +08:00
|
|
|
use flowy_database_pub::cloud::{CollabDocStateByOid, DatabaseCloudService, DatabaseSnapshot};
|
2023-07-05 20:57:09 +08:00
|
|
|
use lib_infra::future::FutureResult;
|
|
|
|
|
|
|
|
pub(crate) struct LocalServerDatabaseCloudServiceImpl();
|
|
|
|
|
|
|
|
impl DatabaseCloudService for LocalServerDatabaseCloudServiceImpl {
|
2024-02-04 05:49:45 +08:00
|
|
|
fn get_database_object_doc_state(
|
2023-07-29 09:46:24 +08:00
|
|
|
&self,
|
|
|
|
_object_id: &str,
|
2023-10-02 17:22:22 +08:00
|
|
|
_collab_type: CollabType,
|
2023-10-23 11:43:31 +08:00
|
|
|
_workspace_id: &str,
|
2023-12-29 13:02:27 +08:00
|
|
|
) -> FutureResult<CollabDocState, Error> {
|
2023-07-05 20:57:09 +08:00
|
|
|
FutureResult::new(async move { Ok(vec![]) })
|
|
|
|
}
|
|
|
|
|
2024-02-04 05:49:45 +08:00
|
|
|
fn batch_get_database_object_doc_state(
|
2023-07-05 20:57:09 +08:00
|
|
|
&self,
|
2023-07-14 13:37:13 +08:00
|
|
|
_object_ids: Vec<String>,
|
2023-07-29 09:46:24 +08:00
|
|
|
_object_ty: CollabType,
|
2023-10-23 11:43:31 +08:00
|
|
|
_workspace_id: &str,
|
2023-12-29 13:02:27 +08:00
|
|
|
) -> FutureResult<CollabDocStateByOid, Error> {
|
|
|
|
FutureResult::new(async move { Ok(CollabDocStateByOid::default()) })
|
2023-07-14 13:37:13 +08:00
|
|
|
}
|
|
|
|
|
2024-02-04 05:49:45 +08:00
|
|
|
fn get_database_collab_object_snapshots(
|
2023-07-14 13:37:13 +08:00
|
|
|
&self,
|
|
|
|
_object_id: &str,
|
2023-08-17 23:46:39 +08:00
|
|
|
_limit: usize,
|
|
|
|
) -> FutureResult<Vec<DatabaseSnapshot>, Error> {
|
|
|
|
FutureResult::new(async move { Ok(vec![]) })
|
2023-07-05 20:57:09 +08:00
|
|
|
}
|
|
|
|
}
|