hipsql-api-0.0.0.0
Safe HaskellNone
LanguageHaskell2010

Hipsql.API

Description

Public API for hipsql server and client implementations using servant.

Synopsis

Documentation

type HipsqlAPI = ToServantApi HipsqlRoutes Source #

The servant API type for hipsql.

data HipsqlRoutes route Source #

The API routes for hipsql.

Constructors

HipsqlRoutes 

Fields

Instances

Instances details
Generic (HipsqlRoutes route) Source # 
Instance details

Defined in Hipsql.API

Associated Types

type Rep (HipsqlRoutes route) :: Type -> Type #

Methods

from :: HipsqlRoutes route -> Rep (HipsqlRoutes route) x #

to :: Rep (HipsqlRoutes route) x -> HipsqlRoutes route #

type Rep (HipsqlRoutes route) Source # 
Instance details

Defined in Hipsql.API

type Rep (HipsqlRoutes route) = D1 ('MetaData "HipsqlRoutes" "Hipsql.API" "hipsql-api-0.0.0.0-inplace" 'False) (C1 ('MetaCons "HipsqlRoutes" 'PrefixI 'True) (S1 ('MetaSel ('Just "getVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (route :- (Summary "Gets the current server version" :> ("version" :> Get '[JSON] Version)))) :*: S1 ('MetaSel ('Just "eval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (route :- (Summary "Evaluate a psql expression" :> ("eval" :> (ReqBody '[OctetStream] ByteString :> Post '[OctetStream] ByteString)))))))

theHipsqlAPI :: Proxy HipsqlAPI Source #

A hipsql API proxy value.

theHipsqlApiVersion :: Version Source #

The current hipsql-api version; servers and clients should use this to report which version of the API they are compiled against.

renderVersion :: Version -> String Source #

Render a Version to a human-readable String.

isCompatibleWith :: Version -> Version -> Bool Source #

Check if two Versions are compatible wth one another.