mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-20 14:14:49 +01:00
feat(cli): working dir
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//! SQLite Mint
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
|
||||
use async_trait::async_trait;
|
||||
@@ -23,7 +24,8 @@ pub struct MintSqliteDatabase {
|
||||
}
|
||||
|
||||
impl MintSqliteDatabase {
|
||||
pub async fn new(path: &str) -> Result<Self, Error> {
|
||||
pub async fn new(path: &Path) -> Result<Self, Error> {
|
||||
let path = path.to_str().ok_or(Error::InvalidDbPath)?;
|
||||
let _conn = SqliteConnectOptions::from_str(path)?
|
||||
.journal_mode(sqlx::sqlite::SqliteJournalMode::Wal)
|
||||
.read_only(false)
|
||||
|
||||
Reference in New Issue
Block a user