tursodatabase / libsql-shell-go

7 stars 7 forks source link

Feature parity: Fixes BLOB read #30

Closed luisfvieirasilva closed 1 year ago

luisfvieirasilva commented 1 year ago

libsql-shell

→  create table alltypes (t text, i integer, r real, b blob)

→  insert into alltypes values ("text", 99, 3.14, x'0123456789ABCDEF')

→  select * from alltypes
Error: sql: Scan error on column index 3, name "b": unsupported Scan, storing driver.Value type map[string]interface {} into type *string

turso db shell

select * from alltypes;
T     I   R     B            
text  99  3.14  ASNFZ4mrze8

Related iku-turso-cli issue here

Just as a note: sqlite3

sqlite> create table alltypes (t text, i integer, r real, b blob);
sqlite> insert into alltypes values ("text", 99, 3.14, x'0123456789ABCDEF');
sqlite> select * from alltypes;
text|99|3.14|#Eg
StefanoSaffran commented 1 year ago

After discussing this feature, we came to the conclusion that it is best left as it is, showing as a hex string rather than base64.