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

Safe HaskellNone
LanguageHaskell2010

TsWeb.Tables.Session

Description

Spock likes to store its session RAM, which is mostly great unless you need persistence or multiple machines. This doesn't do anything interesting with Spock's session manager, but just defines enough of a table to be able to store Spock's core session information.

Synopsis

Documentation

data SessionT d f Source #

A generic Beam table to store a Spock session. The _sessionData should be your useful info, like a logged-in user or whatever. See TsWeb.Tables.Session.Test for a type-checking but not very function idea of what _sessionData could look like, or the code under main for a fully-functional (but dumb) webapp using all this stuff.

Constructors

Session 

Fields

Instances
Beamable (PrimaryKey (SessionT d)) Source # 
Instance details

Defined in TsWeb.Tables.Session

Methods

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

tblSkeleton :: TableSkeleton (PrimaryKey (SessionT d))

Beamable d => Beamable (SessionT d) Source # 
Instance details

Defined in TsWeb.Tables.Session

Methods

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

tblSkeleton :: TableSkeleton (SessionT d)

(Beamable d, Typeable d) => Table (SessionT d) Source # 
Instance details

Defined in TsWeb.Tables.Session

Associated Types

data PrimaryKey (SessionT d) column :: Type #

Methods

primaryKey :: SessionT d column -> PrimaryKey (SessionT d) column #

Eq (PrimaryKey (SessionT d) Identity) Source # 
Instance details

Defined in TsWeb.Tables.Session

Eq (d Identity) => Eq (SessionT d Identity) Source # 
Instance details

Defined in TsWeb.Tables.Session

Ord (PrimaryKey (SessionT d) Identity) Source # 
Instance details

Defined in TsWeb.Tables.Session

Ord (d Identity) => Ord (SessionT d Identity) Source # 
Instance details

Defined in TsWeb.Tables.Session

Show (PrimaryKey (SessionT d) Identity) Source # 
Instance details

Defined in TsWeb.Tables.Session

Show (d Identity) => Show (SessionT d Identity) Source # 
Instance details

Defined in TsWeb.Tables.Session

Generic (PrimaryKey (SessionT d) f) Source # 
Instance details

Defined in TsWeb.Tables.Session

Associated Types

type Rep (PrimaryKey (SessionT d) f) :: Type -> Type #

Methods

from :: PrimaryKey (SessionT d) f -> Rep (PrimaryKey (SessionT d) f) x #

to :: Rep (PrimaryKey (SessionT d) f) x -> PrimaryKey (SessionT d) f #

Generic (SessionT d f) Source # 
Instance details

Defined in TsWeb.Tables.Session

Associated Types

type Rep (SessionT d f) :: Type -> Type #

Methods

from :: SessionT d f -> Rep (SessionT d f) x #

to :: Rep (SessionT d f) x -> SessionT d f #

data PrimaryKey (SessionT d) f Source # 
Instance details

Defined in TsWeb.Tables.Session

type Rep (PrimaryKey (SessionT d) f) Source # 
Instance details

Defined in TsWeb.Tables.Session

type Rep (PrimaryKey (SessionT d) f) = D1 (MetaData "PrimaryKey" "TsWeb.Tables.Session" "tsweb-0.1.0.0-LWBh5ZDtCK97War1o0evkf" False) (C1 (MetaCons "SessionId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Columnar f Text))))
type Rep (SessionT d f) Source # 
Instance details

Defined in TsWeb.Tables.Session

type Rep (SessionT d f) = D1 (MetaData "SessionT" "TsWeb.Tables.Session" "tsweb-0.1.0.0-LWBh5ZDtCK97War1o0evkf" False) (C1 (MetaCons "Session" PrefixI True) ((S1 (MetaSel (Just "_sessionId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (C f Text)) :*: S1 (MetaSel (Just "_sessionCsrf") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (C f Text))) :*: (S1 (MetaSel (Just "_sessionExpires") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (C f UTCTime)) :*: S1 (MetaSel (Just "_sessionData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (d f)))))

type Session d = SessionT d Identity Source #

Concrete session

type SessionId d = PrimaryKey (SessionT d) Identity Source #

Session primary key