module Hasql.Core.Protocol.Parse.Values where
import Hasql.Prelude hiding (fail)
import Ptr.Parse
import Hasql.Core.Protocol.Parse.Primitives
int4 :: Parse Int32
int4 =
fmap fromIntegral beWord32
int8 :: Parse Int64
int8 =
fmap fromIntegral beWord64
float4 :: Parse Float
float4 =
unsafeCoerce beWord32
float8 :: Parse Double
float8 =
unsafeCoerce beWord64
bool :: Parse Bool
bool =
fmap (== 1) word8
text :: Parse Text
text =
$(todo "text")
bytea :: Parse ByteString
bytea =
$(todo "bytea")
intTimestamptz :: Parse UTCTime
intTimestamptz =
$(todo "intTimestamptz")
floatTimestamptz :: Parse UTCTime
floatTimestamptz =
$(todo "floatTimestamptz")