gargantext-0.0.7.1.5.3: Search, map, share
Copyright(c) CNRS 2017-Present
LicenseAGPL + CECILL v3
Maintainerteam@gargantext.org
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gargantext.Database.Query.Table.Node

Description

 
Synopsis

Documentation

selectNodesWith :: HasDBid NodeType => ParentId -> Maybe NodeType -> Maybe Offset -> Maybe Limit -> Select NodeRead #

order by publication date Favorites (Bool), node_ngrams

getNodesWith :: (JSONB a, HasDBid NodeType) => NodeId -> proxy a -> Maybe NodeType -> Maybe Offset -> Maybe Limit -> DBCmd err [Node a] #

getClosestParentIdByType :: HasDBid NodeType => NodeId -> NodeType -> DBCmd err (Maybe NodeId) #

Given a node id, find it's closest parent of given type NOTE: This isn't too optimal: can make successive queries depending on how deeply nested the child is.

getClosestParentIdByType' :: HasDBid NodeType => NodeId -> NodeType -> DBCmd err (Maybe NodeId) #

Similar to getClosestParentIdByType but includes current node in search too

getChildrenByType :: HasDBid NodeType => NodeId -> NodeType -> DBCmd err [NodeId] #

Given a node id, find all it's children (no matter how deep) of given node type.

getClosestChildrenByType :: HasDBid NodeType => NodeId -> NodeType -> DBCmd err [NodeId] #

Given a node id, find all it's children (only first level) of given node type.

getNodesWithType :: (HasNodeError err, JSONB a, HasDBid NodeType) => NodeType -> proxy a -> DBCmd err [Node a] #

Example of use: runCmdReplEasy (getNodesWithType NodeList (Proxy :: Proxy HyperdataList))

getNodeWithType :: (HasNodeError err, JSONB a, HasDBid NodeType) => NodeId -> NodeType -> proxy a -> DBCmd err [Node a] #

getNodeWith :: (HasNodeError err, JSONB a) => NodeId -> proxy a -> DBCmd err (Node a) #

insertDefaultNode :: (HasDBid NodeType, HasNodeError err) => NodeType -> ParentId -> UserId -> DBCmd err NodeId #

Sugar to insert Node with NodeType in Database

insertNode :: (HasDBid NodeType, HasNodeError err) => NodeType -> Maybe Name -> Maybe DefaultHyperdata -> ParentId -> UserId -> DBCmd err NodeId #

nodeW :: HasDBid NodeType => NodeType -> Maybe Name -> Maybe DefaultHyperdata -> ParentId -> UserId -> NodeWrite #

data Node' #

Constructors

Node' 

Instances

Instances details
Show Node' # 
Instance details

Defined in Gargantext.Database.Query.Table.Node

Methods

showsPrec :: Int -> Node' -> ShowS #

show :: Node' -> String #

showList :: [Node'] -> ShowS #

data CorpusType #

CorpusDocument is a corpus made from a set of documents CorpusContact is a corpus made from a set of contacts (syn of Annuaire)

class MkCorpus a where #

Methods

mk :: (HasDBid NodeType, HasNodeError err) => Maybe Name -> Maybe a -> ParentId -> UserId -> DBCmd err [NodeId] #

defaultList :: (HasNodeError err, HasDBid NodeType) => CorpusId -> DBCmd err ListId #

TODO remove defaultList