sqlite-viewer-vscode
sqlite-viewer-vscode copied to clipboard
Feature request: generated column support
CREATE TABLE foo (
real_column TEXT,
gen_column NUMERIC AS (json_extract(real_column, '$.foo'))
);
INSERT INTO foo (real_column) VALUES ('{"foo":42}');
SELECT * FROM foo;
This is valid SQLite, but the viewer only displays the “physical” columns and not the “generated” ones. They should be searchable, sortable, etc. just like physical columns, with the obvious exception that they are read-only and other limitations described in the linked page. Note generated columns can be either virtual or stored.
Interesting. The UI is currenlty based on pragma_table_info
, it might be that generated columns aren't in there.
I want to move away from that model anyway to make joins, views, and query runner work, but probably gonna take awhile.
Actually, this was a one character fix. SQLite has a pragma_table_xinfo
table that includes generated columns. Shipped as v0.4.14.
Please consider leaving a 5-star review at https://marketplace.visualstudio.com/items?itemName=qwtel.sqlite-viewer&ssr=false#review-details