elixir-sqlite/sqlitex

Sqlitex.Row.translate_row/1 only recognizes datetime types if they have been declared all lower-case

jazzyb opened this issue · 0 comments

If tables have been created like the following:

CREATE TABLE t (key INTEGER, inserted_at DATETIME)

then the Sqlitex.Row module will not correctly translate the value in inserted_at to an Erlang datetime value because the type atom will be :DATETIME instead of :datetime. Any combination of lower and upper case letters could be valid, e.g. :DateTime or :Datetime.

I don't immediately know the best solution, but I'm opening the issue to remember to come back to it when I have the time. Of course, anyone else is welcome to fix it in the meantime ;)