Skip to content

Commit c9263c6

Browse files
committed
Updated readme [skip ci]
1 parent d692f04 commit c9263c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ _ = try conn.exec("CREATE TABLE items (id bigserial PRIMARY KEY, embedding vecto
3030
Insert vectors
3131

3232
```zig
33-
const params = .{ "[1,1,1]", "[2,2,2]", "[1,1,2]" };
34-
_ = try conn.exec("INSERT INTO items (embedding) VALUES ($1), ($2), ($3)", params);
33+
const params = .{ "[1,2,3]", "[4,5,6]" };
34+
_ = try conn.exec("INSERT INTO items (embedding) VALUES ($1), ($2)", params);
3535
```
3636

3737
Get the nearest neighbors
3838

3939
```zig
40-
var result = try conn.query("SELECT id FROM items ORDER BY embedding <-> $1 LIMIT 5", .{"[1,1,1]"});
40+
var result = try conn.query("SELECT id FROM items ORDER BY embedding <-> $1 LIMIT 5", .{"[3,1,2]"});
4141
```
4242

4343
Add an approximate index

0 commit comments

Comments
 (0)