aboutsummaryrefslogtreecommitdiff
path: root/src/db/backend.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/backend.rs')
-rw-r--r--src/db/backend.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/db/backend.rs b/src/db/backend.rs
index b75d5ca..5f35dd9 100644
--- a/src/db/backend.rs
+++ b/src/db/backend.rs
@@ -1,7 +1,9 @@
+use barrel::backend::SqlGenerator;
pub use diesel::connection::Connection;
pub trait Connectable {
type Connection: Connection;
+ type SqlGenerator: SqlGenerator;
fn connect(&self) -> diesel::ConnectionResult<Self::Connection>;
}
@@ -11,6 +13,7 @@ pub struct Sqlite {
impl Connectable for Sqlite {
type Connection = diesel::sqlite::SqliteConnection;
+ type SqlGenerator = barrel::backend::Sqlite;
fn connect(&self) -> diesel::ConnectionResult<Self::Connection> {
Self::Connection::establish(self.db_file)