]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Database/Instances.hs
[SPECS/DOC] Adding Swagger Documentation, first draft POC.
[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
9 import Data.Text (Text)
10 import Data.Time (UTCTime)
11
12 import Opaleye (PGInt4, PGTimestamptz, PGFloat8
13 , QueryRunnerColumnDefault
14 , queryRunnerColumnDefault
15 , fieldQueryRunnerColumn
16 , Nullable, PGText)
17
18 instance QueryRunnerColumnDefault PGInt4 Integer where
19 queryRunnerColumnDefault = fieldQueryRunnerColumn
20
21 instance QueryRunnerColumnDefault PGFloat8 (Maybe Double) where
22 queryRunnerColumnDefault = fieldQueryRunnerColumn
23
24 instance QueryRunnerColumnDefault PGInt4 (Maybe Int) where
25 queryRunnerColumnDefault = fieldQueryRunnerColumn
26
27 instance QueryRunnerColumnDefault PGTimestamptz (Maybe UTCTime) where
28 queryRunnerColumnDefault = fieldQueryRunnerColumn
29
30 instance QueryRunnerColumnDefault (Nullable PGInt4) Int where
31 queryRunnerColumnDefault = fieldQueryRunnerColumn
32
33 instance QueryRunnerColumnDefault (Nullable PGText) Text where
34 queryRunnerColumnDefault = fieldQueryRunnerColumn
35