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
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
37d8ac18
Commit
37d8ac18
authored
Apr 29, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DB/FACT] Schema NodeNode -> Query (with warnings)
parent
2858f2ed
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
13 deletions
+22
-13
Node.hs
src/Gargantext/API/Node.hs
+0
-1
Search.hs
src/Gargantext/Database/Action/Search.hs
+1
-2
Facet.hs
src/Gargantext/Database/Query/Facet.hs
+1
-1
Children.hs
src/Gargantext/Database/Query/Table/Node/Children.hs
+1
-0
NodeNode.hs
src/Gargantext/Database/Query/Table/NodeNode.hs
+19
-1
Ngrams.hs
src/Gargantext/Database/Schema/Ngrams.hs
+0
-1
NodeNode.hs
src/Gargantext/Database/Schema/NodeNode.hs
+0
-7
No files found.
src/Gargantext/API/Node.hs
View file @
37d8ac18
...
...
@@ -67,7 +67,6 @@ import Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Utils
-- (Cmd, CmdM)
import
Gargantext.Database.Schema.Node
(
node_userId
,
_node_typename
)
import
Gargantext.Database.Query.Table.NodeNode
import
Gargantext.Database.Schema.NodeNode
import
Gargantext.Prelude
import
Gargantext.Viz.Chart
import
Gargantext.Viz.Phylo.API
(
PhyloAPI
,
phyloAPI
)
...
...
src/Gargantext/Database/Action/Search.hs
View file @
37d8ac18
...
...
@@ -31,13 +31,12 @@ import Gargantext.Core.Types
import
Gargantext.Database.Query.Facet
import
Gargantext.Database.Query.Join
(
leftJoin6
)
import
Gargantext.Database.Query.Table.Node
import
Gargantext.Database.Query.Table.NodeNode
import
Gargantext.Database.Query.Table.Ngrams
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
..
))
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runPGSQuery
,
runOpaQuery
,
runCountOpaQuery
)
import
Gargantext.Database.Schema.Ngrams
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.Schema.NodeNode
import
Gargantext.Database.Schema.NodeNodeNgrams
import
Gargantext.Prelude
import
Gargantext.Text.Terms.Mono.Stem.En
(
stemIt
)
...
...
src/Gargantext/Database/Query/Facet.hs
View file @
37d8ac18
...
...
@@ -61,7 +61,7 @@ import Gargantext.Database.Admin.Config (nodeTypeId)
import
Gargantext.Database.Admin.Utils
import
Gargantext.Database.Schema.Ngrams
import
Gargantext.Database.Schema.Node
import
Gargantext.Database.
Schema
.NodeNode
import
Gargantext.Database.
Query.Table
.NodeNode
import
Gargantext.Database.Schema.NodeNodeNgrams
import
Opaleye
import
Prelude
hiding
(
null
,
id
,
map
,
sum
,
not
,
read
)
...
...
src/Gargantext/Database/Query/Table/Node/Children.hs
View file @
37d8ac18
...
...
@@ -24,6 +24,7 @@ import Data.Proxy
import
Gargantext.Core.Types
import
Gargantext.Database.Query.Filter
import
Gargantext.Database.Query.Table.Node
import
Gargantext.Database.Query.Table.NodeNode
import
Gargantext.Database.Query.Table.Node.Contact
(
HyperdataContact
)
import
Gargantext.Database.Admin.Config
(
nodeTypeId
)
import
Gargantext.Database.Admin.Types.Node
(
pgNodeId
)
...
...
src/Gargantext/Database/Query/Table/NodeNode.hs
View file @
37d8ac18
...
...
@@ -24,7 +24,17 @@ commentary with @some markup@.
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module
Gargantext.Database.Query.Table.NodeNode
where
module
Gargantext.Database.Query.Table.NodeNode
(
module
Gargantext
.
Database
.
Schema
.
NodeNode
,
queryNodeNodeTable
,
selectDocsDates
,
selectDocNodes
,
selectDocs
,
nodeNodesCategory
,
getNodeNode
,
insertNodeNode
)
where
import
Control.Arrow
(
returnA
)
import
Control.Lens
(
view
,
(
^.
))
...
...
@@ -44,6 +54,14 @@ import Opaleye
import
qualified
Database.PostgreSQL.Simple
as
PGS
(
Query
,
Only
(
..
))
import
qualified
Opaleye
as
O
queryNodeNodeTable
::
Query
NodeNodeRead
queryNodeNodeTable
=
queryTable
nodeNodeTable
-- | not optimized (get all ngrams without filters)
nodesNodes
::
Cmd
err
[
NodeNode
]
nodesNodes
=
runOpaQuery
queryNodeNodeTable
------------------------------------------------------------------------
-- | Basic NodeNode tools
getNodeNode
::
NodeId
->
Cmd
err
[
NodeNode
]
...
...
src/Gargantext/Database/Schema/Ngrams.hs
View file @
37d8ac18
...
...
@@ -38,7 +38,6 @@ import Data.Swagger (ToParamSchema, toParamSchema, ToSchema)
import
Data.Text
(
Text
,
splitOn
,
pack
)
import
GHC.Generics
(
Generic
)
import
Gargantext.Core.Types
(
TODO
(
..
))
import
Gargantext.Database.Admin.Utils
(
Cmd
,
runPGSQuery
,
runOpaQuery
,
formatPGSQuery
)
import
Gargantext.Prelude
import
Prelude
(
Enum
,
Bounded
,
minBound
,
maxBound
,
Functor
)
import
Servant
(
FromHttpApiData
,
parseUrlPiece
,
Proxy
(
..
))
...
...
src/Gargantext/Database/Schema/NodeNode.hs
View file @
37d8ac18
...
...
@@ -28,7 +28,6 @@ module Gargantext.Database.Schema.NodeNode where
import
Data.Maybe
(
Maybe
)
import
Gargantext.Core.Types
import
Gargantext.Database.Admin.Utils
import
Gargantext.Database.Schema.Prelude
import
Gargantext.Prelude
...
...
@@ -69,14 +68,8 @@ nodeNodeTable = Table "nodes_nodes" (pNodeNode
}
)
queryNodeNodeTable
::
Query
NodeNodeRead
queryNodeNodeTable
=
queryTable
nodeNodeTable
-- | not optimized (get all ngrams without filters)
nodesNodes
::
Cmd
err
[
NodeNode
]
nodesNodes
=
runOpaQuery
queryNodeNodeTable
instance
QueryRunnerColumnDefault
(
Nullable
PGInt4
)
Int
where
queryRunnerColumnDefault
=
fieldQueryRunnerColumn
...
...
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