InsertMany function for create trait.

Changed path to DateTimeInterval.

Changed lifetimes on derives with async_trait
This commit is contained in:
Martin Berg Alstad
2024-08-25 17:56:56 +02:00
parent 762330189d
commit eeab1257e3
11 changed files with 80 additions and 56 deletions

View File

@ -13,10 +13,10 @@ pub(crate) fn derive_diesel_crud_list_impl(
quote! {
#[automatically_derived]
impl lib::diesel_crud_trait::DieselCrudList for #struct_ident {
fn list<'a, 'b>(conn: &'a mut diesel_async::AsyncPgConnection) -> #return_type
fn list<'a, 'async_trait>(conn: &'a mut diesel_async::AsyncPgConnection) -> #return_type
where
Self: Sized + Sync + 'a,
'a: 'b
'a: 'async_trait
{
Box::pin(async move {
use diesel::associations::HasTable;