| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | amy@nualeargais.ie |
| Safe Haskell | None |
ALife.Creatur.Database
Description
Database interface for the Créatúr framework.
Documentation
A database offering storage and retrieval for records.
Methods
keys :: StateT d IO [String]Source
Get a list of all keys in the database.
lookup :: Serialize (DBRecord d) => String -> StateT d IO (Either String (DBRecord d))Source
Read a record from the database.
store :: (Record (DBRecord d), Serialize (DBRecord d)) => DBRecord d -> StateT d IO ()Source
Write a record to the database. If an agent with the same name already exists, it will be overwritten.
delete :: Serialize (DBRecord d) => String -> StateT d IO ()Source
Remove a record from the database. The database may archive records rather than simply deleting them.
Instances
| Database (FSDatabase r) |