fix compilation error

This commit is contained in:
Jonathan de Jong 2024-02-25 21:26:09 +01:00
parent fb8688df45
commit 77a604fa50
6 changed files with 16 additions and 9 deletions

View file

@ -8,4 +8,4 @@ edition = "2018"
[dependencies]
clap = "2.33.3"
anyhow = "1.0.41"
conduit_iface = { path = "../iface/" }
conduit_iface = { path = "../iface/", features=["sled", "sqlite"] }

View file

@ -2,7 +2,7 @@ use std::path::Path;
use clap::{App, Arg};
use conduit_iface::db::{copy_database, sled, sqlite};
use conduit_iface::db::{copy_database, sled, sqlite, Config};
fn main() -> anyhow::Result<()> {
let matches = App::new("Conduit Sled to Sqlite Migrator")
@ -44,7 +44,12 @@ fn main() -> anyhow::Result<()> {
let mut sled = sled::SledDB::new(sled::new_db(source_dir)?);
let mut sqlite = sqlite::SqliteDB::new(sqlite::new_conn(dest_dir)?);
let mut sqlite = sqlite::SqliteDB::new(
sqlite::new_conn(dest_dir)?,
Config {
ignore_broken_rows: false,
},
);
copy_database(&mut sled, &mut sqlite, 1000)?;