Minimal, Reproducible Example for prisma/prisma#6337
- Clone and install dependencies
git clone git@github.com:hehex9/prisma-6337.git
cd prisma-6337
yarn // or npm install
- Create the database
npx prisma migrate dev --name init
npx prisma db seed --preview-feature
- Run the script
node dev.js
Tables: FooInt/FooBigInt
id | score ↓ |
---|---|
3 | 3 |
2 | 2 |
1 | 1 |
const args = {
cursor: {id: 2},
orderBy: [{score: 'desc'}],
}
// await prisma.[fooInt|fooBigInt].findMany(args)
Int (score desc):
[ { id: 2, score: 2 }, { id: 1, score: 1 } ]
BigInt (score desc):
[ { id: 2n, score: 2 }, { id: 1n, score: 1 } ]
BigInt (id desc):
[ { id: 2n, score: 2 }, { id: 1n, score: 1 } ]
Int (score desc):
[ { id: 2, score: 2 }, { id: 1, score: 1 } ]
BigInt (score desc):
[]
BigInt (id desc):
[ { id: 2n, score: 2 }, { id: 1n, score: 1 } ]