Skip to content

Commit 28a5ed8

Browse files
committed
Updated examples for latest Bun
1 parent d1ea0a7 commit 28a5ed8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ const newItems = [
706706
{embedding: pgvector.toSql([1, 2, 3])},
707707
{embedding: pgvector.toSql([4, 5, 6])}
708708
];
709-
await sql`INSERT INTO items (embedding) ${sql(newItems)}`;
709+
await sql`INSERT INTO items ${sql(newItems)}`;
710710
```
711711

712712
Get the nearest neighbors to a vector

examples/bun/example.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ await sql`CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3))`;
1010
const item = {
1111
embedding: pgvector.toSql([1, 2, 3])
1212
};
13-
await sql`INSERT INTO items (embedding) ${sql(item)}`;
13+
await sql`INSERT INTO items ${sql(item)}`;
1414

1515
const items = [
1616
{embedding: pgvector.toSql([4, 5, 6])},
1717
{embedding: pgvector.toSql([7, 8, 9])}
1818
];
19-
await sql`INSERT INTO items (embedding) ${sql(items)}`;
19+
await sql`INSERT INTO items ${sql(items)}`;
2020

2121
await sql`CREATE INDEX ON items USING hnsw (embedding vector_l2_ops)`;
2222

0 commit comments

Comments
 (0)