slick-pg
slick-pg copied to clipboard
Would it be possible for slick-pg to support updateReturning?
In Slick, insertReturning is supported, which is returning the case class for the inserted Row after inserting.
but the updateReturning is not supported. This looks reasonable because not every SQL database supports the RETURNING clause.
In Postgres, RETURNING clause is supported, which means the updating and selecting can be done in one query instead of two queries.
http://www.postgresql.org/docs/9.1/static/sql-update.html
Someone implemented the updateReturning
method, but it only works for slick 2.x..
http://stackoverflow.com/questions/23561953/slick-2-update-columns-in-a-table-and-return-whole-table-object
It would be great if a method called updateReturning
could be added to slick-pg..
Hi @hanfeisun, it requires foundation support from slick
.
There's already an associated issue slick/slick#963, we can watch it.
What's the slick foundational support required for this?
The linked slick ticket seems to indicate that it needs driver-specific implementation, and doesn't seem to be making any progress on its own.
@virusdave I want slick
to support the returning
syntax in the update invoker.