-
Notifications
You must be signed in to change notification settings - Fork 769
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
Support for OUTPUT in t-sql #1901
Comments
thanks for the report |
Thank you Toby for the quick response. The aforementioned sample query, when transpiled using the new code, would be as follows:
However, it is necessary to remove Conversely, when returning inserted fields in T-SQL, we need to add the |
did you test it with tsql specified? |
ah i see what you're saying, when going to returning, we need to remove inserted. it doesn't seem like the prefix can be added in the other direction though because it doesn't exist |
Yes, I'm transpiling between I created a new AzureSQL class which inherits your
|
sorry, is inserted a magic keyword in tsql? |
Apologies for any misunderstandings. I am not inserting data into the table named
My understanding is that we should use the |
it's not so simple
if you're trying to convert postgres into tsql, you won't be able to know what inserted and deleted columns are |
i'm not going to support this for now, you can add a custom transform to do what you're looking for expr.transform(...) |
Thank you for the great work. I have been using this for transpiling SQL server (
tsql
) to PostgreSQL.I would like to request support for the
OUTPUT
keyword in T-SQL, which is similar to theRETURNING
keyword in PostgreSQL.For instance, when executing an
INSERT
statement like the one below, theOUTPUT
clause would return the primary key value id of the inserted row:Thank you.
The text was updated successfully, but these errors were encountered: