Implement Default for QueryBuilder (#2605)

This commit is contained in:
Johannes 2023-07-15 01:28:14 +02:00 committed by GitHub
parent 3662bdab84
commit f7ce8fd9f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,6 +30,16 @@ where
arguments: Option<<DB as HasArguments<'args>>::Arguments>,
}
impl<'args, DB: Database> Default for QueryBuilder<'args, DB> {
fn default() -> Self {
QueryBuilder {
init_len: 0,
query: String::default(),
arguments: Some(Default::default()),
}
}
}
impl<'args, DB: Database> QueryBuilder<'args, DB>
where
DB: Database,