Add a way to delete recipe
This commit is contained in:
parent
5ce3391466
commit
31bc31035a
10 changed files with 247 additions and 175 deletions
|
|
@ -4,10 +4,11 @@ use std::{
|
|||
io::Read,
|
||||
path::Path,
|
||||
str::FromStr,
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use sqlx::{
|
||||
sqlite::{SqliteConnectOptions, SqliteJournalMode, SqlitePoolOptions},
|
||||
sqlite::{SqliteConnectOptions, SqliteJournalMode, SqlitePoolOptions, SqliteSynchronous},
|
||||
Pool, Sqlite, Transaction,
|
||||
};
|
||||
use thiserror::Error;
|
||||
|
|
@ -75,8 +76,9 @@ impl Connection {
|
|||
))?
|
||||
.journal_mode(SqliteJournalMode::Wal) // TODO: use 'Wal2' when available.
|
||||
.create_if_missing(true)
|
||||
.pragma("foreign_keys", "ON")
|
||||
.pragma("synchronous", "NORMAL");
|
||||
.busy_timeout(Duration::from_secs(10))
|
||||
.foreign_keys(true)
|
||||
.synchronous(SqliteSynchronous::Normal);
|
||||
|
||||
Self::create_connection(
|
||||
SqlitePoolOptions::new()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue