postgresql-types
Safe HaskellNone
LanguageHaskell2010

PostgresqlTypes.Time

Synopsis

Documentation

data Time Source #

PostgreSQL time type. Time of day (without time zone).

Gets stored as microseconds since midnight (00:00:00).

Range: 00:00:00 to 24:00:00.

PostgreSQL docs.

Instances

Instances details
Arbitrary Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Methods

arbitrary :: Gen Time #

shrink :: Time -> [Time] #

Eq Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Methods

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

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

Ord Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Methods

compare :: Time -> Time -> Ordering #

(<) :: Time -> Time -> Bool #

(<=) :: Time -> Time -> Bool #

(>) :: Time -> Time -> Bool #

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

max :: Time -> Time -> Time #

min :: Time -> Time -> Time #

IsString Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Methods

fromString :: String -> Time #

Bounded Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Read Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Show Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Methods

showsPrec :: Int -> Time -> ShowS #

show :: Time -> String #

showList :: [Time] -> ShowS #

Hashable Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Methods

hashWithSalt :: Int -> Time -> Int #

hash :: Time -> Int #

IsScalar Time Source # 
Instance details

Defined in PostgresqlTypes.Time

Accessors

toMicroseconds :: Time -> Int64 Source #

Extract the underlying microseconds value.

toTimeOfDay :: Time -> TimeOfDay Source #

Convert PostgreSQL Time to TimeOfDay.

Constructors

normalizeFromMicroseconds :: Int64 -> Time Source #

Construct a PostgreSQL Time from microseconds, clamping to valid range.

refineFromTimeOfDay :: TimeOfDay -> Maybe Time Source #

Convert from TimeOfDay to PostgreSQL Time with validation. Returns Nothing if the value is outside the valid range.

normalizeFromTimeOfDay :: TimeOfDay -> Time Source #

Convert from TimeOfDay to PostgreSQL Time, clamping to valid range.