tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.

Home Page:https://turso.tech/libsql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

column names differ from what sqlite would produce, confusing clients.

glommer opened this issue · comments

Ref: fermyon/feedback#52

the issue is that the column names we produce are different than what sqlite produces. This can lead to confusing behavior if the user tries to get the columns by name.

For the query "select count(*) from foo", we receive the query as-is:

2024-04-19T00:02:07.626840Z DEBUG request{method=POST uri=/v2/pipeline version=HTTP/1.1}: libsql_server::hrana::http: pipeline:{ Hrana2, Execute(ExecuteStreamReq { stmt: Stmt { sql: Some("select count(*) from foo"), sql_id: None, args: [], named_args: [], want_rows: Some(true), replication_index: Some(1) } }) }

when it is time to execute_query, we produce:

2024-04-19T00:02:07.627181Z DEBUG libsql_server::connection::program: executing query: SELECT count (*) FROM foo;

Somewhere in the query parsing we end up adding a space.