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.Facet

Description

 
Synopsis

Documentation

filterWith :: (SqlOrd date, SqlOrd title, SqlOrd category, SqlOrd score, hyperdata ~ SqlJsonb) => Maybe Offset -> Maybe Limit -> Maybe OrderBy -> Select (Facet id (Field date) (Field title) (Field hyperdata) (FieldNullable category) ngramCount (FieldNullable score)) -> Select (Facet id (Field date) (Field title) (Field hyperdata) (FieldNullable category) ngramCount (FieldNullable score)) #

type Category = Int #

DocFacet

type Score = Double #

type Title = Text #

data Pair i l #

TODO after demo data Facet id date hyperdata score = FacetDoc { facetDoc_id :: id , facetDoc_date :: date , facetDoc_hyperdata :: hyperdata , facetDoc_score :: score } deriving (Show, Generic)

Constructors

Pair 

Fields

Instances

Instances details
(ProductProfunctor p, Default p a1_0 a1_1, Default p a2_0 a2_1) => Default p (Pair a1_0 a2_0) (Pair a1_1 a2_1) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

def :: p (Pair a1_0 a2_0) (Pair a1_1 a2_1) #

(Arbitrary i, Arbitrary l) => Arbitrary (Pair i l) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

arbitrary :: Gen (Pair i l) #

shrink :: Pair i l -> [Pair i l] #

(FromJSON i, FromJSON l) => FromJSON (Pair i l) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

parseJSON :: Value -> Parser (Pair i l) #

parseJSONList :: Value -> Parser [Pair i l] #

(ToJSON i, ToJSON l) => ToJSON (Pair i l) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

toJSON :: Pair i l -> Value #

toEncoding :: Pair i l -> Encoding #

toJSONList :: [Pair i l] -> Value #

toEncodingList :: [Pair i l] -> Encoding #

Generic (Pair i l) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Associated Types

type Rep (Pair i l) :: Type -> Type #

Methods

from :: Pair i l -> Rep (Pair i l) x #

to :: Rep (Pair i l) x -> Pair i l #

(Show i, Show l) => Show (Pair i l) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

showsPrec :: Int -> Pair i l -> ShowS #

show :: Pair i l -> String #

showList :: [Pair i l] -> ShowS #

(Typeable i, Typeable l, ToSchema i, ToSchema l) => ToSchema (Pair i l) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

type Rep (Pair i l) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

type Rep (Pair i l) = D1 ('MetaData "Pair" "Gargantext.Database.Query.Facet.Types" "gargantext-0.0.7.1.5.3-inplace" 'False) (C1 ('MetaCons "Pair" 'PrefixI 'True) (S1 ('MetaSel ('Just "_p_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 i) :*: S1 ('MetaSel ('Just "_p_label") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 l)))

data Facet id created title hyperdata category ngramCount score #

Constructors

FacetDoc 

Fields

Instances

Instances details
Arbitrary FacetDoc #

Mock and Quickcheck instances

Instance details

Defined in Gargantext.Database.Query.Facet.Types

ToSchema FacetDoc #

Documentation instance

Instance details

Defined in Gargantext.Database.Query.Facet.Types

HasSwagger (WithCustomErrorScheme GargAPI) # 
Instance details

Defined in Gargantext.API.Routes

(ProductProfunctor p, Default p a1_0 a1_1, Default p a2_0 a2_1, Default p a3_0 a3_1, Default p a4_0 a4_1, Default p a5_0 a5_1, Default p a6_0 a6_1, Default p a7_0 a7_1) => Default p (Facet a1_0 a2_0 a3_0 a4_0 a5_0 a6_0 a7_0) (Facet a1_1 a2_1 a3_1 a4_1 a5_1 a6_1 a7_1) #

Database instances

Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

def :: p (Facet a1_0 a2_0 a3_0 a4_0 a5_0 a6_0 a7_0) (Facet a1_1 a2_1 a3_1 a4_1 a5_1 a6_1 a7_1) #

(FromJSON id, FromJSON created, FromJSON title, FromJSON hyperdata, FromJSON category, FromJSON ngramCount, FromJSON score) => FromJSON (Facet id created title hyperdata category ngramCount score) #

JSON instance

Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

parseJSON :: Value -> Parser (Facet id created title hyperdata category ngramCount score) #

parseJSONList :: Value -> Parser [Facet id created title hyperdata category ngramCount score] #

(ToJSON id, ToJSON created, ToJSON title, ToJSON hyperdata, ToJSON category, ToJSON ngramCount, ToJSON score) => ToJSON (Facet id created title hyperdata category ngramCount score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

toJSON :: Facet id created title hyperdata category ngramCount score -> Value #

toEncoding :: Facet id created title hyperdata category ngramCount score -> Encoding #

toJSONList :: [Facet id created title hyperdata category ngramCount score] -> Value #

toEncodingList :: [Facet id created title hyperdata category ngramCount score] -> Encoding #

Generic (Facet id created title hyperdata category ngramCount score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Associated Types

type Rep (Facet id created title hyperdata category ngramCount score) :: Type -> Type #

Methods

from :: Facet id created title hyperdata category ngramCount score -> Rep (Facet id created title hyperdata category ngramCount score) x #

to :: Rep (Facet id created title hyperdata category ngramCount score) x -> Facet id created title hyperdata category ngramCount score #

(Show id, Show created, Show title, Show hyperdata, Show category, Show ngramCount, Show score) => Show (Facet id created title hyperdata category ngramCount score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

showsPrec :: Int -> Facet id created title hyperdata category ngramCount score -> ShowS #

show :: Facet id created title hyperdata category ngramCount score -> String #

showList :: [Facet id created title hyperdata category ngramCount score] -> ShowS #

type Rep (Facet id created title hyperdata category ngramCount score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

type Rep (Facet id created title hyperdata category ngramCount score) = D1 ('MetaData "Facet" "Gargantext.Database.Query.Facet.Types" "gargantext-0.0.7.1.5.3-inplace" 'False) (C1 ('MetaCons "FacetDoc" 'PrefixI 'True) ((S1 ('MetaSel ('Just "facetDoc_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 id) :*: (S1 ('MetaSel ('Just "facetDoc_created") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 created) :*: S1 ('MetaSel ('Just "facetDoc_title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 title))) :*: ((S1 ('MetaSel ('Just "facetDoc_hyperdata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 hyperdata) :*: S1 ('MetaSel ('Just "facetDoc_category") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 category)) :*: (S1 ('MetaSel ('Just "facetDoc_ngramCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ngramCount) :*: S1 ('MetaSel ('Just "facetDoc_score") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 score)))))

data FacetPaired id date hyperdata score #

Constructors

FacetPaired 

Fields

Instances

Instances details
(ProductProfunctor p, Default p a1_0 a1_1, Default p a2_0 a2_1, Default p a3_0 a3_1, Default p a4_0 a4_1) => Default p (FacetPaired a1_0 a2_0 a3_0 a4_0) (FacetPaired a1_1 a2_1 a3_1 a4_1) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

def :: p (FacetPaired a1_0 a2_0 a3_0 a4_0) (FacetPaired a1_1 a2_1 a3_1 a4_1) #

(Arbitrary id, Arbitrary date, Arbitrary hyperdata, Arbitrary score) => Arbitrary (FacetPaired id date hyperdata score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

arbitrary :: Gen (FacetPaired id date hyperdata score) #

shrink :: FacetPaired id date hyperdata score -> [FacetPaired id date hyperdata score] #

(FromJSON id, FromJSON date, FromJSON hyperdata, FromJSON score) => FromJSON (FacetPaired id date hyperdata score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

parseJSON :: Value -> Parser (FacetPaired id date hyperdata score) #

parseJSONList :: Value -> Parser [FacetPaired id date hyperdata score] #

(ToJSON id, ToJSON date, ToJSON hyperdata, ToJSON score) => ToJSON (FacetPaired id date hyperdata score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

toJSON :: FacetPaired id date hyperdata score -> Value #

toEncoding :: FacetPaired id date hyperdata score -> Encoding #

toJSONList :: [FacetPaired id date hyperdata score] -> Value #

toEncodingList :: [FacetPaired id date hyperdata score] -> Encoding #

Generic (FacetPaired id date hyperdata score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Associated Types

type Rep (FacetPaired id date hyperdata score) :: Type -> Type #

Methods

from :: FacetPaired id date hyperdata score -> Rep (FacetPaired id date hyperdata score) x #

to :: Rep (FacetPaired id date hyperdata score) x -> FacetPaired id date hyperdata score #

(Show id, Show date, Show hyperdata, Show score) => Show (FacetPaired id date hyperdata score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

showsPrec :: Int -> FacetPaired id date hyperdata score -> ShowS #

show :: FacetPaired id date hyperdata score -> String #

showList :: [FacetPaired id date hyperdata score] -> ShowS #

(ToSchema id, ToSchema date, ToSchema hyperdata, ToSchema score, Typeable id, Typeable date, Typeable hyperdata, Typeable score) => ToSchema (FacetPaired id date hyperdata score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

declareNamedSchema :: Proxy (FacetPaired id date hyperdata score) -> Declare (Definitions Schema) NamedSchema #

type Rep (FacetPaired id date hyperdata score) # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

type Rep (FacetPaired id date hyperdata score) = D1 ('MetaData "FacetPaired" "Gargantext.Database.Query.Facet.Types" "gargantext-0.0.7.1.5.3-inplace" 'False) (C1 ('MetaCons "FacetPaired" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_fp_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 id) :*: S1 ('MetaSel ('Just "_fp_date") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 date)) :*: (S1 ('MetaSel ('Just "_fp_hyperdata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 hyperdata) :*: S1 ('MetaSel ('Just "_fp_score") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 score))))

data OrderBy #

Instances

Instances details
Arbitrary OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

FromJSON OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

ToJSON OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Bounded OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Enum OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Generic OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Associated Types

type Rep OrderBy :: Type -> Type #

Methods

from :: OrderBy -> Rep OrderBy x #

to :: Rep OrderBy x -> OrderBy #

Read OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Show OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

FromHttpApiData OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

ToHttpApiData OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

ToParamSchema OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

Methods

toParamSchema :: forall (t :: SwaggerKind Type). Proxy OrderBy -> ParamSchema t #

ToSchema OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

HasSwagger (WithCustomErrorScheme GargAPI) # 
Instance details

Defined in Gargantext.API.Routes

type Rep OrderBy # 
Instance details

Defined in Gargantext.Database.Query.Facet.Types

type Rep OrderBy = D1 ('MetaData "OrderBy" "Gargantext.Database.Query.Facet.Types" "gargantext-0.0.7.1.5.3-inplace" 'False) (((C1 ('MetaCons "DateAsc" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DateDesc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TitleAsc" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TitleDesc" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NgramCountDesc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NgramCountAsc" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ScoreDesc" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ScoreAsc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SourceAsc" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SourceDesc" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TagAsc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TagDesc" 'PrefixI 'False) (U1 :: Type -> Type)))))