rogerbinns / apsw

Another Python SQLite wrapper
https://rogerbinns.github.io/apsw/
Other
715 stars 96 forks source link

format_query_table shorter numeric representation #500

Closed rogerbinns closed 2 weeks ago

rogerbinns commented 7 months ago

This is unhelpful:

┌───────┬─────────────────────────┬──────────────────────┬────────────────┐
│ rowid │          rank           │          c1          │       c2       │
│ 2     │ -3.1428571428571425e-06 │ cherry cherry cherry │ date date date │
└───────┴─────────────────────────┴──────────────────────┴────────────────┘

Large integers probably have the same issue where we may want 3b instead of 3023432492

rogerbinns commented 2 weeks ago

Not going to do this because it becomes difficult to know when the precision matters and when it doesn't. The round function can be used by the caller for a more compact value.