chore: remove table exist check

This commit is contained in:
kaichaosun 2026-01-28 18:39:30 +08:00
parent 7177de3600
commit 591366f5fc
No known key found for this signature in database
GPG Key ID: 223E0F992F4F03BF

View File

@ -80,16 +80,6 @@ impl SqliteDb {
pub fn transaction(&mut self) -> Result<rusqlite::Transaction<'_>, StorageError> {
Ok(self.conn.transaction()?)
}
/// Checks if a table exists.
pub fn table_exists(&self, table_name: &str) -> Result<bool, StorageError> {
let count: i32 = self.conn.query_row(
"SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name=?1",
[table_name],
|row| row.get(0),
)?;
Ok(count > 0)
}
}
impl StorageBackend for SqliteDb {