| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Hipsql.API
Description
Public API for hipsql server and client implementations using servant.
Synopsis
- type HipsqlAPI = ToServantApi HipsqlRoutes
 - data HipsqlRoutes route = HipsqlRoutes {
- getVersion :: route :- (Summary "Gets the current server version" :> ("version" :> Get '[JSON] Version))
 - eval :: route :- (Summary "Evaluate a psql expression" :> ("eval" :> (ReqBody '[OctetStream] ByteString :> Post '[OctetStream] ByteString)))
 
 - theHipsqlAPI :: Proxy HipsqlAPI
 - theHipsqlApiVersion :: Version
 - renderVersion :: Version -> String
 - isCompatibleWith :: Version -> Version -> Bool
 
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
| Generic (HipsqlRoutes route) Source # | |
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 # | |
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.