Skip to content

Commit c0c21c2

Browse files
committed
revert(webapp): drop the in-list padding extension
Padding was applied to the whole Prisma args object, so it rewrote values as well as predicates: a write payload or JSON comparison value containing a field named in or notIn had its trailing element duplicated. Bounding list arity is better handled per call site, where filter context is unambiguous.
1 parent 823c46d commit c0c21c2

4 files changed

Lines changed: 2 additions & 253 deletions

File tree

.server-changes/pad-prisma-in-list-filters.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/webapp/app/db.server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { DATASOURCE_CONTEXT_KEY, startActiveSpan } from "./v3/tracer.server";
3030
import type { Span } from "@opentelemetry/api";
3131
import { context, trace } from "@opentelemetry/api";
3232
import { queryPerformanceMonitor } from "./utils/queryPerformanceMonitor.server";
33-
import { padInLists } from "./utils/padInLists.server";
3433

3534
export type {
3635
PrismaTransactionClient,
@@ -132,7 +131,7 @@ function tagDatasource<T extends PrismaClient>(datasource: "writer" | "replica",
132131
trace.getActiveSpan()?.setAttribute("db.datasource", datasource);
133132
return context.with(
134133
context.active().setValue(DATASOURCE_CONTEXT_KEY, datasource),
135-
async () => await query(padInLists(args))
134+
async () => await query(args)
136135
);
137136
},
138137
},
@@ -152,7 +151,7 @@ function tagDatasourceRunOps(
152151
trace.getActiveSpan()?.setAttribute("db.datasource", datasource);
153152
return context.with(
154153
context.active().setValue(DATASOURCE_CONTEXT_KEY, datasource),
155-
async () => await query(padInLists(args))
154+
async () => await query(args)
156155
);
157156
},
158157
},

apps/webapp/app/utils/padInLists.server.test.ts

Lines changed: 0 additions & 124 deletions
This file was deleted.

apps/webapp/app/utils/padInLists.server.ts

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)