]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Database/Instances.hs
[CLEAN] Code.
[gargantext.git] / src / Gargantext / Database / Instances.hs
1 {-# LANGUAGE FlexibleInstances #-}
2 {-# LANGUAGE MultiParamTypeClasses #-}
3 {-# OPTIONS_GHC -fno-warn-orphans #-}
4
5 module Gargantext.Database.Instances where
6
7 import Gargantext.Prelude
8 import Data.Text (Text)
9 import Data.Time (UTCTime)
10 import Opaleye (PGInt4, PGTimestamptz, PGFloat8
11 , QueryRunnerColumnDefault
12 , queryRunnerColumnDefault
13 , fieldQueryRunnerColumn
14 , Nullable, PGText)
15
16 instance QueryRunnerColumnDefault PGInt4 Integer where
17 queryRunnerColumnDefault = fieldQueryRunnerColumn
18
19 instance QueryRunnerColumnDefault PGFloat8 (Maybe Double) where
20 queryRunnerColumnDefault = fieldQueryRunnerColumn
21
22 instance QueryRunnerColumnDefault PGInt4 (Maybe Int) where
23 queryRunnerColumnDefault = fieldQueryRunnerColumn
24
25 instance QueryRunnerColumnDefault PGTimestamptz (Maybe UTCTime) where
26 queryRunnerColumnDefault = fieldQueryRunnerColumn
27
28 instance QueryRunnerColumnDefault (Nullable PGInt4) Int where
29 queryRunnerColumnDefault = fieldQueryRunnerColumn
30
31 instance QueryRunnerColumnDefault (Nullable PGText) Text where
32 queryRunnerColumnDefault = fieldQueryRunnerColumn
33
34