Skip to content

Commit 5a55977

Browse files
ymc9claude
andcommitted
fix(orm): allow Infinity for slowQueryMaxRecords validation
z.int().nonnegative() rejects Infinity. Use .or(z.literal(Infinity)) to accept both nonnegative integers and Infinity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 24089de commit 5a55977

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/orm/src/client/client-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class ClientImpl {
136136
if (options.diagnostics) {
137137
const diagnosticsSchema = z.object({
138138
slowQueryThresholdMs: z.number().nonnegative().optional(),
139-
slowQueryMaxRecords: z.int().nonnegative().optional(),
139+
slowQueryMaxRecords: z.int().nonnegative().or(z.literal(Infinity)).optional(),
140140
});
141141
const parseResult = diagnosticsSchema.safeParse(options.diagnostics);
142142
if (!parseResult.success) {

0 commit comments

Comments
 (0)