Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
9caf5372
Commit
9caf5372
authored
Apr 28, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DB/FACTO] splitting Action into Action and Queries
parent
daaca8b8
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
94 additions
and
97 deletions
+94
-97
API.hs
src/Gargantext/API.hs
+1
-1
Auth.hs
src/Gargantext/API/Admin/Auth.hs
+2
-2
Types.hs
src/Gargantext/API/Admin/Types.hs
+1
-2
Export.hs
src/Gargantext/API/Corpus/Export.hs
+2
-2
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+1
-1
Node.hs
src/Gargantext/API/Node.hs
+8
-8
Search.hs
src/Gargantext/API/Search.hs
+1
-1
Table.hs
src/Gargantext/API/Table.hs
+1
-1
Types.hs
src/Gargantext/Core/Flow/Types.hs
+1
-1
Flow.hs
src/Gargantext/Database/Action/Flow.hs
+5
-5
List.hs
src/Gargantext/Database/Action/Flow/List.hs
+1
-1
Pairing.hs
src/Gargantext/Database/Action/Flow/Pairing.hs
+3
-3
Types.hs
src/Gargantext/Database/Action/Flow/Types.hs
+1
-1
Utils.hs
src/Gargantext/Database/Action/Flow/Utils.hs
+2
-3
Learn.hs
src/Gargantext/Database/Action/Learn.hs
+1
-1
Metrics.hs
src/Gargantext/Database/Action/Metrics.hs
+2
-2
Search.hs
src/Gargantext/Database/Action/Search.hs
+3
-3
Bashql.hs
src/Gargantext/Database/Admin/Bashql.hs
+2
-4
Query.hs
src/Gargantext/Database/Query.hs
+4
-4
Facet.hs
src/Gargantext/Database/Query/Facet.hs
+4
-4
Filter.hs
src/Gargantext/Database/Query/Filter.hs
+1
-1
Join.hs
src/Gargantext/Database/Query/Join.hs
+1
-1
Node.hs
src/Gargantext/Database/Query/Table/Node.hs
+4
-4
Children.hs
src/Gargantext/Database/Query/Table/Node/Children.hs
+5
-5
Contact.hs
src/Gargantext/Database/Query/Table/Node/Contact.hs
+2
-2
Add.hs
src/Gargantext/Database/Query/Table/Node/Document/Add.hs
+1
-1
Insert.hs
src/Gargantext/Database/Query/Table/Node/Document/Insert.hs
+2
-2
Select.hs
src/Gargantext/Database/Query/Table/Node/Select.hs
+2
-2
Update.hs
src/Gargantext/Database/Query/Table/Node/Update.hs
+1
-1
UpdateOpaleye.hs
src/Gargantext/Database/Query/Table/Node/UpdateOpaleye.hs
+1
-1
User.hs
src/Gargantext/Database/Query/Table/Node/User.hs
+5
-5
User.hs
src/Gargantext/Database/Query/Table/User.hs
+7
-2
Tree.hs
src/Gargantext/Database/Query/Tree.hs
+2
-5
Root.hs
src/Gargantext/Database/Query/Tree/Root.hs
+5
-6
IMTUser.hs
src/Gargantext/Ext/IMTUser.hs
+1
-1
Chart.hs
src/Gargantext/Viz/Chart.hs
+2
-2
API.hs
src/Gargantext/Viz/Graph/API.hs
+4
-4
API.hs
src/Gargantext/Viz/Phylo/API.hs
+1
-1
Main.hs
src/Gargantext/Viz/Phylo/Main.hs
+1
-1
No files found.
src/Gargantext/API.hs
View file @
9caf5372
...
...
@@ -72,7 +72,7 @@ import Gargantext.API.Ngrams (HasRepo(..), HasRepoSaver(..), saveRepo, TableNgra
import
Gargantext.API.Node
import
Gargantext.API.Search
(
SearchPairsAPI
,
searchPairs
)
import
Gargantext.Core.Types.Individu
(
User
(
..
))
import
Gargantext.Database.
Action.Query
.Node.Contact
(
HyperdataContact
)
import
Gargantext.Database.
Query.Table
.Node.Contact
(
HyperdataContact
)
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Types.Node
(
NodeId
,
CorpusId
,
AnnuaireId
)
import
Gargantext.Database.Admin.Utils
(
HasConnectionPool
)
...
...
src/Gargantext/API/Admin/Auth.hs
View file @
9caf5372
...
...
@@ -44,8 +44,8 @@ import Gargantext.API.Admin.Settings
import
Gargantext.API.Admin.Types
(
HasJoseError
(
..
),
joseError
,
HasServerError
,
GargServerC
)
import
Gargantext.Core.Types.Individu
(
User
(
..
),
Username
,
Password
,
arbitraryUsername
,
arbitraryPassword
)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.
Action.
Query.Tree
(
isDescendantOf
,
isIn
)
import
Gargantext.Database.
Action.
Query.Tree.Root
(
getRoot
)
import
Gargantext.Database.Query.Tree
(
isDescendantOf
,
isIn
)
import
Gargantext.Database.Query.Tree.Root
(
getRoot
)
import
Gargantext.Database.Schema.Node
(
NodePoly
(
_node_id
))
import
Gargantext.Database.Admin.Types.Node
(
NodeId
(
..
),
UserId
,
ListId
,
DocId
)
import
Gargantext.Database.Admin.Utils
(
Cmd
'
,
CmdM
,
HasConnectionPool
)
...
...
src/Gargantext/API/Admin/Types.hs
View file @
9caf5372
...
...
@@ -9,7 +9,6 @@ Portability : POSIX
-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
...
...
@@ -41,7 +40,7 @@ import Gargantext.API.Admin.Orchestrator.Types
import
Gargantext.API.Admin.Settings
import
Gargantext.API.Ngrams
import
Gargantext.Core.Types
import
Gargantext.Database.
Action.
Query.Tree
import
Gargantext.Database.Query.Tree
import
Gargantext.Database.Admin.Types.Errors
(
NodeError
(
..
),
HasNodeError
(
..
))
import
Gargantext.Database.Admin.Utils
import
Gargantext.Prelude
...
...
src/Gargantext/API/Corpus/Export.hs
View file @
9caf5372
...
...
@@ -38,8 +38,8 @@ import Gargantext.API.Admin.Types (GargNoServer)
import
Gargantext.Core.Types
--
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getNgramsByNodeOnlyUser
)
import
Gargantext.Database.
Action.Query
.Node
import
Gargantext.Database.
Action.Query
.Node.Select
(
selectNodesWithUsername
)
import
Gargantext.Database.
Query.Table
.Node
import
Gargantext.Database.
Query.Table
.Node.Select
(
selectNodesWithUsername
)
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
)
import
Gargantext.Database.Admin.Types.Node
(
Node
,
HyperdataDocument
(
..
),
NodeId
,
ListId
,
CorpusId
)
...
...
src/Gargantext/API/Ngrams.hs
View file @
9caf5372
...
...
@@ -127,7 +127,7 @@ import Gargantext.Core.Types (TODO)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getOccByNgramsOnlyFast'
)
import
Gargantext.Database.Query.Table.Ngrams
import
Gargantext.Database.
Action.Query
.Node.Select
import
Gargantext.Database.
Query.Table
.Node.Select
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
)
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
..
))
...
...
src/Gargantext/API/Node.hs
View file @
9caf5372
...
...
@@ -54,13 +54,13 @@ import Gargantext.API.Table
import
Gargantext.Core.Types
(
NodeTableResult
)
import
Gargantext.Core.Types.Main
(
Tree
,
NodeTree
,
ListType
)
import
Gargantext.Database.Action.Flow.Pairing
(
pairing
)
import
Gargantext.Database.
Action.
Query
import
Gargantext.Database.
Action.
Query.Facet
(
FacetDoc
,
OrderBy
(
..
))
import
Gargantext.Database.
Action.Query
.Node
hiding
(
postNode
)
import
Gargantext.Database.
Action.Query
.Node.Children
(
getChildren
)
import
Gargantext.Database.
Action.Query
.Node.UpdateOpaleye
(
updateHyperdata
)
import
Gargantext.Database.
Action.Query
.Node.User
import
Gargantext.Database.
Action.
Query.Tree
(
treeDB
)
import
Gargantext.Database.Query
import
Gargantext.Database.Query.Facet
(
FacetDoc
,
OrderBy
(
..
))
import
Gargantext.Database.
Query.Table
.Node
hiding
(
postNode
)
import
Gargantext.Database.
Query.Table
.Node.Children
(
getChildren
)
import
Gargantext.Database.
Query.Table
.Node.UpdateOpaleye
(
updateHyperdata
)
import
Gargantext.Database.
Query.Table
.Node.User
import
Gargantext.Database.Query.Tree
(
treeDB
)
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
(
..
))
import
Gargantext.Database.Admin.Types.Node
...
...
@@ -74,7 +74,7 @@ import Gargantext.Viz.Phylo.API (PhyloAPI, phyloAPI)
import
Servant
import
Test.QuickCheck
(
elements
)
import
Test.QuickCheck.Arbitrary
(
Arbitrary
,
arbitrary
)
import
qualified
Gargantext.Database.
Action.Query
.Node.Update
as
U
(
update
,
Update
(
..
))
import
qualified
Gargantext.Database.
Query.Table
.Node.Update
as
U
(
update
,
Update
(
..
))
{-
import qualified Gargantext.Text.List.Learn as Learn
...
...
src/Gargantext/API/Search.hs
View file @
9caf5372
...
...
@@ -32,7 +32,7 @@ import Data.Time (UTCTime)
import
GHC.Generics
(
Generic
)
import
Gargantext.API.Admin.Types
(
GargServer
)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.
Action.
Query.Facet
import
Gargantext.Database.Query.Facet
import
Gargantext.Database.Action.Search
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Prelude
...
...
src/Gargantext/API/Table.hs
View file @
9caf5372
...
...
@@ -46,7 +46,7 @@ import GHC.Generics (Generic)
import
Gargantext.API.Ngrams
(
TabType
(
..
))
import
Gargantext.Core.Types
(
Offset
,
Limit
,
TableResult
(
..
))
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.
Action.
Query.Facet
(
FacetDoc
,
runViewDocuments
,
OrderBy
(
..
),
runViewAuthorsDoc
)
import
Gargantext.Database.Query.Facet
(
FacetDoc
,
runViewDocuments
,
OrderBy
(
..
),
runViewAuthorsDoc
)
import
Gargantext.Database.Action.Learn
(
FavOrTrash
(
..
),
moreLike
)
import
Gargantext.Database.Action.Search
import
Gargantext.Database.Admin.Types.Node
...
...
src/Gargantext/Core/Flow/Types.hs
View file @
9caf5372
...
...
@@ -22,7 +22,7 @@ import Data.Map (Map)
import
Data.Maybe
(
Maybe
)
import
Gargantext.Text
(
HasText
(
..
))
import
Gargantext.Core.Types.Main
(
HashId
)
import
Gargantext.Database.
Action.Query
.Node.Contact
-- (HyperdataContact(..))
import
Gargantext.Database.
Query.Table
.Node.Contact
-- (HyperdataContact(..))
import
Gargantext.Database.Admin.Types.Node
-- (HyperdataDocument(..))
import
Gargantext.Database.Schema.Ngrams
(
Ngrams
,
NgramsType
)
import
Gargantext.Prelude
...
...
src/Gargantext/Database/Action/Flow.hs
View file @
9caf5372
...
...
@@ -66,10 +66,10 @@ import Gargantext.Core.Types.Main
import
Gargantext.Database.Action.Flow.List
import
Gargantext.Database.Action.Flow.Types
import
Gargantext.Database.Action.Flow.Utils
(
insertDocNgrams
)
import
Gargantext.Database.
Action.Query
.Node
import
Gargantext.Database.
Action.Query
.Node.Contact
-- (HyperdataContact(..), ContactWho(..))
import
Gargantext.Database.
Action.Query
.Node.Document.Insert
-- (insertDocuments, ReturnId(..), addUniqIdsDoc, addUniqIdsContact, ToDbData(..))
import
Gargantext.Database.
Action.
Query.Tree.Root
(
getOrMkRoot
,
getOrMk_RootWithCorpus
)
import
Gargantext.Database.
Query.Table
.Node
import
Gargantext.Database.
Query.Table
.Node.Contact
-- (HyperdataContact(..), ContactWho(..))
import
Gargantext.Database.
Query.Table
.Node.Document.Insert
-- (insertDocuments, ReturnId(..), addUniqIdsDoc, addUniqIdsContact, ToDbData(..))
import
Gargantext.Database.Query.Tree.Root
(
getOrMkRoot
,
getOrMk_RootWithCorpus
)
import
Gargantext.Database.Action.Search
(
searchInDatabase
)
import
Gargantext.Database.Admin.Config
(
userMaster
,
corpusMasterName
)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
(
..
))
...
...
@@ -90,7 +90,7 @@ import Gargantext.Text.Terms
import
GHC.Generics
(
Generic
)
import
System.FilePath
(
FilePath
)
import
qualified
Data.Map
as
Map
import
qualified
Gargantext.Database.
Action.Query
.Node.Document.Add
as
Doc
(
add
)
import
qualified
Gargantext.Database.
Query.Table
.Node.Document.Add
as
Doc
(
add
)
import
qualified
Gargantext.Text.Corpus.API
as
API
------------------------------------------------------------------------
...
...
src/Gargantext/Database/Action/Flow/List.hs
View file @
9caf5372
...
...
@@ -48,7 +48,7 @@ import qualified Data.List as List
import
qualified
Data.Map
as
Map
import
qualified
Data.Set
as
Set
import
Gargantext.Database.Action.Metrics.NgramsByNode
import
Gargantext.Database.
Action.
Query.Tree.Root
(
getOrMk_RootWithCorpus
)
import
Gargantext.Database.Query.Tree.Root
(
getOrMk_RootWithCorpus
)
-- FLOW LIST
-- 1. select specific terms of the corpus when compared with others langs
...
...
src/Gargantext/Database/Action/Flow/Pairing.hs
View file @
9caf5372
...
...
@@ -29,12 +29,12 @@ import Gargantext.Core.Types (TableResult(..))
import
Gargantext.Database.Action.Flow.Utils
import
Gargantext.Database.Admin.Types.Node
(
AnnuaireId
,
CorpusId
,
ListId
{-, DocId, ContactId-}
)
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runPGSQuery
)
import
Gargantext.Database.
Action.Query
.Node.Children
(
getAllContacts
)
import
Gargantext.Database.
Action.Query
.Node.Contact
-- (HyperdataContact(..))
import
Gargantext.Database.
Query.Table
.Node.Children
(
getAllContacts
)
import
Gargantext.Database.
Query.Table
.Node.Contact
-- (HyperdataContact(..))
import
Gargantext.Database.Schema.Ngrams
-- (NgramsType(..))
import
Gargantext.Prelude
hiding
(
sum
)
import
Safe
(
lastMay
)
import
qualified
Data.Map
as
DM
import
qualified
Data.Map
as
DM
import
qualified
Data.Text
as
DT
-- TODO mv this type in Types Main
...
...
src/Gargantext/Database/Action/Flow/Types.hs
View file @
9caf5372
...
...
@@ -30,7 +30,7 @@ import Gargantext.Text.Terms
import
Gargantext.API.Ngrams
(
HasRepoVar
,
RepoCmdM
)
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
)
import
Gargantext.Database.Admin.Utils
(
CmdM
)
import
Gargantext.Database.
Action.Query
.Node.Document.Insert
import
Gargantext.Database.
Query.Table
.Node.Document.Insert
type
FlowCmdM
env
err
m
=
(
CmdM
env
err
m
...
...
src/Gargantext/Database/Action/Flow/Utils.hs
View file @
9caf5372
...
...
@@ -19,14 +19,13 @@ module Gargantext.Database.Action.Flow.Utils
import
Data.Map
(
Map
)
import
Gargantext.Core.Types.Individu
(
User
(
..
))
import
Gargantext.Database.
Action.Query
.Node
import
Gargantext.Database.
Action.Query
.User
import
Gargantext.Database.
Query.Table
.Node
import
Gargantext.Database.
Query.Table
.User
import
Gargantext.Database.Admin.Types.Errors
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
(
Cmd
)
import
Gargantext.Database.Schema.Ngrams
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.Schema.User
import
Gargantext.Database.Schema.NodeNodeNgrams
import
Gargantext.Prelude
import
qualified
Data.Map
as
DM
...
...
src/Gargantext/Database/Action/Learn.hs
View file @
9caf5372
...
...
@@ -23,7 +23,7 @@ import Data.Maybe
import
Data.Text
(
Text
)
import
Data.Tuple
(
snd
)
import
Gargantext.Core.Types
(
Offset
,
Limit
)
import
Gargantext.Database.
Action.
Query.Facet
import
Gargantext.Database.Query.Facet
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
(
Cmd
)
import
Gargantext.Prelude
...
...
src/Gargantext/Database/Action/Metrics.hs
View file @
9caf5372
...
...
@@ -25,10 +25,10 @@ import Gargantext.API.Ngrams.Tools (filterListWithRoot, groupNodesByNgrams, Diag
import
Gargantext.Core.Types
(
ListType
(
..
),
Limit
,
NodeType
(
..
))
import
Gargantext.Database.Action.Flow
(
FlowCmdM
)
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getNodesByNgramsOnlyUser
{-, getTficfWith-}
)
import
Gargantext.Database.Action.Query.Node.Select
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Types.Node
(
ListId
,
CorpusId
{-, HyperdataCorpus-}
)
import
Gargantext.Database.Action.Query.Node
(
defaultList
)
import
Gargantext.Database.Query.Table.Node
(
defaultList
)
import
Gargantext.Database.Query.Table.Node.Select
import
Gargantext.Prelude
import
Gargantext.Text.Metrics
(
scored
,
Scored
(
..
),
{-localMetrics, toScored-}
)
import
qualified
Data.Map
as
Map
...
...
src/Gargantext/Database/Action/Search.hs
View file @
9caf5372
...
...
@@ -28,9 +28,9 @@ import Data.Time (UTCTime)
import
Database.PostgreSQL.Simple
(
Query
)
import
Database.PostgreSQL.Simple.ToField
import
Gargantext.Core.Types
import
Gargantext.Database.
Action.
Query.Facet
import
Gargantext.Database.
Action.
Query.Join
(
leftJoin6
)
import
Gargantext.Database.
Action.Query
.Node
import
Gargantext.Database.Query.Facet
import
Gargantext.Database.Query.Join
(
leftJoin6
)
import
Gargantext.Database.
Query.Table
.Node
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
..
))
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runPGSQuery
,
runOpaQuery
,
runCountOpaQuery
)
...
...
src/Gargantext/Database/Admin/Bashql.hs
View file @
9caf5372
...
...
@@ -78,15 +78,13 @@ module Gargantext.Database.Admin.Bashql () {-( get
where
import
Control.Monad.Reader
-- (Reader, ask)
import
Data.Text
(
Text
)
import
Data.List
(
concat
,
last
)
import
Gargantext.Core.Types
import
Gargantext.Database.Admin.Utils
(
runOpaQuery
,
Cmd
)
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.
Action.Query
.Node
import
qualified
Gargantext.Database.
Action.Query
.Node.Update
as
U
(
Update
(
..
),
update
)
import
Gargantext.Database.
Query.Table
.Node
import
qualified
Gargantext.Database.
Query.Table
.Node.Update
as
U
(
Update
(
..
),
update
)
import
Gargantext.Prelude
...
...
src/Gargantext/Database/
Action/
Query.hs
→
src/Gargantext/Database/Query.hs
View file @
9caf5372
{-|
Module : Gargantext.Database.
Action.
Query
Module : Gargantext.Database.Query
Description : Main Tools of Node to the database
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
...
...
@@ -24,12 +24,12 @@ Portability : POSIX
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module
Gargantext.Database.
Action.
Query
module
Gargantext.Database.Query
where
import
Gargantext.Core.Types
(
Name
)
import
Gargantext.Database.
Action.Query
.Node
import
Gargantext.Database.
Action.Query
.Node.User
import
Gargantext.Database.
Query.Table
.Node
import
Gargantext.Database.
Query.Table
.Node.User
import
Gargantext.Database.Admin.Types.Errors
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
(
Cmd
)
...
...
src/Gargantext/Database/
Action/
Query/Facet.hs
→
src/Gargantext/Database/Query/Facet.hs
View file @
9caf5372
{-|
Module : Gargantext.Database.Facet
Module : Gargantext.Database.
Query.
Facet
Description : Main requests of Node to the database
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
...
...
@@ -25,7 +25,7 @@ Portability : POSIX
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
------------------------------------------------------------------------
module
Gargantext.Database.
Action.
Query.Facet
module
Gargantext.Database.Query.Facet
(
runViewAuthorsDoc
,
runViewDocuments
,
filterWith
...
...
@@ -54,8 +54,8 @@ import Data.Time.Segment (jour)
import
GHC.Generics
(
Generic
)
import
Gargantext.Core.Types
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.
Action.
Query.Filter
import
Gargantext.Database.
Action.
Query.Join
(
leftJoin5
)
import
Gargantext.Database.Query.Filter
import
Gargantext.Database.Query.Join
(
leftJoin5
)
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Utils
import
Gargantext.Database.Schema.Ngrams
...
...
src/Gargantext/Database/
Action/
Query/Filter.hs
→
src/Gargantext/Database/Query/Filter.hs
View file @
9caf5372
...
...
@@ -19,7 +19,7 @@ Portability : POSIX
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
Gargantext.Database.
Action.
Query.Filter
module
Gargantext.Database.Query.Filter
where
import
Gargantext.Core.Types
(
Limit
,
Offset
)
...
...
src/Gargantext/Database/
Action/
Query/Join.hs
→
src/Gargantext/Database/Query/Join.hs
View file @
9caf5372
...
...
@@ -28,7 +28,7 @@ Multiple Join functions with Opaleye.
------------------------------------------------------------------------
module
Gargantext.Database.
Action.
Query.Join
module
Gargantext.Database.Query.Join
where
import
Control.Applicative
((
<*>
))
...
...
src/Gargantext/Database/
Action/Query
/Node.hs
→
src/Gargantext/Database/
Query/Table
/Node.hs
View file @
9caf5372
{-|
Module : Gargantext.Database.
Tools
.Node
Module : Gargantext.Database.
Query.Table
.Node
Description : Main Tools of Node to the database
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
...
...
@@ -24,7 +24,7 @@ Portability : POSIX
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module
Gargantext.Database.
Action.Query
.Node
module
Gargantext.Database.
Query.Table
.Node
where
import
Control.Arrow
(
returnA
)
...
...
@@ -34,12 +34,12 @@ import Data.Maybe (Maybe(..), fromMaybe)
import
Data.Text
(
Text
)
import
GHC.Int
(
Int64
)
import
Gargantext.Core.Types
import
Gargantext.Database.
Action.
Query.Filter
(
limit'
,
offset'
)
import
Gargantext.Database.Query.Filter
(
limit'
,
offset'
)
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Errors
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
..
),
defaultCorpus
,
Hyperdata
,
HyperData
(
..
))
import
Gargantext.Database.Admin.Utils
import
Gargantext.Database.
Action.Query
.Node.Contact
(
HyperdataContact
(
..
),
arbitraryHyperdataContact
)
import
Gargantext.Database.
Query.Table
.Node.Contact
(
HyperdataContact
(
..
),
arbitraryHyperdataContact
)
import
Gargantext.Database.Schema.Node
import
Gargantext.Prelude
hiding
(
sum
,
head
)
import
Gargantext.Viz.Graph
(
HyperdataGraph
(
..
))
...
...
src/Gargantext/Database/
Action/Query
/Node/Children.hs
→
src/Gargantext/Database/
Query/Table
/Node/Children.hs
View file @
9caf5372
{-|
Module : Gargantext.Database.Node.Children
Module : Gargantext.Database.
Query.Table.
Node.Children
Description : Main requests of Node to the database
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
...
...
@@ -16,15 +16,15 @@ Portability : POSIX
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
module
Gargantext.Database.
Action.Query
.Node.Children
module
Gargantext.Database.
Query.Table
.Node.Children
where
import
Control.Arrow
(
returnA
)
import
Data.Proxy
import
Gargantext.Core.Types
import
Gargantext.Database.
Action.
Query.Filter
import
Gargantext.Database.
Action.Query
.Node
import
Gargantext.Database.
Action.Query
.Node.Contact
(
HyperdataContact
)
import
Gargantext.Database.Query.Filter
import
Gargantext.Database.
Query.Table
.Node
import
Gargantext.Database.
Query.Table
.Node.Contact
(
HyperdataContact
)
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Node
(
pgNodeId
)
import
Gargantext.Database.Admin.Utils
...
...
src/Gargantext/Database/
Action/Query
/Node/Contact.hs
→
src/Gargantext/Database/
Query/Table
/Node/Contact.hs
View file @
9caf5372
{-|
Module : Gargantext.Database.Node.Contact
Module : Gargantext.Database.
Query.Table.
Node.Contact
Description : Update Node in Database (Postgres)
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
...
...
@@ -17,7 +17,7 @@ Portability : POSIX
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
module
Gargantext.Database.
Action.Query
.Node.Contact
module
Gargantext.Database.
Query.Table
.Node.Contact
where
import
Control.Lens
(
makeLenses
)
...
...
src/Gargantext/Database/
Action/Query
/Node/Document/Add.hs
→
src/Gargantext/Database/
Query/Table
/Node/Document/Add.hs
View file @
9caf5372
...
...
@@ -23,7 +23,7 @@ Add Documents/Contact to a Corpus/Annuaire.
{-# LANGUAGE TypeSynonymInstances #-}
------------------------------------------------------------------------
module
Gargantext.Database.
Action.Query
.Node.Document.Add
module
Gargantext.Database.
Query.Table
.Node.Document.Add
where
import
Data.ByteString.Internal
(
ByteString
)
...
...
src/Gargantext/Database/
Action/Query
/Node/Document/Insert.hs
→
src/Gargantext/Database/
Query/Table
/Node/Document/Insert.hs
View file @
9caf5372
...
...
@@ -57,7 +57,7 @@ the concatenation of the parameters defined by @shaParameters@.
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeSynonymInstances #-}
------------------------------------------------------------------------
module
Gargantext.Database.
Action.Query
.Node.Document.Insert
module
Gargantext.Database.
Query.Table
.Node.Document.Insert
where
import
Control.Lens
(
set
,
view
)
...
...
@@ -73,7 +73,7 @@ import Database.PostgreSQL.Simple.SqlQQ
import
Database.PostgreSQL.Simple.ToField
(
toField
,
Action
)
import
Database.PostgreSQL.Simple.Types
(
Values
(
..
),
QualifiedIdentifier
(
..
))
import
GHC.Generics
(
Generic
)
import
Gargantext.Database.
Action.Query
.Node.Contact
-- (HyperdataContact(..), ContactWho(..))
import
Gargantext.Database.
Query.Table
.Node.Contact
-- (HyperdataContact(..), ContactWho(..))
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runPGSQuery
)
...
...
src/Gargantext/Database/
Action/Query
/Node/Select.hs
→
src/Gargantext/Database/
Query/Table
/Node/Select.hs
View file @
9caf5372
...
...
@@ -14,7 +14,7 @@ Portability : POSIX
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
module
Gargantext.Database.
Action.Query
.Node.Select
module
Gargantext.Database.
Query.Table
.Node.Select
where
import
Control.Arrow
(
returnA
)
...
...
@@ -24,7 +24,7 @@ import Gargantext.Database.Admin.Config
import
Gargantext.Database.Admin.Utils
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.Schema.User
import
Gargantext.Database.
Action.Query
.User
import
Gargantext.Database.
Query.Table
.User
import
Opaleye
selectNodesWithUsername
::
NodeType
->
Username
->
Cmd
err
[
NodeId
]
...
...
src/Gargantext/Database/
Action/Query
/Node/Update.hs
→
src/Gargantext/Database/
Query/Table
/Node/Update.hs
View file @
9caf5372
...
...
@@ -15,7 +15,7 @@ Portability : POSIX
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
module
Gargantext.Database.
Action.Query
.Node.Update
(
Update
(
..
),
update
)
module
Gargantext.Database.
Query.Table
.Node.Update
(
Update
(
..
),
update
)
where
import
qualified
Data.Text
as
DT
...
...
src/Gargantext/Database/
Action/Query
/Node/UpdateOpaleye.hs
→
src/Gargantext/Database/
Query/Table
/Node/UpdateOpaleye.hs
View file @
9caf5372
...
...
@@ -16,7 +16,7 @@ Portability : POSIX
{-# LANGUAGE RankNTypes #-}
module
Gargantext.Database.
Action.Query
.Node.UpdateOpaleye
module
Gargantext.Database.
Query.Table
.Node.UpdateOpaleye
where
...
...
src/Gargantext/Database/
Action/Query
/Node/User.hs
→
src/Gargantext/Database/
Query/Table
/Node/User.hs
View file @
9caf5372
...
...
@@ -19,7 +19,7 @@ Portability : POSIX
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module
Gargantext.Database.
Action.Query
.Node.User
module
Gargantext.Database.
Query.Table
.Node.User
where
import
Control.Lens
(
makeLenses
)
...
...
@@ -32,13 +32,13 @@ import GHC.Generics (Generic)
import
Gargantext.Core
(
Lang
(
..
))
import
Gargantext.Core.Types
(
Name
)
import
Gargantext.Core.Types.Individu
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
..
))
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
import
Gargantext.Database.Admin.Types.Node
(
pgNodeId
)
import
Gargantext.Database.Action.Query.Node.Contact
(
HyperdataContact
,
fake_HyperdataContact
)
import
Gargantext.Database.Admin.Types.Node
(
Node
,
Hyperdata
,
DocumentId
,
NodeId
(
..
))
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
..
))
import
Gargantext.Database.Admin.Types.Node
(
pgNodeId
)
import
Gargantext.Database.Admin.Utils
-- (fromField', Cmd)
import
Gargantext.Database.Query.Table.Node
import
Gargantext.Database.Query.Table.Node.Contact
(
HyperdataContact
,
fake_HyperdataContact
)
import
Gargantext.Database.Schema.Node
-- (Node(..))
import
Gargantext.Prelude
import
Opaleye
hiding
(
FromField
)
...
...
src/Gargantext/Database/
Action/Query
/User.hs
→
src/Gargantext/Database/
Query/Table
/User.hs
View file @
9caf5372
{-|
Module : Gargantext.Database.
u
ser
Module : Gargantext.Database.
Query.Table.U
ser
Description : User Database management tools
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
...
...
@@ -23,7 +23,12 @@ Functions to deal with users, database side.
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module
Gargantext.Database.Action.Query.User
module
Gargantext.Database.Query.Table.User
(
insertUsers
,
queryUserTable
,
getUser
,
module
Gargantext
.
Database
.
Schema
.
User
)
where
import
Control.Arrow
(
returnA
)
...
...
src/Gargantext/Database/
Action/
Query/Tree.hs
→
src/Gargantext/Database/Query/Tree.hs
View file @
9caf5372
...
...
@@ -18,7 +18,7 @@ Let a Root Node, return the Tree of the Node as a directed acyclic graph
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
module
Gargantext.Database.
Action.
Query.Tree
module
Gargantext.Database.Query.Tree
where
import
Control.Lens
(
Prism
'
,
(
#
),
(
^..
),
at
,
each
,
_Just
,
to
)
...
...
@@ -35,15 +35,12 @@ import Gargantext.Database.Admin.Utils (Cmd, runPGSQuery)
import
Gargantext.Prelude
------------------------------------------------------------------------
-- TODO more generic find fun
findCorpus
::
RootId
->
Cmd
err
(
Maybe
CorpusId
)
findCorpus
r
=
do
_mapNodes
<-
toTreeParent
<$>
dbTree
r
[]
pure
Nothing
------------------------------------------------------------------------
data
TreeError
=
NoRoot
|
EmptyRoot
|
TooManyRoots
deriving
(
Show
)
...
...
src/Gargantext/Database/
Action/
Query/Tree/Root.hs
→
src/Gargantext/Database/Query/Tree/Root.hs
View file @
9caf5372
...
...
@@ -24,7 +24,7 @@ Portability : POSIX
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module
Gargantext.Database.
Action.
Query.Tree.Root
module
Gargantext.Database.Query.Tree.Root
where
import
Data.Either
(
Either
,
fromLeft
,
fromRight
)
...
...
@@ -34,14 +34,13 @@ import Gargantext.Core.Types.Individu (User(..))
import
Gargantext.Database.Admin.Config
(
nodeTypeId
,
userMaster
)
import
Gargantext.Database.Admin.Types.Errors
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.
Action.Query
.Node
import
Gargantext.Database.
Action.Query
.Node.User
(
HyperdataUser
)
import
Gargantext.Database.
Query.Table
.Node
import
Gargantext.Database.
Query.Table
.Node.User
(
HyperdataUser
)
import
Gargantext.Database.Action.Flow.Utils
(
getUserId
)
import
Gargantext.Database.Schema.Node
(
NodePoly
(
..
),
NodeRead
)
import
Gargantext.Database.Schema.Node
(
queryNodeTable
)
import
Gargantext.Database.Action.Query
import
Gargantext.Database.Schema.User
(
UserPoly
(
..
))
import
Gargantext.Database.Action.Query.User
(
queryUserTable
)
import
Gargantext.Database.Query
import
Gargantext.Database.Query.Table.User
(
queryUserTable
,
UserPoly
(
..
))
import
Gargantext.Database.Admin.Types.Node
(
Node
,
NodeType
(
NodeUser
),
pgNodeId
)
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runOpaQuery
)
import
Gargantext.Prelude
...
...
src/Gargantext/Ext/IMTUser.hs
View file @
9caf5372
...
...
@@ -23,7 +23,7 @@ import Codec.Serialise
import
Data.Maybe
(
Maybe
,
catMaybes
)
import
Data.Text
(
Text
)
import
GHC.Generics
(
Generic
)
import
Gargantext.Database.
Action.Query
.Node.Contact
-- (HyperdataContact, ContactWho, ContactWhere, ContactTouch, ContactMetaData)
import
Gargantext.Database.
Query.Table
.Node.Contact
-- (HyperdataContact, ContactWho, ContactWhere, ContactTouch, ContactMetaData)
import
Gargantext.Prelude
import
System.IO
(
FilePath
)
import
qualified
Data.ByteString.Lazy
as
BSL
...
...
src/Gargantext/Viz/Chart.hs
View file @
9caf5372
...
...
@@ -23,11 +23,11 @@ import Data.Map (toList)
import
Data.Text
(
Text
)
import
GHC.Generics
(
Generic
)
import
Gargantext.Core.Types.Main
import
Gargantext.Database.Action.Query.Node.Select
import
Gargantext.Database.Action.Query.Node
import
Gargantext.Database.Admin.Config
import
Gargantext.Database.Admin.Types.Node
(
CorpusId
)
import
Gargantext.Database.Admin.Utils
import
Gargantext.Database.Query.Table.Node
import
Gargantext.Database.Query.Table.Node.Select
import
Gargantext.Database.Query.Table.NodeNode
(
selectDocsDates
)
import
Gargantext.Database.Schema.Node
import
Gargantext.Prelude
...
...
src/Gargantext/Viz/Graph/API.hs
View file @
9caf5372
...
...
@@ -48,12 +48,12 @@ import Gargantext.Database.Admin.Config
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getNodesByNgramsOnlyUser
)
import
Gargantext.Database.Schema.Node
(
node_userId
,
node_parentId
,
node_hyperdata
)
import
Gargantext.Database.Schema.Ngrams
import
Gargantext.Database.
Action.Query
.Node.Select
import
Gargantext.Database.
Action.Query
.Node
import
Gargantext.Database.
Action.Query
.Node.User
import
Gargantext.Database.
Query.Table
.Node.Select
import
Gargantext.Database.
Query.Table
.Node
import
Gargantext.Database.
Query.Table
.Node.User
import
Gargantext.Database.Admin.Types.Errors
(
HasNodeError
)
import
Gargantext.Database.Admin.Types.Node
hiding
(
node_id
)
-- (GraphId, ListId, CorpusId, NodeId)
import
Gargantext.Database.
Action.Query
.Node.UpdateOpaleye
(
updateHyperdata
)
import
Gargantext.Database.
Query.Table
.Node.UpdateOpaleye
(
updateHyperdata
)
import
Gargantext.Database.Admin.Utils
(
Cmd
)
import
Gargantext.Prelude
import
qualified
Gargantext.Prelude
as
P
...
...
src/Gargantext/Viz/Phylo/API.hs
View file @
9caf5372
...
...
@@ -31,7 +31,7 @@ import qualified Data.ByteString.Lazy as DBL
import
Data.Swagger
import
Gargantext.API.Admin.Types
import
Gargantext.Database.Schema.Node
(
_node_hyperdata
)
import
Gargantext.Database.
Action.Query
.Node
(
insertNodes
,
nodePhyloW
,
getNodePhylo
)
import
Gargantext.Database.
Query.Table
.Node
(
insertNodes
,
nodePhyloW
,
getNodePhylo
)
import
Gargantext.Database.Admin.Types.Node
-- (PhyloId, ListId, CorpusId, UserId, NodeId(..))
import
Gargantext.Prelude
import
Gargantext.Viz.Phylo
...
...
src/Gargantext/Viz/Phylo/Main.hs
View file @
9caf5372
...
...
@@ -28,7 +28,7 @@ import Gargantext.API.Ngrams.Tools (getTermsWith)
import
Gargantext.Core.Types
import
Gargantext.Database.Action.Flow
import
Gargantext.Database.Schema.Ngrams
(
NgramsType
(
..
))
import
Gargantext.Database.
Action.Query
.Node
(
defaultList
)
import
Gargantext.Database.
Query.Table
.Node
(
defaultList
)
import
Gargantext.Database.Query.Table.NodeNode
(
selectDocs
)
import
Gargantext.Prelude
import
Gargantext.Text.Context
(
TermList
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment