Skip to content

Commit 3090226

Browse files
jrangulodfranky47
authored andcommitted
fix: Add BigInt as supported CursorType
1 parent 0918617 commit 3090226

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/dmmf.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface DMMFModelDescriptor {
2626

2727
export type DMMFModels = Record<string, DMMFModelDescriptor> // key: model name
2828

29-
const supportedCursorTypes = ['Int', 'String']
29+
const supportedCursorTypes = ['Int', 'String', 'BigInt']
3030

3131
export function analyseDMMF(input: DMMFDocument): DMMFModels {
3232
const dmmf = dmmfDocumentParser.parse(input)
@@ -40,8 +40,8 @@ export function analyseDMMF(input: DMMFDocument): DMMFModels {
4040
field =>
4141
field.isUnique && supportedCursorTypes.includes(String(field.type))
4242
)
43-
const cursorField = model.fields.find(field =>
44-
field.documentation?.includes('@encryption:cursor')
43+
const cursorField = model.fields.find(
44+
field => field.documentation?.includes('@encryption:cursor')
4545
)
4646
if (cursorField) {
4747
// Make sure custom cursor field is valid

0 commit comments

Comments
 (0)