Allow opening a DB. (#462) r=fluffyemily
This commit is contained in:
parent
1dc8a3eaa0
commit
3d4615fb8c
1 changed files with 4 additions and 2 deletions
|
@ -335,8 +335,10 @@ pub fn ensure_current_version(conn: &mut rusqlite::Connection) -> Result<DB> {
|
||||||
|
|
||||||
let user_version = get_user_version(&conn)?;
|
let user_version = get_user_version(&conn)?;
|
||||||
match user_version {
|
match user_version {
|
||||||
0 => create_current_version(conn),
|
0 => create_current_version(conn),
|
||||||
// TODO: support updating or re-opening an existing store.
|
CURRENT_VERSION => read_db(conn),
|
||||||
|
|
||||||
|
// TODO: support updating an existing store.
|
||||||
v => bail!(ErrorKind::NotYetImplemented(format!("Opening databases with Mentat version: {}", v))),
|
v => bail!(ErrorKind::NotYetImplemented(format!("Opening databases with Mentat version: {}", v))),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue