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

Create query builder with "with" clause in Postgres #5149

Closed
dennbagas opened this issue Nov 27, 2019 · 3 comments
Closed

Create query builder with "with" clause in Postgres #5149

dennbagas opened this issue Nov 27, 2019 · 3 comments

Comments

@dennbagas
Copy link

dennbagas commented Nov 27, 2019

Issue type:

[*] question
[ ] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[*] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[*] latest
[ ] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

I have raw query like this:

WITH w AS (UPDATE foo SET foo_type = 'WOW' WHERE foo_uuid = 17 RETURNING "foo_uuid", "foo_paired_to", "foo_type")
SELECT bar.name, w.foo_uuid, w.foo_type
FROM bar, w
WHERE bar.id = w.foo_paired_to;

How to convert that into a query builder with typeorm?

@Ginden
Copy link
Collaborator

Ginden commented Dec 4, 2019

Duplicate of #1116

@fullofcaffeine
Copy link

I'm also looking into how to use with (recursive) with the QueryBuilder.

@imnotjames
Copy link
Contributor

Duplicate of #1116

@imnotjames imnotjames marked this as a duplicate of #1116 Oct 10, 2020
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

4 participants