diff --git a/makedb.ml b/makedb.ml index e9adc32..6604f07 100644 --- a/makedb.ml +++ b/makedb.ml @@ -92,11 +92,12 @@ let makedb db json = let open Sqlite3 (* Bind each column name. In SQLite3 the leading ":" is part of the named parameter. *) in let prep i x = - (match colarr.(i) with - | "Symbol" -> symbs := (x,None)::!symbs - | "Name" -> names := (x,None)::!names - | _ -> () - ); + let lcase = String.lowercase_ascii + in let x = (match colarr.(i) with + | "Symbol" -> symbs := (lcase x,None)::!symbs; lcase x + | "Name" -> names := (lcase x,None)::!names; lcase x + | _ -> x + ) in binds stmt colarr.(i) (if x = "" then Data.NULL else Data.TEXT x)