tursodatabase / libsql-client-go

Go client API for libSQL
MIT License
166 stars 23 forks source link

fix: http return int64 for int column #31

Closed Mr-Destructive closed 1 year ago

Mr-Destructive commented 1 year ago

fixes: #28

Have added a check for the type of value in the Next method, it will only cast true integers to int64 which have been set as float64 as a bug.

Will it be sufficient to handle all the cases? I am new to the repository, so I have tested with a local connection to the libsql database and it does convert the value to int.

Let me know for any other improvements that can be added, or is this a valid fix? Thank you

haaawk commented 1 year ago

Hi @Mr-Destructive, thank you for your contribution but this is not the right way of fixing the problem. To fix it properly we have to look on the expected type of result and cast accordingly.