Currently I upload a CSV file which I parse then and use Repo.insert_all for all entries to insert into DB.
I would like to collect conflicts for the user, to give him a chance to fix his uploaded CSV file for the troublesome entries.
So, as for my question, I need to utilize on_conflict to collect all conflicts and return them to user, is this possible? any idea to do so?
Hi @sabri …here’s a question I asked recently almost along the same lines as yours… Collect conflicts?. I wanted a list of the entries just inserted.I may be completely off the mark here but can you not do this
But, how can you get the recently inserted items? I guess using the date by using a query?
Why did you use returning: in Repo.insert_all ?
As for the link of your question, it’s the same link of my question