Commit Graph

16 Commits

Author SHA1 Message Date
Peter McGoron 87f446b8c9 add searching by element name 2021-08-13 19:18:26 -04:00
Peter McGoron b70511f47b 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.
2021-08-13 17:30:37 -04:00
Peter McGoron 87acf106bf Use lowercase for all element names and symbols
The matching algorithm will work better when all names are normalized.
For instance, a search of "iorn" will not list "iron" in the first
three matches, but a search of "Iorn" will have "iron" as the first
match.
2021-08-13 17:14:38 -04:00
Peter McGoron 905e5a933b makedb: fix "searchtable" being refered to its old name "cache" 2021-08-13 17:08:12 -04:00
Peter McGoron 51c5604f69 makedb: split newlines for each value and parameter 2021-08-13 16:53:57 -04:00
Peter McGoron 64b934f390 use Arg.bad instead of Failure exception when positional atomic number arguments 2021-08-13 15:46:13 -04:00
Peter McGoron 21f92ff9a2 add documentation; add search over atomic number 2021-08-13 15:39:55 -04:00
Peter McGoron 47eed18958 change 'cache' to 'searchtable' in database 2021-08-10 10:22:05 -04:00
Peter McGoron 547e5824e9 generate database from command line arguments 2021-08-10 10:06:31 -04:00
Peter McGoron d56e771887 add command line arguments parser 2021-08-10 09:21:23 -04:00
Peter McGoron 33171d2bd2 makedb: properly add cache 2021-08-08 23:37:12 -04:00
Peter McGoron 6173675677 makedb: make cached automaton 2021-08-08 23:33:17 -04:00
Peter McGoron f0d3f226e6 makedb: finalize stmt 2021-08-08 23:33:16 -04:00
Peter McGoron c819b3052b makedb: add cache table 2021-08-08 23:33:16 -04:00
Peter McGoron b3fa112da3 use sqlite to store table 2021-08-08 23:33:15 -04:00
Peter McGoron 38ea6c6ba0 preprocess periodic table data 2021-08-08 23:33:12 -04:00