Summary

Use sqlite3

Debug CLI

sqlite-shell dbdt.db
> .tables // show all tables
> .schema DATALINK // show schema of DATALINK table
> select * from DATALINK;

Schema

CREATE TABLE IF NOT EXISTS datalink (
	id        INTEGER   PRIMARY KEY,
	ts        INTEGER   NOT NULL,
  direction INTEGER   NOT NULL,
	data      BLOB      NOT NULL,
	status    INTEGER   NOT NULL
);
CREATE INDEX IF NOT EXISTS datalink_hash_idx on datalink(ts);

Dev

reclaim space (from deleted): vacuum

<https://www.sqlite.org/pragma.html#pragma_auto_vacuum>