From c819b3052b59ba1b9c6ff9203e6e5457bf060b29 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Sun, 8 Aug 2021 23:24:34 -0400 Subject: [PATCH] makedb: add cache table --- makedb.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/makedb.ml b/makedb.ml index 11d6a9d..f090686 100644 --- a/makedb.ml +++ b/makedb.ml @@ -1,7 +1,8 @@ (** Init script for the SQLite database. **) let inits = "\ DROP TABLE IF EXISTS elements; \ - CREATE TABLE elements (\ + DROP TABLE IF EXISTS cache; \ + CREATE TABLE elements ( \ num INTEGER PRIMARY KEY NOT NULL, \ symb TEXT UNIQUE NOT NULL, \ name TEXT UNIQUE NOT NULL, mass FLOAT, \ @@ -10,6 +11,9 @@ let inits = "\ oxidation TEXT, state TEXT, \ melting FLOAT, boiling FLOAT, density FLOAT, \ block TEXT, discovered INTEGER) WITHOUT ROWID; \ + CREATE TABLE cache ( \ + name TEXT PRIMARY KEY NOT NULL, \ + dat BLOB NOT NULL) WITHOUT ROWID; \ " (** Converts the column data in the PubChem JSON file to