Commit 51152a29 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Chart] Fix Docs count (Chart still not completed)

parent ca645b1c
...@@ -25,7 +25,7 @@ import Gargantext.Database.Admin.Config ...@@ -25,7 +25,7 @@ import Gargantext.Database.Admin.Config
import Gargantext.Database.Prelude import Gargantext.Database.Prelude
import Gargantext.Database.Query.Table.Node import Gargantext.Database.Query.Table.Node
import Gargantext.Database.Query.Table.Node.Select import Gargantext.Database.Query.Table.Node.Select
import Gargantext.Database.Query.Table.NodeNode (selectDocsDates) import Gargantext.Database.Query.Table.NodeContext (selectDocsDates)
import Gargantext.Database.Schema.Node import Gargantext.Database.Schema.Node
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Core.Text.Metrics.Count (occurrencesWith) import Gargantext.Core.Text.Metrics.Count (occurrencesWith)
......
...@@ -21,7 +21,7 @@ commentary with @some markup@. ...@@ -21,7 +21,7 @@ commentary with @some markup@.
module Gargantext.Database.Query.Table.NodeNode module Gargantext.Database.Query.Table.NodeNode
( module Gargantext.Database.Schema.NodeNode ( module Gargantext.Database.Schema.NodeNode
, queryNodeNodeTable , queryNodeNodeTable
, selectDocsDates , selectNodesDates
, selectDocNodes , selectDocNodes
, selectDocs , selectDocs
, getNodeNode , getNodeNode
...@@ -131,11 +131,9 @@ selectCountDocs cId = runCountOpaQuery (queryCountDocs cId) ...@@ -131,11 +131,9 @@ selectCountDocs cId = runCountOpaQuery (queryCountDocs cId)
returnA -< n returnA -< n
-- | TODO use UTCTime fast -- | TODO use UTCTime fast
selectDocsDates :: HasDBid NodeType => CorpusId -> Cmd err [Text] selectNodesDates :: HasDBid NodeType => CorpusId -> Cmd err [Text]
selectDocsDates cId = map (head' "selectDocsDates" . splitOn "-") selectNodesDates cId = map (head' "selectDocsDates" . splitOn "-")
<$> catMaybes <$> catMaybes
<$> map (view hd_publication_date) <$> map (view hd_publication_date)
<$> selectDocs cId <$> selectDocs cId
...@@ -174,7 +172,6 @@ joinOn1 = leftJoin queryNodeTable queryNodeNodeTable cond ...@@ -174,7 +172,6 @@ joinOn1 = leftJoin queryNodeTable queryNodeNodeTable cond
cond :: (NodeRead, NodeNodeRead) -> Column SqlBool cond :: (NodeRead, NodeNodeRead) -> Column SqlBool
cond (n, nn) = nn^.nn_node1_id .== n^.node_id cond (n, nn) = nn^.nn_node1_id .== n^.node_id
------------------------------------------------------------------------ ------------------------------------------------------------------------
selectPublicNodes :: HasDBid NodeType => (Hyperdata a, DefaultFromField SqlJsonb a) selectPublicNodes :: HasDBid NodeType => (Hyperdata a, DefaultFromField SqlJsonb a)
=> Cmd err [(Node a, Maybe Int)] => Cmd err [(Node a, Maybe Int)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment