Replies: 3 comments 2 replies
-
I fear its near to impossible to help you here. Please consider adding the following information to support other people understanding your problem:
|
Beta Was this translation helpful? Give feedback.
-
Answering your questions: Thanks for your help and time. |
Beta Was this translation helpful? Give feedback.
-
+1 to this question, I have a similar need to define shared behavior over multiple tables but have found it difficult to abstract over different table types. |
Beta Was this translation helpful? Give feedback.
-
I am new to Diesel, and I have a project with nearly 100 tables. As a consequence, I would like to have a trait with common queries to implement on each of them, such as find_all, count, insert, delete, and update. Now, I was able to create a trait that at least compile with all but update which is showing below:
However, I am failing to create a simple generic update function for the trait. Isolated, so far it looks like
But it keeps returning weird unmet dependencies... how should I do a generics update function the proper diesel way? For some reason it is not really that common to adopt an strategy to create traits as you would do with a repository since I have search on google, this repo, the official docs and many other sources without any clear answer. Although I admit I may not have look where I should.
Best regards, and thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions