mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
int8 vec from text (#17)
* parse int8 vec from json format text * add small test cases for text based loading
This commit is contained in:
parent
8c418f9349
commit
e9bf355a70
2 changed files with 99 additions and 0 deletions
|
|
@ -211,6 +211,8 @@ def test_vec_int8():
|
|||
vec_int8 = lambda *args: db.execute("select vec_int8(?)", args).fetchone()[0]
|
||||
assert vec_int8(b"\x00") == _int8([0])
|
||||
assert vec_int8(b"\x00\x0f") == _int8([0, 15])
|
||||
assert vec_int8("[0]") == _int8([0])
|
||||
assert vec_int8("[1, 2, 3]") == _int8([1, 2, 3])
|
||||
|
||||
if SUPPORTS_SUBTYPE:
|
||||
assert db.execute("select subtype(vec_int8(?))", [b"\x00"]).fetchone()[0] == 225
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue