mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 16:56:27 +02:00
test vec0 vacuums
This commit is contained in:
parent
a0c4e202f6
commit
21d442903e
1 changed files with 9 additions and 0 deletions
|
|
@ -2290,6 +2290,15 @@ def test_vec0_distance_metric():
|
||||||
{"rowid": 1, "distance": 2},
|
{"rowid": 1, "distance": 2},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def test_vec0_vacuum():
|
||||||
|
db = connect(EXT_PATH)
|
||||||
|
db.execute('create virtual table vec_t using vec0(a float[1]);')
|
||||||
|
db.execute("begin")
|
||||||
|
db.execute("insert into vec_t(a) values (X'AABBCCDD')")
|
||||||
|
db.commit()
|
||||||
|
db.execute("vacuum")
|
||||||
|
|
||||||
def rowids_value(buffer: bytearray) -> List[int]:
|
def rowids_value(buffer: bytearray) -> List[int]:
|
||||||
assert (len(buffer) % 8) == 0
|
assert (len(buffer) % 8) == 0
|
||||||
n = int(len(buffer) / 8)
|
n = int(len(buffer) / 8)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue