Skip to content

Commit b91acc9

Browse files
committed
Improved Prisma test [skip ci]
1 parent 71526e3 commit b91acc9

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

tests/prisma/index.test.mjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ test('halfvec', async () => {
4343
test('bit', async () => {
4444
const prisma = new PrismaClient();
4545

46-
// TODO use create when possible (field is not available in the generated client)
47-
// https://www.prisma.io/docs/concepts/components/prisma-schema/features-without-psl-equivalent#unsupported-field-types
48-
const embedding1 = '000';
49-
const embedding2 = '101';
50-
const embedding3 = '111';
51-
await prisma.$executeRaw`INSERT INTO prisma_items (binary_embedding) VALUES (${embedding1}::varbit), (${embedding2}::varbit), (${embedding3}::varbit)`;
46+
await prisma.item.createMany({
47+
data: [
48+
{binary_embedding: '000'},
49+
{binary_embedding: '101'},
50+
{binary_embedding: '111'}
51+
]
52+
});
5253

5354
// TODO use raw orderBy when available
5455
// https://github.com/prisma/prisma/issues/5848

0 commit comments

Comments
 (0)