colindean / homebrew-size-analysis

Analyzing the size of Homebrew formulae bottles
The Unlicense
0 stars 0 forks source link

Consider using SQLite Json extraction trigger events #6

Open colindean opened 9 months ago

colindean commented 9 months ago

https://xeiaso.net/blog/sqlite-json-munge-2022-01-04/

colindean commented 9 months ago

Base cache:

CREATE TABLE IF NOT EXISTS jsonfeed_raw  (
  scrape_date  TEXT  PRIMARY KEY  DEFAULT (DATE('now')),
  raw          TEXT  NOT NULL
);

Working the jq into a select statement may get rough, though.

colindean commented 4 months ago

https://antonz.org/sqlite-generated-columns/

Could use generated columns to enable creation at insertion time.