kennethreitz/records

How to get the ID of the data after the insert into

huawan2018 opened this issue · 1 comments

How to get the ID of the data after the insert into

For anyone wondering, I had the same question:
If you are using Postgres you can add a RETURNING <field> statement at the end of your INSERT.
Then you can query back the DB with the returned field (e.g. id)