change 'cache' to 'searchtable' in database
This commit is contained in:
parent
547e5824e9
commit
47eed18958
1 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
(** Init script for the SQLite database. **)
|
||||
let inits = "\
|
||||
DROP TABLE IF EXISTS elements; \
|
||||
DROP TABLE IF EXISTS cache; \
|
||||
DROP TABLE IF EXISTS searchtable; \
|
||||
CREATE TABLE elements ( \
|
||||
num INTEGER PRIMARY KEY NOT NULL, \
|
||||
symb TEXT UNIQUE NOT NULL, \
|
||||
|
@ -11,7 +11,7 @@ let inits = "\
|
|||
oxidation TEXT, state TEXT, \
|
||||
melting FLOAT, boiling FLOAT, density FLOAT, \
|
||||
block TEXT, discovered INTEGER) WITHOUT ROWID; \
|
||||
CREATE TABLE cache ( \
|
||||
CREATE TABLE searchtable ( \
|
||||
name TEXT PRIMARY KEY NOT NULL, \
|
||||
dat BLOB NOT NULL) WITHOUT ROWID; \
|
||||
"
|
||||
|
@ -84,6 +84,6 @@ let makedb db json = let open Sqlite3
|
|||
let stmt = "INSERT INTO cache VALUES (:name, :cache);"
|
||||
|> prepare db
|
||||
in
|
||||
do_model stmt "symbs" !symbs;
|
||||
do_model stmt "names" !names;
|
||||
do_model stmt "symb" !symbs;
|
||||
do_model stmt "name" !names;
|
||||
finalize stmt |> Rc.check
|
||||
|
|
Loading…
Reference in a new issue