Database.hs 1.18 KB
Newer Older
1 2
{-|
Module      : Gargantext.Database
3
Description : Tools for Database
4 5 6 7 8 9
Copyright   : (c) CNRS, 2017-Present
License     : AGPL + CECILL v3
Maintainer  : team@gargantext.org
Stability   : experimental
Portability : POSIX

10
All Database related stuff here.
11

12 13
Target: just import this module and nothing else to work with
Gargantext's database.
14

15 16 17
-}


18
module Gargantext.Database ( module Gargantext.Database.Prelude
19
                           , module Gargantext.Database.Schema.NodeNode
20
                           , insertDB
21
                        -- , module Gargantext.Database.Bashql
22
                           )
23 24
    where

25 26
import Gargantext.Prelude
import Gargantext.Database.Prelude -- (connectGargandb)
27

28 29
-- import Gargantext.Database.Schema.Node
-- import Gargantext.Database.Query.Table.Node
30

31
import Gargantext.Database.Schema.NodeNode -- (NodeNode(..))
32
import Gargantext.Database.Query.Table.NodeNode
33

34 35

class InsertDB a where
36 37 38 39 40 41
  insertDB :: a -> Cmd err Int

{-
class DeleteDB a where
  deleteDB :: a -> Cmd err Int
-}
42 43 44 45

instance InsertDB [NodeNode] where
  insertDB = insertNodeNode

46

47 48 49 50 51 52 53 54 55
{-
instance InsertDB [Node a] where
  insertDB = insertNodes'

instance InsertDB [NodeNodeNgram] where
  insertDB = ...


-}