| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Gargantext.Core.Text.Corpus.Query
Contents
Synopsis
- data Query
- newtype RawQuery = RawQuery {
- getRawQuery :: Text
- newtype Limit = Limit {}
- data QueryTerm
- getQuery :: Query -> CNF [QueryTerm]
- parseQuery :: RawQuery -> Either String Query
- mapQuery :: (QueryTerm -> QueryTerm) -> Query -> Query
- renderQuery :: Query -> RawQuery
- renderQueryTerm :: QueryTerm -> Text
- interpretQuery :: Query -> (BoolExpr [QueryTerm] -> ast) -> ast
- data ExternalAPIs
- module Data.BoolExpr.Printer
- module Data.BoolExpr.Parser
- module Data.BoolExpr
- unsafeMkQuery :: BoolExpr [QueryTerm] -> Query
Documentation
An opaque wrapper around a Query type which can be parsed from a boolean
expression like (a AND b) OR c, and which can be interpreted in many ways
according to the particular service we are targeting.
opaque
A raw query, as typed by the user from the frontend.
Constructors
| RawQuery | |
Fields
| |
Instances
A limit to the number of results we want to retrieve.
Instances
| FromJSON Limit # | |
| ToJSON Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query | |
| Num Limit # | |
| Show Limit # | |
| Eq Limit # | |
| FromHttpApiData Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query | |
| ToHttpApiData Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query Methods toUrlPiece :: Limit -> Text # toEncodedUrlPiece :: Limit -> Builder # toHeader :: Limit -> ByteString # toQueryParam :: Limit -> Text # | |
| ToParamSchema Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query Methods toParamSchema :: forall (t :: SwaggerKind Type). Proxy Limit -> ParamSchema t # | |
| ToSchema Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query Methods declareNamedSchema :: Proxy Limit -> Declare (Definitions Schema) NamedSchema # | |
A query term, i.e. a node of the query expression tree which can be
either a Gargantext Term (i.e. just a textual value) or something else,
like a partial match (i.e. the user is asking to perform a search that would
match only a suffix of a word).
Constructors
| QT_exact_match Term | |
| QT_partial_match Term |
Instances
| IsString QueryTerm # | |
Defined in Gargantext.Core.Text.Corpus.Query Methods fromString :: String -> QueryTerm # | |
| Show QueryTerm # | |
| Eq QueryTerm # | |
| Ord QueryTerm # | |
Defined in Gargantext.Core.Text.Corpus.Query | |
parseQuery :: RawQuery -> Either String Query #
Parses an input Text into a Query, reporting an error if it fails.
renderQuery :: Query -> RawQuery #
renderQueryTerm :: QueryTerm -> Text #
interpretQuery :: Query -> (BoolExpr [QueryTerm] -> ast) -> ast #
data ExternalAPIs #
Main Types TODO IsidoreAuth
Instances
module Data.BoolExpr.Printer
module Data.BoolExpr.Parser
module Data.BoolExpr
Useful for testing
unsafeMkQuery :: BoolExpr [QueryTerm] -> Query #