outerbase / libsql-studio

A lightweight SQLite graphical client on your browser. It also support connecting to LibSQL/Turso/rqlite
https://libsqlstudio.com
MIT License
321 stars 19 forks source link

Feature Request: highlight datatype conflicts in SQLite #138

Open rentalhost opened 1 month ago

rentalhost commented 1 month ago

(Following #137)

SQLite’s flexibility with column datatypes is nice, but it can sometimes be confusing when the actual datatype doesn’t match the column type. For example, a column might be set to INTEGER, but the stored data is a REAL. It would be awesome if there was a little visual indicator, like a small marker in the top right corner of the cell, to show when this happens.

When you hover over the marker, it could show a tooltip saying something like, "Expected type: INTEGER, received: REAL." This would give users a quick heads-up when there’s a type mismatch, making it easier to spot and deal with.

image

This can happen on several occasions. In practice, SQLite only officially supports 4 data types (plus NULL, which is not a "pure type"): INTEGER (123), REAL (1.23), TEXT ("abc") and BLOB (X'616263', binary for "abc").

Thanks for considering this!

invisal commented 1 month ago

Nice idea. It shouldn't hard to add. Let me take a look.