Copyright | (c) Max Amanshauser 2016 |
---|---|
License | MIT |
Maintainer | max@lambdalifting.org |
Safe Haskell | None |
Language | Haskell2010 |
This module is the main backend for FSMs. Instances are stored in a table with the name passed as storeName when creating the PostgresJSONStore. WALs use the same name with Wal appended.
- data PostgresJSONStore
- mkStore :: String -> Text -> IO PostgresJSONStore
- _fsmRead :: (FromJSON s, FromJSON e, FromJSON a, Typeable s, Typeable e, Typeable a, MealyInstance k s e a) => PostgresJSONStore -> k -> Proxy k s e a -> IO (Maybe (Instance k s e a))
- _fsmCreate :: forall k s e a. (ToJSON s, ToJSON e, ToJSON a, Typeable s, Typeable e, Typeable a, MealyInstance k s e a) => PostgresJSONStore -> Instance k s e a -> IO (Maybe String)
- _fsmUpdate :: forall k s e a. (FromJSON s, FromJSON e, FromJSON a, ToJSON s, ToJSON e, ToJSON a, Typeable s, Typeable e, Typeable a, MealyInstance k s e a) => PostgresJSONStore -> k -> MachineTransformer s e a -> IO MealyStatus
Documentation
data PostgresJSONStore Source #
_fsmRead :: (FromJSON s, FromJSON e, FromJSON a, Typeable s, Typeable e, Typeable a, MealyInstance k s e a) => PostgresJSONStore -> k -> Proxy k s e a -> IO (Maybe (Instance k s e a)) Source #
_fsmCreate :: forall k s e a. (ToJSON s, ToJSON e, ToJSON a, Typeable s, Typeable e, Typeable a, MealyInstance k s e a) => PostgresJSONStore -> Instance k s e a -> IO (Maybe String) Source #
_fsmUpdate :: forall k s e a. (FromJSON s, FromJSON e, FromJSON a, ToJSON s, ToJSON e, ToJSON a, Typeable s, Typeable e, Typeable a, MealyInstance k s e a) => PostgresJSONStore -> k -> MachineTransformer s e a -> IO MealyStatus Source #
Orphan instances
FSMKey k => ToField k Source # | |
FSMKey k => FromField k Source # | |
FSMKey k => Generic (WALEntry k) Source # | |
ToJSON e => ToJSON (Msg e) Source # | |
FromJSON e => FromJSON (Msg e) Source # | |
FSMKey k => FromRow (WALEntry k) Source # | |
(ToJSON s, ToJSON e, ToJSON a) => ToJSON (Machine s e a) Source # | Instance to convert one DB row to an instance of Instance ;)
users of this module must provide instances for ToJSON, FromJSON for |
(FromJSON s, FromJSON e, FromJSON a) => FromJSON (Machine s e a) Source # | |
(Typeable * s, Typeable * e, Typeable * a, ToJSON s, ToJSON e, ToJSON a) => ToField (Machine s e a) Source # | |
(Typeable * s, Typeable * e, Typeable * a, FromJSON s, FromJSON e, FromJSON a) => FromField (Machine s e a) Source # | |
(Typeable * s, Typeable * e, Typeable * a, FromJSON s, FromJSON e, FromJSON a, FSMKey k) => FromRow (Instance k s e a) Source # | |