/usr/share/doc/libghc-tokyocabinet-doc/html/Database-TokyoCabinet-HDB.html is in libghc-tokyocabinet-doc 0.0.5-8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Database.TokyoCabinet.HDB</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Database-TokyoCabinet-HDB.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Database-TokyoCabinet-HDB.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">tokyocabinet-haskell-0.0.5: Haskell binding of Tokyo Cabinet</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Database.TokyoCabinet.HDB</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Basic API (tokyocabinet.idl compliant)
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Interface to Hash based DBM. See also,
<a href="http://tokyocabinet.sourceforge.net/spex-en.html#tchdbapi">http://tokyocabinet.sourceforge.net/spex-en.html#tchdbapi</a> for details
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:HDB">HDB</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:ECODE">ECODE</a> <ul class="subs"><li>= <a href="#v:ESUCCESS">ESUCCESS</a> </li><li>| <a href="#v:ETHREAD">ETHREAD</a> </li><li>| <a href="#v:EINVALID">EINVALID</a> </li><li>| <a href="#v:ENOFILE">ENOFILE</a> </li><li>| <a href="#v:ENOPERM">ENOPERM</a> </li><li>| <a href="#v:EMETA">EMETA</a> </li><li>| <a href="#v:ERHEAD">ERHEAD</a> </li><li>| <a href="#v:EOPEN">EOPEN</a> </li><li>| <a href="#v:ECLOSE">ECLOSE</a> </li><li>| <a href="#v:ETRUNC">ETRUNC</a> </li><li>| <a href="#v:ESYNC">ESYNC</a> </li><li>| <a href="#v:ESTAT">ESTAT</a> </li><li>| <a href="#v:ESEEK">ESEEK</a> </li><li>| <a href="#v:EREAD">EREAD</a> </li><li>| <a href="#v:EWRITE">EWRITE</a> </li><li>| <a href="#v:EMMAP">EMMAP</a> </li><li>| <a href="#v:ELOCK">ELOCK</a> </li><li>| <a href="#v:EUNLINK">EUNLINK</a> </li><li>| <a href="#v:ERENAME">ERENAME</a> </li><li>| <a href="#v:EMKDIR">EMKDIR</a> </li><li>| <a href="#v:ERMDIR">ERMDIR</a> </li><li>| <a href="#v:EKEEP">EKEEP</a> </li><li>| <a href="#v:ENOREC">ENOREC</a> </li><li>| <a href="#v:EMISC">EMISC</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:OpenMode">OpenMode</a> <ul class="subs"><li>= <a href="#v:OREADER">OREADER</a> </li><li>| <a href="#v:OWRITER">OWRITER</a> </li><li>| <a href="#v:OCREAT">OCREAT</a> </li><li>| <a href="#v:OTRUNC">OTRUNC</a> </li><li>| <a href="#v:ONOLCK">ONOLCK</a> </li><li>| <a href="#v:OLCKNB">OLCKNB</a> </li><li>| <a href="#v:OTSYNC">OTSYNC</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:TuningOption">TuningOption</a> <ul class="subs"><li>= <a href="#v:TLARGE">TLARGE</a> </li><li>| <a href="#v:TDEFLATE">TDEFLATE</a> </li><li>| <a href="#v:TBZIP">TBZIP</a> </li><li>| <a href="#v:TTCBS">TTCBS</a> </li><li>| <a href="#v:TEXCODEC">TEXCODEC</a> </li></ul></li><li class="src short"><a href="#v:new">new</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a></li><li class="src short"><a href="#v:delete">delete</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:ecode">ecode</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="Database-TokyoCabinet-HDB.html#t:ECODE">ECODE</a></li><li class="src short"><a href="#v:errmsg">errmsg</a> :: <a href="Database-TokyoCabinet-HDB.html#t:ECODE">ECODE</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:tune">tune</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int8">Int8</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int8">Int8</a> -> [<a href="Database-TokyoCabinet-HDB.html#t:TuningOption">TuningOption</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:setcache">setcache</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int32">Int32</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:setxmsiz">setxmsiz</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:open">open</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -> [<a href="Database-TokyoCabinet-HDB.html#t:OpenMode">OpenMode</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:close">close</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:put">put</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:putkeep">putkeep</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:putcat">putcat</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:putasync">putasync</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:out">out</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:get">get</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> v)</li><li class="src short"><a href="#v:vsiz">vsiz</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:iterinit">iterinit</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:iternext">iternext</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> k)</li><li class="src short"><a href="#v:fwmkeys">fwmkeys</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k1, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k2, <a href="Database-TokyoCabinet-Sequence.html#t:Sequence">Sequence</a> q) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k1 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (q k2)</li><li class="src short"><a href="#v:addint">addint</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:adddouble">adddouble</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a>)</li><li class="src short"><a href="#v:sync">sync</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:optimize">optimize</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int8">Int8</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int8">Int8</a> -> [<a href="Database-TokyoCabinet-HDB.html#t:TuningOption">TuningOption</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:vanish">vanish</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:copy">copy</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:tranbegin">tranbegin</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:trancommit">trancommit</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:tranabort">tranabort</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:path">path</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:rnum">rnum</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Word.html#t:Word64">Word64</a></li><li class="src short"><a href="#v:fsiz">fsiz</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Word.html#t:Word64">Word64</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="doc"><p>Example
</p><pre>
import Control.Monad
import Database.TokyoCabinet.HDB
</pre><pre>
main = do hdb <- new
-- open the database
open hdb "casket.tch" [OWRITER, OCREAT] >>= err hdb
-- store records
puts hdb [("foo", "hop"), ("bar", "step"), ("baz", "jump")] >>=
err hdb . (all id)
-- retrieve records
get_print hdb "foo"
-- traverse records
iterinit hdb
iter hdb >>= mapM_ (k -> putStr (k++":") >> get_print hdb k)
-- close the database
close hdb >>= err hdb
where
puts :: HDB -> [(String, String)] -> IO [Bool]
puts hdb = mapM (uncurry $ put hdb)
</pre><pre>
get_print :: HDB -> String -> IO ()
get_print hdb key = get hdb key >>=
maybe (error "something goes wrong") putStrLn
</pre><pre>
err :: HDB -> Bool -> IO ()
err hdb = flip unless $ ecode hdb >>= error . show
</pre><pre>
iter :: HDB -> IO [String]
iter hdb = iternext hdb >>=
maybe (return []) (x -> return . (x:) =<< iter hdb)
</pre></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HDB" class="def">HDB</a> <a href="src/Database-TokyoCabinet-HDB.html#HDB" class="link">Source</a></p><div class="subs instances"><p id="control.i:HDB" class="caption collapser" onclick="toggleSection('i:HDB')">Instances</p><div id="section.i:HDB" class="show"><table><tr><td class="src"><a href="Database-TokyoCabinet.html#t:TCDB">TCDB</a> <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ECODE" class="def">ECODE</a> <a href="src/Database-TokyoCabinet-Error.html#ECODE" class="link">Source</a></p><div class="doc"><p>Represents error
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ESUCCESS" class="def">ESUCCESS</a></td><td class="doc"><p>success
</p></td></tr><tr><td class="src"><a name="v:ETHREAD" class="def">ETHREAD</a></td><td class="doc"><p>threading error
</p></td></tr><tr><td class="src"><a name="v:EINVALID" class="def">EINVALID</a></td><td class="doc"><p>invalid operation
</p></td></tr><tr><td class="src"><a name="v:ENOFILE" class="def">ENOFILE</a></td><td class="doc"><p>file not found
</p></td></tr><tr><td class="src"><a name="v:ENOPERM" class="def">ENOPERM</a></td><td class="doc"><p>no permission
</p></td></tr><tr><td class="src"><a name="v:EMETA" class="def">EMETA</a></td><td class="doc"><p>invalid meta data
</p></td></tr><tr><td class="src"><a name="v:ERHEAD" class="def">ERHEAD</a></td><td class="doc"><p>invalid record header
</p></td></tr><tr><td class="src"><a name="v:EOPEN" class="def">EOPEN</a></td><td class="doc"><p>open error
</p></td></tr><tr><td class="src"><a name="v:ECLOSE" class="def">ECLOSE</a></td><td class="doc"><p>close error
</p></td></tr><tr><td class="src"><a name="v:ETRUNC" class="def">ETRUNC</a></td><td class="doc"><p>trunc error
</p></td></tr><tr><td class="src"><a name="v:ESYNC" class="def">ESYNC</a></td><td class="doc"><p>sync error
</p></td></tr><tr><td class="src"><a name="v:ESTAT" class="def">ESTAT</a></td><td class="doc"><p>stat error
</p></td></tr><tr><td class="src"><a name="v:ESEEK" class="def">ESEEK</a></td><td class="doc"><p>seek error
</p></td></tr><tr><td class="src"><a name="v:EREAD" class="def">EREAD</a></td><td class="doc"><p>read error
</p></td></tr><tr><td class="src"><a name="v:EWRITE" class="def">EWRITE</a></td><td class="doc"><p>write error
</p></td></tr><tr><td class="src"><a name="v:EMMAP" class="def">EMMAP</a></td><td class="doc"><p>mmap error
</p></td></tr><tr><td class="src"><a name="v:ELOCK" class="def">ELOCK</a></td><td class="doc"><p>lock error
</p></td></tr><tr><td class="src"><a name="v:EUNLINK" class="def">EUNLINK</a></td><td class="doc"><p>unlink error
</p></td></tr><tr><td class="src"><a name="v:ERENAME" class="def">ERENAME</a></td><td class="doc"><p>rename error
</p></td></tr><tr><td class="src"><a name="v:EMKDIR" class="def">EMKDIR</a></td><td class="doc"><p>mkdir error
</p></td></tr><tr><td class="src"><a name="v:ERMDIR" class="def">ERMDIR</a></td><td class="doc"><p>rmdir error
</p></td></tr><tr><td class="src"><a name="v:EKEEP" class="def">EKEEP</a></td><td class="doc"><p>existing record
</p></td></tr><tr><td class="src"><a name="v:ENOREC" class="def">ENOREC</a></td><td class="doc"><p>no record found
</p></td></tr><tr><td class="src"><a name="v:EMISC" class="def">EMISC</a></td><td class="doc"><p>miscellaneous error
</p></td></tr></table></div><div class="subs instances"><p id="control.i:ECODE" class="caption collapser" onclick="toggleSection('i:ECODE')">Instances</p><div id="section.i:ECODE" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Database-TokyoCabinet-HDB.html#t:ECODE">ECODE</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Database-TokyoCabinet-HDB.html#t:ECODE">ECODE</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Database-TokyoCabinet-HDB.html#t:ECODE">ECODE</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:OpenMode" class="def">OpenMode</a> <a href="src/Database-TokyoCabinet-HDB-C.html#OpenMode" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:OREADER" class="def">OREADER</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:OWRITER" class="def">OWRITER</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:OCREAT" class="def">OCREAT</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:OTRUNC" class="def">OTRUNC</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:ONOLCK" class="def">ONOLCK</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:OLCKNB" class="def">OLCKNB</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:OTSYNC" class="def">OTSYNC</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:OpenMode" class="caption collapser" onclick="toggleSection('i:OpenMode')">Instances</p><div id="section.i:OpenMode" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Database-TokyoCabinet-HDB.html#t:OpenMode">OpenMode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Database-TokyoCabinet-HDB.html#t:OpenMode">OpenMode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Database-TokyoCabinet-HDB.html#t:OpenMode">OpenMode</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TuningOption" class="def">TuningOption</a> <a href="src/Database-TokyoCabinet-HDB-C.html#TuningOption" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TLARGE" class="def">TLARGE</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TDEFLATE" class="def">TDEFLATE</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TBZIP" class="def">TBZIP</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TTCBS" class="def">TTCBS</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:TEXCODEC" class="def">TEXCODEC</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:TuningOption" class="caption collapser" onclick="toggleSection('i:TuningOption')">Instances</p><div id="section.i:TuningOption" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Database-TokyoCabinet-HDB.html#t:TuningOption">TuningOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Database-TokyoCabinet-HDB.html#t:TuningOption">TuningOption</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Database-TokyoCabinet-HDB.html#t:TuningOption">TuningOption</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:1">Basic API (tokyocabinet.idl compliant)
</h1><div class="top"><p class="src"><a name="v:new" class="def">new</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a><a href="src/Database-TokyoCabinet-HDB.html#new" class="link">Source</a></p><div class="doc"><p>Create a Hash database object.
</p></div></div><div class="top"><p class="src"><a name="v:delete" class="def">delete</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()<a href="src/Database-TokyoCabinet-HDB.html#delete" class="link">Source</a></p><div class="doc"><p>Free HDB resource forcibly.
HDB is kept by ForeignPtr, so Haskell runtime GC cleans up memory for
almost situation. Most always, you don't need to call this.
After call this, you must not touch HDB object. Its behavior is undefined.
</p></div></div><div class="top"><p class="src"><a name="v:ecode" class="def">ecode</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="Database-TokyoCabinet-HDB.html#t:ECODE">ECODE</a><a href="src/Database-TokyoCabinet-HDB.html#ecode" class="link">Source</a></p><div class="doc"><p>Return the last happened error code.
</p></div></div><div class="top"><p class="src"><a name="v:errmsg" class="def">errmsg</a> :: <a href="Database-TokyoCabinet-HDB.html#t:ECODE">ECODE</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Database-TokyoCabinet-Error.html#errmsg" class="link">Source</a></p><div class="doc"><p>Convert error code to message string.
</p></div></div><div class="top"><p class="src"><a name="v:tune" class="def">tune</a><a href="src/Database-TokyoCabinet-HDB.html#tune" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a></td><td class="doc"><p>HDB object
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a></td><td class="doc"><p>the number of elements of the bucket array.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int8">Int8</a></td><td class="doc"><p>the size of record alignment by power of 2.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int8">Int8</a></td><td class="doc"><p>the maximum number of elements of the free block
pool by power of 2.
</p></td></tr><tr><td class="src">-> [<a href="Database-TokyoCabinet-HDB.html#t:TuningOption">TuningOption</a>]</td><td class="doc"><p>tuning options.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>if successful, the return value is True.
</p></td></tr></table></div><div class="doc"><p>Set the tuning parameters.
</p></div></div><div class="top"><p class="src"><a name="v:setcache" class="def">setcache</a><a href="src/Database-TokyoCabinet-HDB.html#setcache" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a></td><td class="doc"><p>HDB object.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int32">Int32</a></td><td class="doc"><p>the maximum number of records to be cached.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>if successful, the return value is True.
</p></td></tr></table></div><div class="doc"><p>Set the caching parameters.
</p></div></div><div class="top"><p class="src"><a name="v:setxmsiz" class="def">setxmsiz</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#setxmsiz" class="link">Source</a></p><div class="doc"><p>Set the size of extra mapped memory.
</p></div></div><div class="top"><p class="src"><a name="v:open" class="def">open</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -> [<a href="Database-TokyoCabinet-HDB.html#t:OpenMode">OpenMode</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#open" class="link">Source</a></p><div class="doc"><p>Open a database file.
</p></div></div><div class="top"><p class="src"><a name="v:close" class="def">close</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#close" class="link">Source</a></p><div class="doc"><p>Close the database file.
</p></div></div><div class="top"><p class="src"><a name="v:put" class="def">put</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#put" class="link">Source</a></p><div class="doc"><p>Stora a record (key-value pair) on HDB. Key and value type must
be instance of Storable class. Usually, we can use <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>,
<code>ByteString</code> for key, <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>, <code>ByteString</code>, <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></code>, <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a></code> for
value.
</p></div></div><div class="top"><p class="src"><a name="v:putkeep" class="def">putkeep</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#putkeep" class="link">Source</a></p><div class="doc"><p>Store a new record. If a record with the same key exists in the
database, this function has no effect.
</p></div></div><div class="top"><p class="src"><a name="v:putcat" class="def">putcat</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#putcat" class="link">Source</a></p><div class="doc"><p>Concatenate a value at the end of the existing record.
</p></div></div><div class="top"><p class="src"><a name="v:putasync" class="def">putasync</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#putasync" class="link">Source</a></p><div class="doc"><p>Store a record into a hash database object in asynchronous fashion.
</p></div></div><div class="top"><p class="src"><a name="v:out" class="def">out</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#out" class="link">Source</a></p><div class="doc"><p>Delete a record.
</p></div></div><div class="top"><p class="src"><a name="v:get" class="def">get</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> v) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> v)<a href="src/Database-TokyoCabinet-HDB.html#get" class="link">Source</a></p><div class="doc"><p>Return the value of record.
</p></div></div><div class="top"><p class="src"><a name="v:vsiz" class="def">vsiz</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)<a href="src/Database-TokyoCabinet-HDB.html#vsiz" class="link">Source</a></p><div class="doc"><p>Return the byte size of value in a record.
</p></div></div><div class="top"><p class="src"><a name="v:iterinit" class="def">iterinit</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#iterinit" class="link">Source</a></p><div class="doc"><p>Initialize the iterator of a HDB object.
</p></div></div><div class="top"><p class="src"><a name="v:iternext" class="def">iternext</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> k)<a href="src/Database-TokyoCabinet-HDB.html#iternext" class="link">Source</a></p><div class="doc"><p>Return the next key of the iterator of a HDB object.
</p></div></div><div class="top"><p class="src"><a name="v:fwmkeys" class="def">fwmkeys</a> :: (<a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k1, <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k2, <a href="Database-TokyoCabinet-Sequence.html#t:Sequence">Sequence</a> q) => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k1 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (q k2)<a href="src/Database-TokyoCabinet-HDB.html#fwmkeys" class="link">Source</a></p><div class="doc"><p>Return list of forward matched keys.
</p></div></div><div class="top"><p class="src"><a name="v:addint" class="def">addint</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)<a href="src/Database-TokyoCabinet-HDB.html#addint" class="link">Source</a></p><div class="doc"><p>Increment the corresponding value. (The value specified by a key
is treated as integer.)
</p></div></div><div class="top"><p class="src"><a name="v:adddouble" class="def">adddouble</a> :: <a href="Database-TokyoCabinet-Storable.html#t:Storable">Storable</a> k => <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> k -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a>)<a href="src/Database-TokyoCabinet-HDB.html#adddouble" class="link">Source</a></p><div class="doc"><p>Increment the corresponding value. (The value specified by a key
is treated as double.)
</p></div></div><div class="top"><p class="src"><a name="v:sync" class="def">sync</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#sync" class="link">Source</a></p><div class="doc"><p>Synchronize updated contents of a database object with the file
and the device.
</p></div></div><div class="top"><p class="src"><a name="v:optimize" class="def">optimize</a><a href="src/Database-TokyoCabinet-HDB.html#optimize" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a></td><td class="doc"><p>HDB object
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a></td><td class="doc"><p>the number of elements of the bucket array.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int8">Int8</a></td><td class="doc"><p>the size of record alignment by power of 2.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int8">Int8</a></td><td class="doc"><p>the maximum number of elements of the free block
pool by power of 2.
</p></td></tr><tr><td class="src">-> [<a href="Database-TokyoCabinet-HDB.html#t:TuningOption">TuningOption</a>]</td><td class="doc"><p>tuning options.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>if successful, the return value is True.
</p></td></tr></table></div><div class="doc"><p>Optimize the file of a Hash database object.
</p></div></div><div class="top"><p class="src"><a name="v:vanish" class="def">vanish</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#vanish" class="link">Source</a></p><div class="doc"><p>Delete all records.
</p></div></div><div class="top"><p class="src"><a name="v:copy" class="def">copy</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#copy" class="link">Source</a></p><div class="doc"><p>Copy the database file.
</p></div></div><div class="top"><p class="src"><a name="v:tranbegin" class="def">tranbegin</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#tranbegin" class="link">Source</a></p><div class="doc"><p>Begin the transaction.
</p></div></div><div class="top"><p class="src"><a name="v:trancommit" class="def">trancommit</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#trancommit" class="link">Source</a></p><div class="doc"><p>Commit the transaction.
</p></div></div><div class="top"><p class="src"><a name="v:tranabort" class="def">tranabort</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-TokyoCabinet-HDB.html#tranabort" class="link">Source</a></p><div class="doc"><p>Abort the transaction.
</p></div></div><div class="top"><p class="src"><a name="v:path" class="def">path</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>)<a href="src/Database-TokyoCabinet-HDB.html#path" class="link">Source</a></p><div class="doc"><p>Return the file path of currentry opened database.
</p></div></div><div class="top"><p class="src"><a name="v:rnum" class="def">rnum</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Word.html#t:Word64">Word64</a><a href="src/Database-TokyoCabinet-HDB.html#rnum" class="link">Source</a></p><div class="doc"><p>Return the number of records in the database.
</p></div></div><div class="top"><p class="src"><a name="v:fsiz" class="def">fsiz</a> :: <a href="Database-TokyoCabinet-HDB.html#t:HDB">HDB</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Word.html#t:Word64">Word64</a><a href="src/Database-TokyoCabinet-HDB.html#fsiz" class="link">Source</a></p><div class="doc"><p>Return the size of the database file.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|