@@ -84,7 +84,7 @@ fn create_functions(config: &Config) -> TokenStream {
84
84
quote ! {
85
85
#[ async_trait:: async_trait]
86
86
impl crate :: models:: Create for #model_name {
87
- async fn create_conn( self , conn: & mut editoast_models:: DbConnection ) -> crate :: error:: Result <Self > {
87
+ async fn create_conn( self , conn: & mut editoast_models:: DieselConnection ) -> crate :: error:: Result <Self > {
88
88
use #table:: table;
89
89
use diesel_async:: RunQueryDsl ;
90
90
@@ -126,7 +126,7 @@ fn retrieve_functions(config: &Config) -> TokenStream {
126
126
quote ! {
127
127
#[ async_trait:: async_trait]
128
128
impl crate :: models:: Retrieve for #model_name {
129
- async fn retrieve_conn( conn: & mut editoast_models:: DbConnection , obj_id: i64 ) -> crate :: error:: Result <Option <Self >> {
129
+ async fn retrieve_conn( conn: & mut editoast_models:: DieselConnection , obj_id: i64 ) -> crate :: error:: Result <Option <Self >> {
130
130
use #table:: table;
131
131
use #table:: dsl;
132
132
use diesel_async:: RunQueryDsl ;
@@ -174,7 +174,7 @@ fn delete_functions(config: &Config) -> TokenStream {
174
174
quote ! {
175
175
#[ async_trait:: async_trait]
176
176
impl crate :: models:: Delete for #model_name {
177
- async fn delete_conn( conn: & mut editoast_models:: DbConnection , obj_id: i64 ) -> crate :: error:: Result <bool > {
177
+ async fn delete_conn( conn: & mut editoast_models:: DieselConnection , obj_id: i64 ) -> crate :: error:: Result <bool > {
178
178
use #table:: table;
179
179
use #table:: dsl;
180
180
use diesel_async:: RunQueryDsl ;
@@ -207,7 +207,7 @@ fn update_functions(config: &Config) -> TokenStream {
207
207
quote ! {
208
208
#[ async_trait:: async_trait]
209
209
impl crate :: models:: Update for #model_name {
210
- async fn update_conn( self , conn: & mut editoast_models:: DbConnection , obj_id: i64 ) -> crate :: error:: Result <Option <Self >> {
210
+ async fn update_conn( self , conn: & mut editoast_models:: DieselConnection , obj_id: i64 ) -> crate :: error:: Result <Option <Self >> {
211
211
use #table:: table;
212
212
213
213
match diesel:: update( table. find( obj_id) ) . set( & self ) . get_result( conn) . await
0 commit comments