aven 0.1.10

Local-first task manager CLI and sync server
Documentation
1
2
3
4
5
6
7
8
9
10
use sqlx::{Sqlite, pool::PoolConnection};

use crate::db::open_db;

pub async fn test_conn() -> (tempfile::TempDir, PoolConnection<Sqlite>) {
    let temp = tempfile::tempdir().unwrap();
    let pool = open_db(&temp.path().join("test.sqlite")).await.unwrap();
    let conn = pool.acquire().await.unwrap();
    (temp, conn)
}