databrary-1: Databrary

Safe HaskellNone
LanguageHaskell2010

Model.Offset

Synopsis

Documentation

newtype Offset Source #

Constructors

Offset 

Fields

Instances

Eq Offset Source # 

Methods

(==) :: Offset -> Offset -> Bool #

(/=) :: Offset -> Offset -> Bool #

Fractional Offset Source # 
Num Offset Source # 
Ord Offset Source # 
Read Offset Source #

Read Offset from a colon delimited time string

Real Offset Source # 
RealFrac Offset Source # 

Methods

properFraction :: Integral b => Offset -> (b, Offset) #

truncate :: Integral b => Offset -> b #

round :: Integral b => Offset -> b #

ceiling :: Integral b => Offset -> b #

floor :: Integral b => Offset -> b #

Show Offset Source #

Display Offset using colon delimited time format

ToJSON Offset Source #

Format offset value for inclusion in a JSON object. Use the millisecond integer representation

FromJSON Offset Source #

Extract from JSON value. Accept integer milliseconds, time colon formatted string, or false (0)

PGParameter "interval" Offset Source # 

Methods

pgEncode :: PGTypeName "interval" -> Offset -> PGTextValue #

pgLiteral :: PGTypeName "interval" -> Offset -> ByteString #

pgEncodeValue :: PGTypeEnv -> PGTypeName "interval" -> Offset -> PGValue #

PGColumn "interval" Offset Source # 

Methods

pgDecode :: PGTypeName "interval" -> PGTextValue -> Offset #

pgDecodeBinary :: PGTypeEnv -> PGTypeName "interval" -> PGBinaryValue -> Offset #

pgDecodeValue :: PGTypeEnv -> PGTypeName "interval" -> PGValue -> Offset #

Parameter Text Offset Source # 
Deform f Offset Source # 

Methods

deform :: Monad m => DeformT f m Offset Source #

offsetMillis :: Offset -> Integer Source #

Get the underlying fixed integer, before scaling to the appropriate decimal