aboutsummaryrefslogtreecommitdiff
path: root/src/db/bin
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-03 12:12:25 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-03 12:12:25 +0200
commitbd9ff432d716020d7235ece76257b60dc3ead95a (patch)
treefe2819ccf30bea4d0190b6b7de2efc8a02da61d0 /src/db/bin
parentdf0877bbba91d210fa8a91bd095ca13e0ea2176f (diff)
downloadgarage-bd9ff432d716020d7235ece76257b60dc3ead95a.tar.gz
garage-bd9ff432d716020d7235ece76257b60dc3ead95a.zip
Garage works on sqlite, but it's a hack
Diffstat (limited to 'src/db/bin')
-rw-r--r--src/db/bin/convert.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/db/bin/convert.rs b/src/db/bin/convert.rs
index 8c4f0ddc..7525bcc9 100644
--- a/src/db/bin/convert.rs
+++ b/src/db/bin/convert.rs
@@ -2,7 +2,7 @@ use std::path::PathBuf;
use garage_db::*;
-use clap::{Parser};
+use clap::Parser;
/// K2V command line interface
#[derive(Parser, Debug)]
@@ -41,12 +41,10 @@ fn do_conversion(args: Args) -> Result<()> {
fn open_db(path: PathBuf, engine: String) -> Result<Db> {
match engine.as_str() {
"sled" => {
- let db = sled_adapter::sled::Config::default()
- .path(&path)
- .open()?;
+ let db = sled_adapter::sled::Config::default().path(&path).open()?;
Ok(sled_adapter::SledDb::init(db))
}
- "sqlite" | "rusqlite" => {
+ "sqlite" | "sqlite3" | "rusqlite" => {
let db = sqlite_adapter::rusqlite::Connection::open(&path)?;
Ok(sqlite_adapter::SqliteDb::init(db))
}