Open nareshkbohra opened 2 months ago
Same thing do work if you are running query directly on connection.
Edit: This is also failing, had an issue with script.
The issue is not that sqlite quote functions aren't supported. This is evident from the fact that cursor.execute("SELECT QUOTE(name) FROM user;")
is not failing. The issue is with the fetchall
function. Specifically, fetchall tries to deserialize each value of a row based on the column_type
seen in the response. The problem with that is, according to HRANA protocol, column_type
will be null, if the column is not a table column but the result of some expression (possibly on the table column).
The fix for this is rather than using the column_type, get the libsql::Value
and deserialize directly based on it's type.
Also worth noting is that, this issue is only seen in case of remote db connections and not with in-memory or local replica connections.
I am trying to setup django with client but as django uses QUOTE function, this is being interpreted as invalid column type.
Small repro is here:
Same thing work in sqlite3: