Generic Associated Types in Database, replacing HasValueRef, HasArguments, HasStatement (#2973)

* HasValueRef, HasArguments, HasStatement -> Database GATs

replace the associated types from the generic traits
`HasValueRef<'r>`, `HasArguments<'q>` and `HasStatement<'q>`
with generic associated types in `Database`

* fixup after rebase

---------

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
This commit is contained in:
nitn3lav
2024-03-14 20:35:52 +01:00
committed by GitHub
parent 936744dfd6
commit 9ba488c831
33 changed files with 173 additions and 284 deletions

View File

@@ -1,6 +1,6 @@
//! TODO: automatic test fixture capture
use crate::database::{Database, HasArguments};
use crate::database::Database;
use crate::query_builder::QueryBuilder;
@@ -111,7 +111,7 @@ impl<DB: Database> FixtureSnapshot<DB> {
/// which appends to an internal string.
impl<DB: Database> ToString for Fixture<DB>
where
for<'a> <DB as HasArguments<'a>>::Arguments: Default,
for<'a> <DB as Database>::Arguments<'a>: Default,
{
fn to_string(&self) -> String {
let mut query = QueryBuilder::<DB>::new("");