Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't return id from upserted rows #36

Open
seamusabshere opened this issue May 2, 2014 · 6 comments
Open

doesn't return id from upserted rows #36

seamusabshere opened this issue May 2, 2014 · 6 comments

Comments

@seamusabshere
Copy link
Owner

it feels like it would be easy to return the ID of the upserted row... presumably this would help a lot of people

@EndangeredMassa
Copy link

This would be extremely helpful. To emulate this right now, you have to do another find with the selector.

@pnomolos
Copy link
Collaborator

This should be do-able in both PostgreSQL and MySQL without too much difficulty (while still being transaction-safe) but I'm not sure about sqlite3 (see http://stackoverflow.com/questions/6242756/how-to-retrieve-inserted-id-after-inserting-row-in-sqlite-using-python for a python example). I'll investigate and see what I can come up with :)

@olivierlacan
Copy link
Contributor

Anyone still interested in working on this?

@pnomolos
Copy link
Collaborator

@olivierlacan We need this for at work so it's on the roadmap, yes :)

@olivierlacan
Copy link
Contributor

@pnomolos Checking back in since this is a source of performance issues for us still.

@pnomolos
Copy link
Collaborator

@olivierlacan Yes, I'm going to try and get it in once 3.0 is released, but work has been crazy the last while so I haven't had much time. I was trying to get 3.0 pushed out over Hacktober but you see how well that went 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants