Skip to content

feat(qc): parameterize in and notIn scalar list filters#5734

Merged
graphite-app[bot] merged 1 commit intomainfrom
aqrln-wuuzunwxxymx
Jan 28, 2026
Merged

feat(qc): parameterize in and notIn scalar list filters#5734
graphite-app[bot] merged 1 commit intomainfrom
aqrln-wuuzunwxxymx

Conversation

@aqrln
Copy link
Member

@aqrln aqrln commented Jan 19, 2026

Enable parameterization of the in and notIn filter fields, allowing queries like:

prisma.user.findMany({ where: { id: { in: $ids } } })

Where $ids is a placeholder representing an entire list of values.

Changes:

  1. Fix filter parsing for placeholders. Currently in/notIn with placeholders is not handled and reaches the fallback branch that panics.

  2. Fix a bug in sql-query-builder where NotInTemplate with placeholder is translated to IN operator instead of NOT IN. The InTemplate branch has already been used by in-memory joins but the opposite branch wasn't previously used so this bug went unnoticed.

  3. Mark in/notIn as parameterizable.

Copy link
Member Author

aqrln commented Jan 19, 2026

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 19, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing aqrln-wuuzunwxxymx (1ee2b71) with aqrln-kyxlvlrlzwzx (ca7749b)

Summary

✅ 11 untouched benchmarks
⏩ 11 skipped benchmarks1

Footnotes

  1. 11 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

Wasm Query Compiler File Size

Engine This PR Base branch Diff
Postgres 3.463MiB 3.462MiB 436.000B
Postgres (gzip) 1.131MiB 1.131MiB -404.000B
Postgres (size-optimized) 1.741MiB 1.741MiB 306.000B
Postgres (size-optimized, gzip) 684.326KiB 684.357KiB -32.000B
Mysql 3.416MiB 3.415MiB 435.000B
Mysql (gzip) 1.113MiB 1.113MiB 395.000B
Mysql (size-optimized) 1.711MiB 1.710MiB 306.000B
Mysql (size-optimized, gzip) 673.508KiB 673.512KiB -4.000B
Sqlite 3.336MiB 3.336MiB 435.000B
Sqlite (gzip) 1.086MiB 1.086MiB 49.000B
Sqlite (size-optimized) 1.666MiB 1.666MiB 306.000B
Sqlite (size-optimized, gzip) 656.780KiB 657.053KiB -280.000B
SQL Server 3.558MiB 3.557MiB 436.000B
SQL Server (gzip) 1.148MiB 1.148MiB 100.000B
SQL Server (size-optimized) 1.742MiB 1.742MiB 341.000B
SQL Server (size-optimized, gzip) 687.867KiB 687.974KiB -110.000B
CockroachDB 3.513MiB 3.513MiB 436.000B
CockroachDB (gzip) 1.149MiB 1.149MiB -26.000B
CockroachDB (size-optimized) 1.765MiB 1.764MiB 306.000B
CockroachDB (size-optimized, gzip) 694.697KiB 694.562KiB 138.000B

@graphite-app
Copy link

graphite-app bot commented Jan 28, 2026

Merge activity

Enable parameterization of the `in` and `notIn` filter fields, allowing queries like:
```typescript
prisma.user.findMany({ where: { id: { in: $ids } } })
```

Where `$ids` is a placeholder representing an entire list of values.

Changes:

1. Fix filter parsing for placeholders. Currently `in`/`notIn` with placeholders is not handled and reaches the fallback branch that panics.

2. Fix a bug in `sql-query-builder` where `NotInTemplate` with placeholder is translated to `IN` operator instead of `NOT IN`. The `InTemplate` branch has already been used by in-memory joins but the opposite branch wasn't previously used so this bug went unnoticed.

3. Mark `in`/`notIn` as parameterizable.
@graphite-app graphite-app bot force-pushed the aqrln-kyxlvlrlzwzx branch from a723411 to ca7749b Compare January 28, 2026 13:34
@graphite-app graphite-app bot force-pushed the aqrln-wuuzunwxxymx branch from fa74f5a to 1ee2b71 Compare January 28, 2026 13:35
Base automatically changed from aqrln-kyxlvlrlzwzx to main January 28, 2026 15:37
@graphite-app graphite-app bot merged commit 1ee2b71 into main Jan 28, 2026
97 checks passed
@graphite-app graphite-app bot deleted the aqrln-wuuzunwxxymx branch January 28, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments