|
|
@ -11,7 +11,7 @@ pub struct Database<'a, D, S, C> { |
|
|
|
command_runner: &'a C,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a, D, S, C: CommandRunner> Database<'a, D, S, C> {
|
|
|
|
impl<'a, D, S, C> Database<'a, D, S, C> {
|
|
|
|
pub const fn new(db_name: D, seed_file: S, command_runner: &'a C) -> Self {
|
|
|
|
Self {
|
|
|
|
db_name,
|
|
|
@ -19,7 +19,9 @@ impl<'a, D, S, C: CommandRunner> Database<'a, D, S, C> { |
|
|
|
command_runner,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a, D, S, C: CommandRunner> Database<'a, D, S, C> {
|
|
|
|
async fn run_sql(&self, sql: &str) -> Result<String, Box<dyn Error>> {
|
|
|
|
let b = self
|
|
|
|
.command_runner
|
|
|
|