From: Justin B. <jgb...@gm...> - 2009-09-28 16:59:59
|
On Mon, Sep 28, 2009 at 9:26 AM, Colin Paul Adams <co...@co...> wrote: > Which of the following will HaskellDB be using to CalendarTimeT with > sqlite-HDBC? > The type used is not determined by HaskellDB. Your application determines the type it expects, and the appropriate Convertible instance is selected. If that doesn't make sense, what I mean is the type signature of your result determines the type to which the value will be converted. For example, if your function is named "getTimestampRows", you can control the type converted to via it's signature: getTimestampRows :: IO [Record (Col1 (Expr Day)) ... )] or getTimestampRows :: IO [Record (Col1 (Expr ZonedTime)) ... )] or getTimestampRows :: IO [Record (Col1 (Expr UTCTime)) ... )] Does that help? > SqlLocalDate Day Local YYYY-MM-DD (no timezone) > SqlLocalTimeOfDay TimeOfDay Local HH:MM:SS (no timezone) > SqlZonedLocalTimeOfDay TimeOfDay TimeZone Local HH:MM:SS -HHMM. Converts to and from (TimeOfDay, TimeZone). > SqlLocalTime LocalTime Local YYYY-MM-DD HH:MM:SS (no timezone) > SqlZonedTime ZonedTime Local YYYY-MM-DD HH:MM:SS -HHMM. Considered equal if both convert to the same UTC time. > SqlUTCTime UTCTime UTC YYYY-MM-DD HH:MM:SS > SqlDiffTime NominalDiffTime Calendar diff between seconds. Rendered as Integer when converted to String, but greater precision may be preserved for other types or to underlying database. > SqlPOSIXTime POSIXTime Time as seconds since midnight Jan 1 1970 UTC. Integer rendering as for SqlDiffTime. > SqlEpochTime Integer DEPRECATED Representation of ClockTime or CalendarTime. Use SqlPOSIXTime instead. > SqlTimeDiff Integer DEPRECATED Representation of TimeDiff. Use > SqlDiffTime instead. > > -- > Colin Adams > Preston Lancashire > |