Closed maennchen closed 3 months ago
I implemented it so that the single create returns the existing row.
Any row that was skipped because of the upsert filter clause will have the metadata entry upsert_skipped set.
upsert_skipped
Alternatively we could return nil, but I believe that might confuse the users of the function. With bulk creates it makes more sense to be missing.
nil
I couldn't find specific tests for single create / single bulk create. So I added those as well.
This is a prerequisite to implement the syntax sugar from https://github.com/ash-project/ash/issues/1385
🚀 Thank you for your contribution! 🚀
I implemented it so that the single create returns the existing row.
Any row that was skipped because of the upsert filter clause will have the metadata entry
upsert_skipped
set.Alternatively we could return
nil
, but I believe that might confuse the users of the function. With bulk creates it makes more sense to be missing.I couldn't find specific tests for single create / single bulk create. So I added those as well.
This is a prerequisite to implement the syntax sugar from https://github.com/ash-project/ash/issues/1385
Contributor checklist