-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
OUTPUT/RETURNING Clause Support for Inserts/Updates/Deletes #133
Comments
Yes planned for the the v1.1, but the example you posted cannot be accomplished as is, since the Query Builder does not have any information about the table |
i think the given example is complete enough, since we can assume that the programmer stores the and anyway |
It should be easy enough to do something like this passing in the requested column (or columns) return db.Query(table).Output("ID").Output("Name").Insert(); Would be great to have this in my current project. |
This would be useful when deleting rows and wanting information about the deleted rows. Right now I have a workaround of selecting and then deleting in another query. It works, but it's slower since it makes 2 calls to the database. Definitely would be a great feature to add. |
Closing this duplicate of #8 |
Hi, why is this not a priority? |
Yeah, working with |
Is there any news on getting this put into the live published NuGet package? Having the OUTPUT function on SqlServer would be a massive help especially as people move away from using autoincremented Id fields to Unique Identifiers |
for anyone else watching as far as I can tell this done in this PR: #372 unfortunately it shows no signs of getting merged |
Is there any plan on supporting
OUTPUT
(SQL Server) orRETURNING
(PostgresQL) clauses for mutations? This would, for example, allow me to fetch the GUIDs that were inserted:Example in SQL Server Dialect that also includes the name as well just to show that it can be a full result set with multiple fields and rows:
Example output
The text was updated successfully, but these errors were encountered: