From b70511f47b585105b5d49734de56ac04361d4682 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Fri, 13 Aug 2021 17:26:49 -0400 Subject: [PATCH] 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. --- makedb.ml | 1 + 1 file changed, 1 insertion(+) 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)