buggins / ddbc

DDBC is DB Connector for D language (similar to JDBC)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

null Date, DateTime, or SysTime default to 0001-Jan-01

SingingBush opened this issue · comments

If we have to default to something, the current time would be a better option for defaulting to. Really though it would be better to for the value to be null if that's what is in the database.

After doing some work on this I found that even if we return null both DateTime and SysTime will use 0001-Jan-01 so it either we should use Clock.currTime() to make sure it does something that's more likely to be useful or simply throw a SQLException.
I've decided to go for using currTime and will push changes once tests working in all drivers