2 Module : Gargantext.Database.Init
3 Description : Triggers configuration
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
10 Ngrams by node enable contextual metrics.
14 {-# LANGUAGE QuasiQuotes #-}
16 module Gargantext.Database.Admin.Trigger.Init
19 import Gargantext.Database.Admin.Trigger.NodeNodeNgrams (triggerCountInsert, triggerCountInsert2)
20 import Gargantext.Database.Admin.Trigger.Nodes (triggerSearchUpdate)
21 import Gargantext.Database.Admin.Trigger.NodesNodes (triggerDeleteCount, triggerInsertCount, triggerUpdateAdd, triggerUpdateDel, MasterListId) -- , triggerCoocInsert)
22 import Gargantext.Database.Prelude (Cmd)
23 import Gargantext.Prelude
25 ------------------------------------------------------------------------
27 initTriggers :: MasterListId -> Cmd err [Int64]
29 t0 <- triggerSearchUpdate
30 t1 <- triggerCountInsert
31 t1' <- triggerCountInsert2
32 -- t1'' <- triggerCoocInsert lId
33 t2 <- triggerDeleteCount lId
34 t3 <- triggerInsertCount lId
35 t4 <- triggerUpdateAdd lId
36 t5 <- triggerUpdateDel lId