selda-json-0.1.1.0: JSON support for the Selda database library.

Safe HaskellNone
LanguageHaskell2010

Database.Selda.JSON

Contents

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

ToJSON RowID Source # 
Instance details

FromJSON RowID Source # 
Instance details

SqlType Value Source # 
Instance details

ToJSON (ID a) Source # 
Instance details

Methods

toJSON :: ID a -> Value #

toEncoding :: ID a -> Encoding #

toJSONList :: [ID a] -> Value #

toEncodingList :: [ID a] -> Encoding #

FromJSON (ID a) Source # 
Instance details

Methods

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

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