tsweb-0.1.0.0: An API binding Web.Spock to Database.Beam

Safe HaskellNone
LanguageHaskell2010

TsWeb.Tables.Session.Test

Description

 
Synopsis

Documentation

data UsersMixin f Source #

Some sample user info

Constructors

Address 

Fields

Instances
Beamable UsersMixin Source # 
Instance details

Defined in TsWeb.Tables.Session.Test

Methods

zipBeamFieldsM :: Applicative m => (forall a. Columnar' f a -> Columnar' g a -> m (Columnar' h a)) -> UsersMixin f -> UsersMixin g -> m (UsersMixin h)

tblSkeleton :: TableSkeleton UsersMixin

UserData Users Source # 
Instance details

Defined in TsWeb.Tables.Session.Test

Generic (UsersMixin f) Source # 
Instance details

Defined in TsWeb.Tables.Session.Test

Associated Types

type Rep (UsersMixin f) :: Type -> Type #

Methods

from :: UsersMixin f -> Rep (UsersMixin f) x #

to :: Rep (UsersMixin f) x -> UsersMixin f #

type Rep (UsersMixin f) Source # 
Instance details

Defined in TsWeb.Tables.Session.Test

type Rep (UsersMixin f) = D1 (MetaData "UsersMixin" "TsWeb.Tables.Session.Test" "tsweb-0.1.0.0-LWBh5ZDtCK97War1o0evkf" False) (C1 (MetaCons "Address" PrefixI True) (S1 (MetaSel (Just "loginid") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (C f Int)) :*: (S1 (MetaSel (Just "masqid") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (C f Int)) :*: S1 (MetaSel (Just "remember") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (C f Bool)))))

type Users = UsersMixin Identity Source #

Concrete type for users

type Sess conn st = Session conn Users st Source #

Spock session alias to use our User

data Db f Source #

Beam database definition to hold our session

Constructors

Db 
Instances
Database be Db Source # 
Instance details

Defined in TsWeb.Tables.Session.Test

Methods

zipTables :: Monad m => Proxy be -> (forall tbl. (IsDatabaseEntity be tbl, DatabaseEntityRegularRequirements be tbl) => f tbl -> g tbl -> m (h tbl)) -> Db f -> Db g -> m (Db h)

Generic (Db f) Source # 
Instance details

Defined in TsWeb.Tables.Session.Test

Associated Types

type Rep (Db f) :: Type -> Type #

Methods

from :: Db f -> Rep (Db f) x #

to :: Rep (Db f) x -> Db f #

type Rep (Db f) Source # 
Instance details

Defined in TsWeb.Tables.Session.Test

type Rep (Db f) = D1 (MetaData "Db" "TsWeb.Tables.Session.Test" "tsweb-0.1.0.0-LWBh5ZDtCK97War1o0evkf" False) (C1 (MetaCons "Db" PrefixI True) (S1 (MetaSel (Just "session") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f (TableEntity (SessionT UsersMixin))))))

db :: DatabaseSettings be Db Source #

Beam database instance

patch :: Pool ReadOnlyConn -> Pool ReadWriteConn -> SpockCfg conn Users st -> SpockCfg conn Users st Source #

Sample of patch to be sure that all the types work enough to make a spock config wrapper