Open dvtkrlbs opened 1 year ago
I am also looking forward for some feature like this. The way I'm currently using it I can only retrieve the latest ID, and would be useful to get all the IDs that were inserted.
Looking forward to this feature.
yes this is a very important feature, would love this aswell
+1
Motivation
Currently there does not seem to be any way of inserting many rows and immediately returning it. The use case for this when using database calculated columns such as id columns.
Proposed Solutions
Similar to
UpdateMany
introduce anInsertMany
struct that has the exec_with_returning function that returns theVec
ofModel
implsCurrent Workarounds
Immediately selecting the rows back which might not be possible always. Or the worse but always working workaround is inserting in a loop.
I would be happy to try to implement my proposed solution with some guidance.