livebook-dev / kino_db

Database integrations for Livebook
Apache License 2.0
40 stars 16 forks source link

Rendered cell rounds up large numbers in SQL query when copying/selecting #79

Closed code-shoily closed 1 month ago

code-shoily commented 1 month ago

I was running a query the had results as bigints. The table cells rendered fine. But as I copied the number, I saw the last two digits were 00.

To make a reproduction easier, I have stripped my query and it is now:

a_number = 387_794_919_168_006_419

Ecto.Adapters.SQL.query!(
  Repo,
  "SELECT $1::bigint",
  [a_number]
)

The result should have been 387_794_919_168_006_419 but when I copy/paste it, it becomes 387_794_919_168_006_400

(The ,-s were slightly annoying but that's fine I guess, or maybe I could turn it off but I didn't know about it)

I am attaching screenshots below:

The rendered table (This is fine)

Screenshot 2024-09-27 at 2 03 37 PM

As I double clicked the cell to copy it

Screenshot 2024-09-27 at 2 03 52 PM
code-shoily commented 1 month ago

My bad. I was using an older version of kino_db. Closing this with apologies.