Safe Haskell | None |
---|---|
Language | Haskell98 |
Internal module exposing the guts of the package. Use at your own risk. No API stability guarantees apply.
- data PersistentSession sess = PersistentSession {
- persistentSessionKey :: !(SessionId sess)
- persistentSessionAuthId :: !(Maybe ByteStringJ)
- persistentSessionSession :: !(Decomposed sess)
- persistentSessionCreatedAt :: !UTCTime
- persistentSessionAccessedAt :: !UTCTime
- 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 {
- connPool :: ConnectionPool
- 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.
PersistentSession | |
|
Eq (Key (PersistentSession sess)) Source # | |
Eq (Decomposed sess) => Eq (PersistentSession sess) Source # | |
Ord (Key (PersistentSession sess)) Source # | |
Ord (Decomposed sess) => Ord (PersistentSession sess) Source # | |
Read (Key (PersistentSession sess)) Source # | |
Show (Key (PersistentSession sess)) Source # | |
Show (Decomposed sess) => Show (PersistentSession sess) Source # | |
ToJSON (Key (PersistentSession sess)) Source # | |
(ToJSON (Decomposed sess), PersistFieldSql (Decomposed sess)) => ToJSON (Entity (PersistentSession sess)) Source # | |
ToJSON (Decomposed sess) => ToJSON (PersistentSession sess) Source # | |
PersistField (Key (PersistentSession sess)) Source # | |
PersistFieldSql (Decomposed sess) => PersistEntity (PersistentSession sess) Source # | |
PersistFieldSql (Key (PersistentSession sess)) Source # | |
PathPiece (Key (PersistentSession sess)) Source # | |
FromJSON (Key (PersistentSession sess)) Source # | |
(FromJSON (Decomposed sess), PersistFieldSql (Decomposed sess)) => FromJSON (Entity (PersistentSession sess)) Source # | |
FromJSON (Decomposed sess) => FromJSON (PersistentSession sess) Source # | |
data Unique (PersistentSession sess) Source # | |
type PersistEntityBackend (PersistentSession sess) Source # | |
data Key (PersistentSession sess) Source # | |
data EntityField (PersistentSession sess) Source # | |
type PersistentSessionId sess = Key (PersistentSession sess) Source #
data family EntityField record a :: * #
data EntityField (PersistentSession sess) # | |
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
.
SqlStorage | |
|
(IsSessionData sess, PersistFieldSql (Decomposed sess)) => Storage (SqlStorage sess) Source # | |
type TransactionM (SqlStorage sess) Source # | |
type SessionData (SqlStorage sess) Source # | |
throwSS :: Storage (SqlStorage sess) => StorageException (SqlStorage sess) -> TransactionM (SqlStorage sess) a Source #
Specialization of throwIO
for SqlStorage
.