gini-storage-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Gini.Storage.Cache.Schema

Description

Schema for fast but less reliable cache data

Documentation

data Peer #

Constructors

Peer 
Instances
PersistEntity Peer # 
Instance details

Defined in Gini.Storage.Cache.Schema

Associated Types

type PersistEntityBackend Peer :: *

data Key Peer :: *

data EntityField Peer a :: *

data Unique Peer :: *

Methods

keyToValues :: Key Peer -> [PersistValue]

keyFromValues :: [PersistValue] -> Either Text (Key Peer)

persistIdField :: EntityField Peer (Key Peer)

entityDef :: Monad m => m Peer -> EntityDef

persistFieldDef :: EntityField Peer typ -> FieldDef

toPersistFields :: Peer -> [SomePersistField]

fromPersistValues :: [PersistValue] -> Either Text Peer

persistUniqueKeys :: Peer -> [Unique Peer]

persistUniqueToFieldNames :: Unique Peer -> [(HaskellName, DBName)]

persistUniqueToValues :: Unique Peer -> [PersistValue]

fieldLens :: EntityField Peer field -> forall (f :: * -> *). Functor f => (field -> f field) -> Entity Peer -> f (Entity Peer)

PersistField Peer # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

toPersistValue :: Peer -> PersistValue

fromPersistValue :: PersistValue -> Either Text Peer

PersistFieldSql Peer # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

sqlType :: Proxy Peer -> SqlType

ToBackendKey SqlBackend Peer # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

toBackendKey :: Key Peer -> BackendKey SqlBackend

fromBackendKey :: BackendKey SqlBackend -> Key Peer

Eq (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

(==) :: Key Peer -> Key Peer -> Bool #

(/=) :: Key Peer -> Key Peer -> Bool #

Ord (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

compare :: Key Peer -> Key Peer -> Ordering #

(<) :: Key Peer -> Key Peer -> Bool #

(<=) :: Key Peer -> Key Peer -> Bool #

(>) :: Key Peer -> Key Peer -> Bool #

(>=) :: Key Peer -> Key Peer -> Bool #

max :: Key Peer -> Key Peer -> Key Peer #

min :: Key Peer -> Key Peer -> Key Peer #

Read (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

readsPrec :: Int -> ReadS (Key Peer) #

readList :: ReadS [Key Peer] #

readPrec :: ReadPrec (Key Peer) #

readListPrec :: ReadPrec [Key Peer] #

Show (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

showsPrec :: Int -> Key Peer -> ShowS #

show :: Key Peer -> String #

showList :: [Key Peer] -> ShowS #

PathPiece (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

fromPathPiece :: Text -> Maybe (Key Peer) #

toPathPiece :: Key Peer -> Text #

PersistField (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

toPersistValue :: Key Peer -> PersistValue

fromPersistValue :: PersistValue -> Either Text (Key Peer)

PersistFieldSql (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

sqlType :: Proxy (Key Peer) -> SqlType

FromJSON (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

parseJSON :: Value -> Parser (Key Peer)

parseJSONList :: Value -> Parser [Key Peer]

ToJSON (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

Methods

toJSON :: Key Peer -> Value

toEncoding :: Key Peer -> Encoding

toJSONList :: [Key Peer] -> Value

toEncodingList :: [Key Peer] -> Encoding

FromHttpApiData (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

ToHttpApiData (Key Peer) # 
Instance details

Defined in Gini.Storage.Cache.Schema

data EntityField Peer typ # 
Instance details

Defined in Gini.Storage.Cache.Schema

data EntityField Peer typ where
data Key Peer # 
Instance details

Defined in Gini.Storage.Cache.Schema

data Key Peer = PeerKey {}
type PersistEntityBackend Peer # 
Instance details

Defined in Gini.Storage.Cache.Schema

type PersistEntityBackend Peer = SqlBackend
data Unique Peer # 
Instance details

Defined in Gini.Storage.Cache.Schema

data Unique Peer = UniquePeer Peer

type PeerId = Key Peer #

migrateCache :: Migration #