atuin/src/command/sync.rs
Ellie Huxtable 156893d774
Update docs, unify on SQLx, bugfixes (#40)
* Begin moving to sqlx for local too

* Stupid scanners should just have a nice cup of tea

Random internet shit searching for /.env or whatever

* Remove diesel and rusqlite fully
2021-04-25 17:21:52 +00:00

19 lines
427 B
Rust

use eyre::Result;
use atuin_client::database::Database;
use atuin_client::settings::Settings;
use atuin_client::sync;
pub async fn run(
settings: &Settings,
force: bool,
db: &mut (impl Database + Send + Sync),
) -> Result<()> {
sync::sync(settings, force, db).await?;
println!(
"Sync complete! {} items in database, force: {}",
db.history_count().await?,
force
);
Ok(())
}