-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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 alias in insert into #4003
Comments
To confirm, you mean |
@tonyxiao yes, thanks for pointing this out, I've updated the issue to include that explicit statement example. |
Oh! i was looking for exactly this feature :'( |
any updates? |
not having this makes the |
zbarbuto
added a commit
to NextFaze/typeorm
that referenced
this issue
Mar 24, 2022
zbarbuto
added a commit
to NextFaze/typeorm
that referenced
this issue
Mar 24, 2022
zbarbuto
added a commit
to NextFaze/typeorm
that referenced
this issue
Mar 24, 2022
zbarbuto
added a commit
to NextFaze/typeorm
that referenced
this issue
Mar 24, 2022
7 tasks
zbarbuto
added a commit
to NextFaze/typeorm
that referenced
this issue
Mar 24, 2022
zbarbuto
added a commit
to NextFaze/typeorm
that referenced
this issue
Mar 24, 2022
pleerock
pushed a commit
that referenced
this issue
Mar 26, 2022
M-TGH
pushed a commit
to TradeCast/typeorm
that referenced
this issue
Mar 29, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type:
[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue
Database system/driver:
[x]
postgres
PostgreSQL supports alias in INSERT INTO statement since v9.5, eg.
INSERT INTO "tablename" as "alias"
(https://www.postgresql.org/docs/9.5/sql-insert.html). It would be nice to be able to use that in insert query builder.Our use case is incrementing a counter using
INSERT ... ON CONFLICT
statement and using table prefixes at the same time. eg:v1_
is our prefix here and it shouldn't have to be hardcoded in the query. I think we can workaround this by usingthis.manager.connection.driver.options.entityPrefix
but I think that using explicit alias would be clearer.The text was updated successfully, but these errors were encountered: