chore: rename some structs

This commit is contained in:
appflowy 2022-07-20 15:30:48 +08:00
parent 1e3c69f15b
commit cb1afacbd6
4 changed files with 7 additions and 25 deletions

View File

@ -49,16 +49,6 @@ table! {
} }
} }
table! {
rev_history (id) {
id -> Integer,
object_id -> Text,
start_rev_id -> BigInt,
end_rev_id -> BigInt,
data -> Binary,
}
}
table! { table! {
rev_snapshot (id) { rev_snapshot (id) {
id -> Integer, id -> Integer,
@ -135,7 +125,6 @@ allow_tables_to_appear_in_same_query!(
grid_meta_rev_table, grid_meta_rev_table,
grid_rev_table, grid_rev_table,
kv_table, kv_table,
rev_history,
rev_snapshot, rev_snapshot,
rev_table, rev_table,
trash_table, trash_table,

View File

@ -1,5 +1,4 @@
use crate::disk::RevisionState; use crate::disk::RevisionState;
// use crate::history::{RevisionHistoryConfig, RevisionHistoryDiskCache, RevisionHistoryManager};
use crate::{RevisionPersistence, RevisionSnapshotDiskCache, RevisionSnapshotManager, WSDataProviderDataSource}; use crate::{RevisionPersistence, RevisionSnapshotDiskCache, RevisionSnapshotManager, WSDataProviderDataSource};
use bytes::Bytes; use bytes::Bytes;
use flowy_error::{FlowyError, FlowyResult}; use flowy_error::{FlowyError, FlowyResult};
@ -46,7 +45,7 @@ pub struct RevisionManager {
user_id: String, user_id: String,
rev_id_counter: RevIdCounter, rev_id_counter: RevIdCounter,
rev_persistence: Arc<RevisionPersistence>, rev_persistence: Arc<RevisionPersistence>,
// rev_history: Arc<RevisionHistoryManager>, #[allow(dead_code)]
rev_snapshot: Arc<RevisionSnapshotManager>, rev_snapshot: Arc<RevisionSnapshotManager>,
rev_compactor: Arc<dyn RevisionCompactor>, rev_compactor: Arc<dyn RevisionCompactor>,
#[cfg(feature = "flowy_unit_test")] #[cfg(feature = "flowy_unit_test")]
@ -59,25 +58,14 @@ impl RevisionManager {
object_id: &str, object_id: &str,
rev_persistence: RevisionPersistence, rev_persistence: RevisionPersistence,
rev_compactor: C, rev_compactor: C,
// history_persistence: HP,
snapshot_persistence: SP, snapshot_persistence: SP,
) -> Self ) -> Self
where where
// HP: 'static + RevisionHistoryDiskCache,
SP: 'static + RevisionSnapshotDiskCache, SP: 'static + RevisionSnapshotDiskCache,
C: 'static + RevisionCompactor, C: 'static + RevisionCompactor,
{ {
let rev_id_counter = RevIdCounter::new(0); let rev_id_counter = RevIdCounter::new(0);
let rev_compactor = Arc::new(rev_compactor); let rev_compactor = Arc::new(rev_compactor);
// let history_persistence = Arc::new(history_persistence);
// let rev_history_config = RevisionHistoryConfig::default();
// let rev_history = Arc::new(RevisionHistoryManager::new(
// user_id,
// object_id,
// rev_history_config,
// history_persistence,
// rev_compactor.clone(),
// ));
let rev_persistence = Arc::new(rev_persistence); let rev_persistence = Arc::new(rev_persistence);
@ -90,7 +78,6 @@ impl RevisionManager {
user_id: user_id.to_owned(), user_id: user_id.to_owned(),
rev_id_counter, rev_id_counter,
rev_persistence, rev_persistence,
// rev_history,
rev_snapshot, rev_snapshot,
rev_compactor, rev_compactor,
#[cfg(feature = "flowy_unit_test")] #[cfg(feature = "flowy_unit_test")]

View File

@ -1,3 +1,6 @@
#![allow(clippy::all)]
#![allow(dead_code)]
#![allow(unused_variables)]
use crate::{RevisionSnapshotDiskCache, RevisionSnapshotInfo}; use crate::{RevisionSnapshotDiskCache, RevisionSnapshotInfo};
use flowy_database::ConnectionPool; use flowy_database::ConnectionPool;
use flowy_error::FlowyResult; use flowy_error::FlowyResult;

View File

@ -1,3 +1,6 @@
#![allow(clippy::all)]
#![allow(dead_code)]
#![allow(unused_variables)]
use flowy_error::FlowyResult; use flowy_error::FlowyResult;
use std::sync::Arc; use std::sync::Arc;