outerbase / studio

A lightweight SQLite graphical client on your browser. It also support connecting to LibSQL/Turso/rqlite
https://libsqlstudio.com
GNU Affero General Public License v3.0
466 stars 23 forks source link

Feature Request: highlight datatype conflicts in SQLite #138

Open rentalhost opened 3 months ago

rentalhost commented 3 months 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 3 months ago

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