Copyright | (c) CNRS 2017-Present |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- getRootId :: HasNodeError err => User -> DBCmd err NodeId
- getRoot :: User -> DBCmd err [Node HyperdataUser]
- getOrMkRoot :: HasNodeError err => User -> DBCmd err (UserId, RootId)
- data MkCorpusUser
- userFromMkCorpusUser :: MkCorpusUser -> User
- getOrMkRootWithCorpus :: (HasNodeError err, MkCorpus a) => MkCorpusUser -> Maybe a -> DBCmd err (UserId, RootId, CorpusId)
- mkCorpus :: (HasNodeError err, MkCorpus a) => CorpusName -> Maybe a -> RootId -> UserId -> DBCmd err (UserId, RootId, CorpusId)
- mkRoot :: HasNodeError err => User -> DBCmd err [RootId]
- selectRoot :: User -> Select NodeRead
Documentation
getOrMkRoot :: HasNodeError err => User -> DBCmd err (UserId, RootId) #
data MkCorpusUser #
Datatype for the getOrMkRootWithCorpus
.
There are only 3 possibilities:
- User is userMaster and then there is no corpus name
- User is a normal user and then we pass corpus name
- User is a normal user and then we pass corpus ids
MkCorpusUserMaster | |
MkCorpusUserNormalCorpusName User CorpusName | |
MkCorpusUserNormalCorpusIds User [CorpusId] |
Instances
Show MkCorpusUser # | |
Defined in Gargantext.Database.Query.Tree.Root showsPrec :: Int -> MkCorpusUser -> ShowS # show :: MkCorpusUser -> String # showList :: [MkCorpusUser] -> ShowS # | |
Eq MkCorpusUser # | |
Defined in Gargantext.Database.Query.Tree.Root (==) :: MkCorpusUser -> MkCorpusUser -> Bool # (/=) :: MkCorpusUser -> MkCorpusUser -> Bool # |
getOrMkRootWithCorpus :: (HasNodeError err, MkCorpus a) => MkCorpusUser -> Maybe a -> DBCmd err (UserId, RootId, CorpusId) #
mkCorpus :: (HasNodeError err, MkCorpus a) => CorpusName -> Maybe a -> RootId -> UserId -> DBCmd err (UserId, RootId, CorpusId) #
Helper function for getOrMkRootWithCorpus
.
selectRoot :: User -> Select NodeRead #