chef / sqerl

General purpose RDBMS abstraction layer
Apache License 2.0
42 stars 18 forks source link

Jc/ca 531/timestamp transformers #73

Closed jamesc closed 10 years ago

jamesc commented 10 years ago

Epgsql expects a timestamp to come an erlang_time() tuple. This transform was converting that to an invalid tagged-tuple of form {datetime, erlang_time()}.

There was a bug in the transform (using _M for both month and minute) that meant it only pattern matched on certain cases (when month == minute) meaning it appeared as an intermittent error, causing a badmatch in pgsql pgsql_idatetime:date2j/1.

This PR just removes the bad transform completely since it's the wrong thing to do.

cc @PrajaktaPurohit , @seth

0x00b1 commented 10 years ago

seth commented 10 years ago

+1

(wouldn't mind if you squashed the test changed into one commit) But fine as-is.