Skip to content

Commit

Permalink
feat(redb): Public database and table definition (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
timonv authored Dec 30, 2024
1 parent 1bbbb0e commit b55bf0b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions swiftide-integrations/src/redb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ impl Redb {
format!("{}.{}", self.cache_key_prefix, node.id())
}

fn table_definition(&self) -> redb::TableDefinition<String, bool> {
// TODO: Should this be static?
pub fn table_definition(&self) -> redb::TableDefinition<String, bool> {
redb::TableDefinition::<String, bool>::new(&self.table_name)
}

pub fn database(&self) -> &redb::Database {
&self.database
}
}

0 comments on commit b55bf0b

Please sign in to comment.