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

Update with Join not support on query builder? #8542

Open
6unpk opened this issue Jan 19, 2022 · 2 comments
Open

Update with Join not support on query builder? #8542

6unpk opened this issue Jan 19, 2022 · 2 comments

Comments

@6unpk
Copy link

6unpk commented Jan 19, 2022

Feature Description

join on update query

The Problem

It seems typeorm has no join feature. So, i checked UpdateQueryBuilder.ts and there are no join method. Is there are any reason for not exisiting join feature on update query builder? For some databases, they supports join feature on update.

The Solution

hope it works on query builder

this.repository.creatQueryBuilder()
.update()
.join()
.where();

Relevant Database Driver(s)

DB Type Relevant
aurora-data-api no
aurora-data-api-pg no
better-sqlite3 no
cockroachdb no
cordova no
expo no
mongodb no
mysql yes
nativescript no
oracle yes
postgres yes
react-native no
sap no
sqlite no
sqlite-abstract no
sqljs no
sqlserver no

Are you willing to resolve this issue by submitting a Pull Request?

  • ✅ Yes, I have the time, and I know how to start.
  • ✖️ Yes, I have the time, but I don't know how to start. I would need guidance.
  • ✖️ No, I don’t have the time, but I can support (using donations) development.
  • ✖️ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
@Ginden
Copy link
Collaborator

Ginden commented Jan 19, 2022

Related issue: #8538

Interfaces should be similar.

If CTEs got merged, only from(alias, whereClause) without joins would be necessary (though, joins would be still nice).

SQLite allows UPDATE FROM too: https://www.sqlite.org/lang_update.html

@barnabycollins-s2z
Copy link

Any updates on this?

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

No branches or pull requests

3 participants