gdritter repos tansu-berkeleydb / 7292948
Added delete operation Getty Ritter 8 years ago
1 changed file(s) with 5 addition(s) and 0 deletion(s). Collapse all Expand all
1515 bdbGet db key =
1616 db_get [] db Nothing key
1717
18 bdbDel :: Db -> ByteString -> IO ()
19 bdbDel db key =
20 db_del [] db Nothing key
21
1822 -- | Open or create a database at the supplied path
1923 -- using the BerkeleyDB library.
2024 withBerkeleyDb :: FilePath -> (TansuDb -> IO a) -> IO a
2630 db_open [DB_CREATE] DB_HASH 0 db Nothing path Nothing
2731 result <- comp $ TansuDb { dbGet = bdbGet db
2832 , dbSet = bdbSet db
33 , dbDel = bdbDel db
2934 , dbRunTransaction = id
3035 }
3136 db_close [] db