on master help sign in
Document Rel8.Type.Ord
21d84baOllie Charles
src/Rel8/Type/Ord.hs+4
@@ -43,6 +43,8 @@ import Data.Time.LocalTime ( TimeOfDay, LocalTime )
43import Data.UUID ( UUID )
43import Data.UUID ( UUID )
44
44
45
45
46+-- | The class of database types that support the @<@, @<=@, @>@ and @>=@
47+-- operators.
46type DBOrd :: Type -> Constraint
48type DBOrd :: Type -> Constraint
47class DBEq a => DBOrd a
49class DBEq a => DBOrd a
48instance DBOrd Bool
50instance DBOrd Bool
@@ -71,6 +73,7 @@ instance Sql DBOrd a => DBOrd (NonEmpty a)
71instance {-# OVERLAPPING #-} DBOrd Opaque
73instance {-# OVERLAPPING #-} DBOrd Opaque
72
74
73
75
76+-- | The class of database types that support the @max@ aggregation function.
74type DBMax :: Type -> Constraint
77type DBMax :: Type -> Constraint
75class DBOrd a => DBMax a
78class DBOrd a => DBMax a
76instance DBMax Bool
79instance DBMax Bool
@@ -97,6 +100,7 @@ instance Sql DBMax a => DBMax [a]
97instance Sql DBMax a => DBMax (NonEmpty a)
100instance Sql DBMax a => DBMax (NonEmpty a)
98
101
99
102
103+-- | The class of database types that support the @min@ aggregation function.
100type DBMin :: Type -> Constraint
104type DBMin :: Type -> Constraint
101class DBOrd a => DBMin a
105class DBOrd a => DBMin a
102instance DBMin Bool
106instance DBMin Bool