Safe Haskell | None |
---|---|
Language | Haskell98 |
Web.ServerSession.Backend.Persistent.Internal.Impl
Description
Internal module exposing the guts of the package. Use at your own risk. No API stability guarantees apply.
- data PersistentSession sess = PersistentSession {}
- type PersistentSessionId sess = Key (PersistentSession sess)
- data family EntityField record $a
- serverSessionDefs :: forall sess. PersistEntity (PersistentSession sess) => Proxy sess -> [EntityDef]
- psKey :: SessionId sess -> Key (PersistentSession sess)
- toPersistentSession :: Session sess -> PersistentSession sess
- fromPersistentSession :: PersistentSession sess -> Session sess
- newtype SqlStorage sess = SqlStorage {}
- throwSS :: Storage (SqlStorage sess) => StorageException (SqlStorage sess) -> TransactionM (SqlStorage sess) a
Documentation
data PersistentSession sess Source
Entity corresponding to a Session
.
We're bending persistent
in ways it wasn't expected to. In
particular, this entity is parametrized over the session type.
Constructors
PersistentSession | |
Fields
|
Instances
type PersistentSessionId sess = Key (PersistentSession sess) Source
data family EntityField record $a
An EntityField
is parameterised by the Haskell record it belongs to
and the additional type of that field
Instances
data EntityField (PersistentSession sess) where
|
serverSessionDefs :: forall sess. PersistEntity (PersistentSession sess) => Proxy sess -> [EntityDef] Source
Entity definitions needed to generate the SQL schema for
SqlStorage
. Example using SessionMap
:
serverSessionDefs (Proxy :: Proxy SessionMap)
psKey :: SessionId sess -> Key (PersistentSession sess) Source
Generate a key to the entity from the session ID.
toPersistentSession :: Session sess -> PersistentSession sess Source
Convert from Session
to PersistentSession
.
fromPersistentSession :: PersistentSession sess -> Session sess Source
Convert from PersistentSession
to Session
.
newtype SqlStorage sess Source
SQL session storage backend using persistent
.
Constructors
SqlStorage | |
Fields
|
Instances
(IsSessionData sess, PersistFieldSql (Decomposed sess)) => Storage (SqlStorage sess) | |
Typeable (* -> *) SqlStorage | |
type TransactionM (SqlStorage sess) = SqlPersistT IO | |
type SessionData (SqlStorage sess) = sess |
throwSS :: Storage (SqlStorage sess) => StorageException (SqlStorage sess) -> TransactionM (SqlStorage sess) a Source
Specialization of throwIO
for SqlStorage
.