Browse Source

chore: rename some structs

appflowy 2 years ago
parent
commit
cb1afacbd6

+ 0 - 11
frontend/rust-lib/flowy-database/src/schema.rs

@@ -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! {
     rev_snapshot (id) {
         id -> Integer,
@@ -135,7 +125,6 @@ allow_tables_to_appear_in_same_query!(
     grid_meta_rev_table,
     grid_rev_table,
     kv_table,
-    rev_history,
     rev_snapshot,
     rev_table,
     trash_table,

+ 1 - 14
frontend/rust-lib/flowy-revision/src/rev_manager.rs

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

+ 3 - 0
frontend/rust-lib/flowy-revision/src/snapshot/persistence.rs

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

+ 3 - 0
frontend/rust-lib/flowy-revision/src/snapshot/rev_snapshot.rs

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