typeorm
typeorm copied to clipboard
Create query builder with "with" clause in Postgres
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?
Duplicate of #1116
I'm also looking into how to use with (recursive) with the QueryBuilder.
Duplicate of #1116