3 ms·
Before doing the select I would probably want to show the schema. Since the JSON could be arbitrarily complex... How would I do that?
by mongol 5y ago
Before doing the select I would probably want to show the schema. Since the JSON could be arbitrarily complex... How would I do that?
- simonw 5y agoGood point, I should add that to the docs. You can see the schema in a couple of ways: sqlite-utils memory blah.json "select sql from sqlite_master" Or sqlite-utils memory blah.json --dump The second option will dump out both the SQL schema and the INSERT statements, so you probably want to | head that. You've inspired me to add a --schema option which does the dump without also including the inserted rows. Issue here: https://github.com/simonw/sqlite-utils/issues/288 https://github.com/simonw/sqlite-utils/issues/288