closeA :: a -> IO () |
Close the object, writing out any unsaved data to disk if necessary.
If you implement this, make sure your implementation calls flushA.
Note: if you have an object opened for writing, you MUST
call closeA on it when you are done. Implementations are not
required to preserve your data otherwise.
|
|
flushA :: a -> IO () |
Flush the object, saving any un-saved data to disk but not closing
it. Called automatically by closeA.
|
|
insertA |
:: a | AnyDBM object
| -> String | Key
| -> String | Value
| -> IO () | | Insert the given data into the map. Existing data with the same key
will be overwritten.
|
|
|
deleteA :: a -> String -> IO () |
Delete the data referenced by the given key. It is not an error
if the key does not exist.
|
|
hasKeyA :: a -> String -> IO Bool |
True if the given key is present.
|
|
lookupA :: a -> String -> IO (Maybe String) |
Find the data referenced by the given key.
|
|
forceLookupA :: a -> String -> IO String |
Look up the data and raise an exception if the key does not exist.
The exception raised is PatternMatchFail, and the string accompanying
it is the key that was looked up.
|
|
insertListA :: a -> [(String, String)] -> IO () |
Call insertA on each pair in the given association list, adding
them to the map.
|
|
toListA :: a -> IO [(String, String)] |
Return a representation of the content of the map as a list.
|
|
keysA :: a -> IO [String] |
Returns a list of keys in the AnyDBM object.
|
|
valuesA :: a -> IO [String] |
Returns a list of values in the AnyDBM object.
|