mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Look up table root page from schema
This commit is contained in:
parent
2615cdce2c
commit
3b53f48400
3 changed files with 83 additions and 45 deletions
|
@ -15,12 +15,16 @@ impl Schema {
|
|||
pub fn add_table(&mut self, name: String, table: Table) {
|
||||
self.tables.insert(name, table);
|
||||
}
|
||||
|
||||
pub fn get_table(&self, name: &str) -> Option<&Table> {
|
||||
self.tables.get(name)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Table {
|
||||
root_page: i32,
|
||||
name: String,
|
||||
columns: Vec<Column>,
|
||||
pub root_page: usize,
|
||||
pub name: String,
|
||||
pub columns: Vec<Column>,
|
||||
}
|
||||
|
||||
impl Table {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue