Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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.
Instances
Arbitrary RawQuery # | |
FromJSON RawQuery # | |
ToJSON RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query | |
IsString RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query fromString :: String -> RawQuery # | |
Show RawQuery # | |
Eq RawQuery # | |
FromHttpApiData RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query parseUrlPiece :: Text -> Either Text RawQuery # parseHeader :: ByteString -> Either Text RawQuery # | |
ToHttpApiData RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query toUrlPiece :: RawQuery -> Text # toEncodedUrlPiece :: RawQuery -> Builder # toHeader :: RawQuery -> ByteString # toQueryParam :: RawQuery -> Text # | |
ToParamSchema RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query toParamSchema :: forall (t :: SwaggerKind Type). Proxy RawQuery -> ParamSchema t # | |
ToSchema RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query | |
HasSwagger (WithCustomErrorScheme GargAPI) # | |
Defined in Gargantext.API.Routes |
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 parseUrlPiece :: Text -> Either Text Limit # parseHeader :: ByteString -> Either Text Limit # | |
ToHttpApiData Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query toUrlPiece :: Limit -> Text # toEncodedUrlPiece :: Limit -> Builder # toHeader :: Limit -> ByteString # toQueryParam :: Limit -> Text # | |
ToParamSchema Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query toParamSchema :: forall (t :: SwaggerKind Type). Proxy Limit -> ParamSchema t # | |
ToSchema Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query |
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).
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 #