]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Database/Instances.hs
[DOC] adding a file for examples, text ngrams extraction and some metrics (begin).
[gargantext.git] / src / Gargantext / Database / Instances.hs
1 {-|
2 Module : Gargantext.Database.Instances
3 Description :
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
8 Portability : POSIX
9
10 Here is a longer description of this module, containing some
11 commentary with @some markup@.
12 -}
13
14 {-# OPTIONS_GHC -fno-warn-orphans #-}
15
16 {-# LANGUAGE FlexibleInstances #-}
17 {-# LANGUAGE MultiParamTypeClasses #-}
18 {-# LANGUAGE NoImplicitPrelude #-}
19
20 module Gargantext.Database.Instances where
21
22 import Gargantext.Prelude
23
24 import Data.Text (Text)
25 import Data.Time (UTCTime)
26
27 import Opaleye (PGInt4, PGTimestamptz, PGFloat8
28 , QueryRunnerColumnDefault
29 , queryRunnerColumnDefault
30 , fieldQueryRunnerColumn
31 , Nullable, PGText)
32
33 instance QueryRunnerColumnDefault PGInt4 Integer where
34 queryRunnerColumnDefault = fieldQueryRunnerColumn
35
36 instance QueryRunnerColumnDefault PGFloat8 (Maybe Double) where
37 queryRunnerColumnDefault = fieldQueryRunnerColumn
38
39 instance QueryRunnerColumnDefault PGInt4 (Maybe Int) where
40 queryRunnerColumnDefault = fieldQueryRunnerColumn
41
42 instance QueryRunnerColumnDefault PGTimestamptz (Maybe UTCTime) where
43 queryRunnerColumnDefault = fieldQueryRunnerColumn
44
45 instance QueryRunnerColumnDefault (Nullable PGInt4) Int where
46 queryRunnerColumnDefault = fieldQueryRunnerColumn
47
48 instance QueryRunnerColumnDefault (Nullable PGText) Text where
49 queryRunnerColumnDefault = fieldQueryRunnerColumn
50