feat(qc): support the `relationJoins` preview feature (#5374)
Added support for the `relationJoins` preview feature for QC.
The test schema for query compiler snapshot tests was updated to include
the `relationJoins` preview feature, so the `"relationLoadStrategy":
"query"` argument was added to most queries that perform joins to keep
the previous behaviour. New tests that should use the native joins have
the explicit `"relationLoadStrategy": "join"` argument for clarity.
Query engine tests always run with all preview feature enabled,
including `relationJoins`, which makes the native joins the default when
running those tests. To test the old `query` strategy which is actually
used by most of our users on CI, we have an environment variable called
`PRISMA_RELATION_LOAD_STRATEGY` to override that. Since we can't read
that env var at test time from within WebAssembly, the logic was changed
to also check its value at compile time.
New make targets were added to compile and test the query compiler with
the pg adapter:
* `make dev-pg-qc-query`
* `make dev-pg-qc-join`
* `make test-pg-qc-query`
* `make test-pg-qc-join`
Fail/skip lists were converted to directories with separate files per
each relation load strategy.
Closes:
https://linear.app/prisma-company/issue/ORM-786/support-relationjoins-preview-feature-for-postgresql
Refs: https://github.com/prisma/prisma/pull/27213
Co-authored-by: Alexey Orlenko <alex@aqrln.net>
Co-authored-by: Viktor Ferenczi <ferenczi@prisma.io>