selda-json-0.1.1.1: JSON support for the Selda database library.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.Selda.JSON

Synopsis

Documentation

class JSONBackend b where Source #

Any backend that supports JSON lookups in queries.

Methods

(~>) :: JSONValue a => Col b a -> Col b Text -> Col b (Maybe Value) infixl 8 Source #

Look up the given key in the given JSON column.

jsonToText :: Col b Value -> Col b Text Source #

Convert the given JSON column to plain text.

Instances

Instances details
JSONBackend b => JSONBackend (Inner b) Source # 
Instance details

Defined in Database.Selda.JSON

Methods

(~>) :: JSONValue a => Col (Inner b) a -> Col (Inner b) Text -> Col (Inner b) (Maybe Value) Source #

jsonToText :: Col (Inner b) Value -> Col (Inner b) Text Source #

Orphan instances

FromJSON RowID Source # 
Instance details

ToJSON RowID Source # 
Instance details

SqlType Value Source # 
Instance details

FromJSON (ID a) Source # 
Instance details

Methods

parseJSON :: Value -> Parser (ID a) #

parseJSONList :: Value -> Parser [ID a] #

ToJSON (ID a) Source # 
Instance details

Methods

toJSON :: ID a -> Value #

toEncoding :: ID a -> Encoding #

toJSONList :: [ID a] -> Value #

toEncodingList :: [ID a] -> Encoding #