Add a SQLite database backend #265

Merged
wojtek merged 20 commits from 248---replace-json-file-as-a-database-with-sqlite into main 2025-01-12 10:24:53 +01:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 8c55b79777 - Show all commits

View File

@ -71,12 +71,6 @@ impl SqlTransactionSqliteBackend<'_> {
} }
} }
impl From<serde_json::Error> for Error {
fn from(value: serde_json::Error) -> Self {
Error::SerDeError(value.to_string())
}
}
impl<'conn> ISqlDatabaseBackend<'conn> for SqlDatabaseSqliteBackend { impl<'conn> ISqlDatabaseBackend<'conn> for SqlDatabaseSqliteBackend {
type Tx = SqlTransactionSqliteBackend<'conn>; type Tx = SqlTransactionSqliteBackend<'conn>;

View File

@ -86,6 +86,12 @@ pub enum Error {
ExecError(String), ExecError(String),
} }
impl From<serde_json::Error> for Error {
fn from(value: serde_json::Error) -> Self {
Error::SerDeError(value.to_string())
}
}
impl fmt::Display for Error { impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self { match *self {