Fork me on GitHub
#sql
<
2017-10-03
>
iarebatman15:10:23

I'm having a little trouble with hugsql and was hoping somewhat might be able to tell me if I'm doing something wrong or if I've encountered a bug I need to report/look into.

iarebatman15:10:29

I have a postgres table with 2 timestamptz fields that allows NULLs. On the hugsql side, one of the fields maps to basically {:timestamp_1 ...} while the other one maps to {:sub {:timestamp_2}}

iarebatman15:10:22

:timestamp_1 properly inserts a NULL, but :timestamp_2 throws a Parameter Mismatch exception

iarebatman15:10:52

I'm accessing timestamp_1 via :timestamp_1 in my .sql file, and timestamp_2 via :sub.timestamp_2 - so I don't believe it's a simple mistake on my part - as I'm doing this for other field types just fine

iarebatman16:10:11

Is that something anyone has ran into?