Skip to content

Commit

Permalink
chore(sqlite): remove dead method in SqliteEventCacheStore
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjbvr committed Jan 7, 2025
1 parent 43ab5a4 commit bd46733
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions crates/matrix-sdk-sqlite/src/event_cache_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

//! A sqlite-based backend for the [`EventCacheStore`].
#![allow(dead_code)] // Most of the unused code may be used soonish.

use std::{borrow::Cow, fmt, path::Path, sync::Arc};

use async_trait::async_trait;
Expand Down Expand Up @@ -143,28 +141,6 @@ impl SqliteEventCacheStore {
row.get::<_, String>(3)?,
))
}

async fn load_chunk_with_id(
&self,
room_id: &RoomId,
chunk_id: ChunkIdentifier,
) -> Result<RawChunk<Event, Gap>> {
let hashed_room_id = self.encode_key(keys::LINKED_CHUNKS, room_id);

let this = self.clone();

self
.acquire()
.await?
.with_transaction(move |txn| -> Result<_> {
let (id, previous, next, chunk_type) = txn.query_row(
"SELECT id, previous, next, type FROM linked_chunks WHERE room_id = ? AND chunk_id = ?",
(&hashed_room_id, chunk_id.index()),
Self::map_row_to_chunk
)?;
txn.rebuild_chunk(&this, &hashed_room_id, previous, id, next, chunk_type.as_str())
}).await
}
}

trait TransactionExtForLinkedChunks {
Expand Down

0 comments on commit bd46733

Please sign in to comment.