Allow opening a DB. (#462) r=fluffyemily

This commit is contained in:
Richard Newman 2017-05-09 09:42:35 -07:00 committed by GitHub
parent 1dc8a3eaa0
commit 3d4615fb8c

View file

@ -336,7 +336,9 @@ pub fn ensure_current_version(conn: &mut rusqlite::Connection) -> Result<DB> {
let user_version = get_user_version(&conn)?;
match user_version {
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))),
}
}