aboutsummaryrefslogtreecommitdiffstats
path: root/makedb.ml
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2021-08-13 17:26:49 -0400
committerGravatar Peter McGoron 2021-08-13 17:30:37 -0400
commitb70511f47b585105b5d49734de56ac04361d4682 (patch)
tree85b0970ea81663010ca521628c7da94a637aa85d /makedb.ml
parentUse lowercase for all element names and symbols (diff)
store NULL when an element's discovery year is "Ancient"
The only elements that do not have a discovery year are those that have been known for about as long as we have historical records. It is highly unlikely that we will discover a new element that will not have a definite year of discovery, so NULL can be used to refer to elements so old nobody knows who discovered it first.
Diffstat (limited to 'makedb.ml')
-rw-r--r--makedb.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/makedb.ml b/makedb.ml
index 6604f07..dadbdf0 100644
--- a/makedb.ml
+++ b/makedb.ml
@@ -96,6 +96,7 @@ let makedb db json = let open Sqlite3
in let x = (match colarr.(i) with
| "Symbol" -> symbs := (lcase x,None)::!symbs; lcase x
| "Name" -> names := (lcase x,None)::!names; lcase x
+ | "YearDiscovered" -> if x = "Ancient" then "" else x
| _ -> x
) in
binds stmt colarr.(i)