jordan-servant-0.1.0.0: Servant Combinators for Jordan
Safe HaskellNone
LanguageHaskell2010

Jordan.Servant.Query.Render

Synopsis

Documentation

newtype QueryRender a Source #

Constructors

QueryRender 

Fields

Instances

Instances details
Contravariant QueryRender Source # 
Instance details

Defined in Jordan.Servant.Query.Render

Methods

contramap :: (a -> b) -> QueryRender b -> QueryRender a #

(>$) :: b -> QueryRender b -> QueryRender a #

Divisible QueryRender Source # 
Instance details

Defined in Jordan.Servant.Query.Render

Methods

divide :: (a -> (b, c)) -> QueryRender b -> QueryRender c -> QueryRender a #

conquer :: QueryRender a #

Selectable QueryRender Source # 
Instance details

Defined in Jordan.Servant.Query.Render

Methods

giveUp :: (arg -> Void) -> QueryRender arg #

select :: (arg -> Either lhs rhs) -> QueryRender lhs -> QueryRender rhs -> QueryRender arg #

JSONObjectSerializer QueryRender Source # 
Instance details

Defined in Jordan.Servant.Query.Render

Methods

serializeFieldWith :: Text -> (forall (jsonSerializer :: Type -> Type). JSONSerializer jsonSerializer => jsonSerializer a) -> QueryRender a #

serializeField :: ToJSON a => Text -> QueryRender a #

serializeDescribeFieldWith :: Text -> Text -> (forall (valueSerializer :: Type -> Type). JSONSerializer valueSerializer => valueSerializer a) -> QueryRender a #

serializeJust :: Text -> (forall (jsonSerializer :: Type -> Type). JSONSerializer jsonSerializer => jsonSerializer a) -> QueryRender (Maybe a) #

JSONTupleSerializer QueryRender Source # 
Instance details

Defined in Jordan.Servant.Query.Render

Methods

serializeItemWith :: (forall (jsonSerializer :: Type -> Type). JSONSerializer jsonSerializer => jsonSerializer a) -> QueryRender a #

serializeItem :: ToJSON a => QueryRender a #

JSONSerializer QueryRender Source # 
Instance details

Defined in Jordan.Servant.Query.Render

Methods

serializeObject :: (forall (objSerializer :: Type -> Type). JSONObjectSerializer objSerializer => objSerializer a) -> QueryRender a #

serializeDictionary :: Foldable t => (forall (jsonSerializer :: Type -> Type). JSONSerializer jsonSerializer => jsonSerializer a) -> QueryRender (t (Text, a)) #

serializeText :: QueryRender Text #

serializeTextConstant :: Text -> QueryRender a #

serializeNull :: QueryRender any #

serializeNumber :: QueryRender Scientific #

serializeBool :: QueryRender Bool #

serializeTuple :: (forall (tupleSerializer :: Type -> Type). JSONTupleSerializer tupleSerializer => tupleSerializer a) -> QueryRender a #

serializeArray :: ToJSON a => QueryRender [a] #

nameSerializer :: Text -> QueryRender a -> QueryRender a #

Semigroup (QueryRender a) Source # 
Instance details

Defined in Jordan.Servant.Query.Render

Monoid (QueryRender a) Source # 
Instance details

Defined in Jordan.Servant.Query.Render

renderQueryAtKeyWith Source #

Arguments

:: (forall jsonSerializer. JSONSerializer jsonSerializer => jsonSerializer a)

Query renderer to use.

-> Text

Base key

-> a

Value to serialize

-> Query

Query

renderQueryAtKey :: ToJSON a => Text -> a -> Query Source #

Render a query at a given key, using the ToJSON instance, which is what you want most of the time.