mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-07 04:12:59 +00:00
fix example code
This commit is contained in:
@@ -47,13 +47,11 @@ const db = await lancedb.connect({
|
||||
// create a new table
|
||||
const tableName = "my_table"
|
||||
const table = await db.createTable(tableName,
|
||||
[
|
||||
{ id: 1, vector: [0.1, 1.0], item: "foo", price: 10.0 },
|
||||
{ id: 2, vector: [3.9, 0.5], item: "bar", price: 20.0 }
|
||||
]
|
||||
[
|
||||
{ id: 1, vector: [0.1, 1.0], item: "foo", price: 10.0 },
|
||||
{ id: 2, vector: [3.9, 0.5], item: "bar", price: 20.0 }
|
||||
]
|
||||
)
|
||||
[{ id: 1, vector: [0.1, 1.0], item: "foo", price: 10.0 },
|
||||
{ id: 2, vector: [3.9, 0.5], item: "bar", price: 20.0 }])
|
||||
// list the table
|
||||
const tableNames_1 = await db.tableNames('')
|
||||
// add some data and search should be okay
|
||||
|
||||
Reference in New Issue
Block a user