heroku-tokyotyrant 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +504 -0
- data/README.rdoc +231 -0
- data/Rakefile +72 -0
- data/benchmarks/balancer.rb +101 -0
- data/benchmarks/bulk_db.rb +74 -0
- data/benchmarks/bulk_table.rb +87 -0
- data/benchmarks/db.rb +114 -0
- data/benchmarks/table.rb +161 -0
- data/ext/extconf.rb +43 -0
- data/ext/tokyo/bin/tcamgr +0 -0
- data/ext/tokyo/bin/tcamttest +0 -0
- data/ext/tokyo/bin/tcatest +0 -0
- data/ext/tokyo/bin/tcbmgr +0 -0
- data/ext/tokyo/bin/tcbmttest +0 -0
- data/ext/tokyo/bin/tcbtest +0 -0
- data/ext/tokyo/bin/tcfmgr +0 -0
- data/ext/tokyo/bin/tcfmttest +0 -0
- data/ext/tokyo/bin/tcftest +0 -0
- data/ext/tokyo/bin/tchmgr +0 -0
- data/ext/tokyo/bin/tchmttest +0 -0
- data/ext/tokyo/bin/tchtest +0 -0
- data/ext/tokyo/bin/tcrmgr +0 -0
- data/ext/tokyo/bin/tcrmttest +0 -0
- data/ext/tokyo/bin/tcrtest +0 -0
- data/ext/tokyo/bin/tctmgr +0 -0
- data/ext/tokyo/bin/tctmttest +0 -0
- data/ext/tokyo/bin/tcttest +0 -0
- data/ext/tokyo/bin/tcucodec +0 -0
- data/ext/tokyo/bin/tcumttest +0 -0
- data/ext/tokyo/bin/tcutest +0 -0
- data/ext/tokyo/bin/ttserver +0 -0
- data/ext/tokyo/bin/ttulmgr +0 -0
- data/ext/tokyo/bin/ttultest +0 -0
- data/ext/tokyo/include/tcadb.h +548 -0
- data/ext/tokyo/include/tcbdb.h +1101 -0
- data/ext/tokyo/include/tcfdb.h +858 -0
- data/ext/tokyo/include/tchdb.h +871 -0
- data/ext/tokyo/include/tcrdb.h +801 -0
- data/ext/tokyo/include/tctdb.h +1086 -0
- data/ext/tokyo/include/tculog.h +392 -0
- data/ext/tokyo/include/tcutil.h +4184 -0
- data/ext/tokyo/include/ttutil.h +494 -0
- data/ext/tokyo/lib/libtokyocabinet.9.4.0.dylib +0 -0
- data/ext/tokyo/lib/libtokyocabinet.9.dylib +0 -0
- data/ext/tokyo/lib/libtokyocabinet.a +0 -0
- data/ext/tokyo/lib/libtokyocabinet.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.3.22.0.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.3.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.a +0 -0
- data/ext/tokyo/lib/libtokyotyrant.dylib +0 -0
- data/ext/tokyo/lib/pkgconfig/tokyocabinet.pc +14 -0
- data/ext/tokyo/lib/pkgconfig/tokyotyrant.pc +14 -0
- data/ext/tokyo/lib/ttskeldir.bundle +0 -0
- data/ext/tokyo/lib/ttskelmock.bundle +0 -0
- data/ext/tokyo/lib/ttskelnull.bundle +0 -0
- data/ext/tokyo/lib/ttskelproxy.bundle +0 -0
- data/ext/tokyo/libexec/tcawmgr.cgi +0 -0
- data/ext/tokyo/sbin/ttservctl +163 -0
- data/ext/tokyo/share/man/man1/tcamgr.1 +97 -0
- data/ext/tokyo/share/man/man1/tcamttest.1 +35 -0
- data/ext/tokyo/share/man/man1/tcatest.1 +55 -0
- data/ext/tokyo/share/man/man1/tcbmgr.1 +125 -0
- data/ext/tokyo/share/man/man1/tcbmttest.1 +81 -0
- data/ext/tokyo/share/man/man1/tcbtest.1 +107 -0
- data/ext/tokyo/share/man/man1/tcfmgr.1 +98 -0
- data/ext/tokyo/share/man/man1/tcfmttest.1 +62 -0
- data/ext/tokyo/share/man/man1/tcftest.1 +73 -0
- data/ext/tokyo/share/man/man1/tchmgr.1 +110 -0
- data/ext/tokyo/share/man/man1/tchmttest.1 +85 -0
- data/ext/tokyo/share/man/man1/tchtest.1 +95 -0
- data/ext/tokyo/share/man/man1/tcrmgr.1 +164 -0
- data/ext/tokyo/share/man/man1/tcrmttest.1 +55 -0
- data/ext/tokyo/share/man/man1/tcrtest.1 +89 -0
- data/ext/tokyo/share/man/man1/tctmgr.1 +140 -0
- data/ext/tokyo/share/man/man1/tctmttest.1 +92 -0
- data/ext/tokyo/share/man/man1/tcttest.1 +105 -0
- data/ext/tokyo/share/man/man1/tcucodec.1 +162 -0
- data/ext/tokyo/share/man/man1/tcumttest.1 +41 -0
- data/ext/tokyo/share/man/man1/tcutest.1 +81 -0
- data/ext/tokyo/share/man/man1/ttserver.1 +84 -0
- data/ext/tokyo/share/man/man1/ttulmgr.1 +40 -0
- data/ext/tokyo/share/man/man1/ttultest.1 +16 -0
- data/ext/tokyo/share/man/man3/tcadb.3 +676 -0
- data/ext/tokyo/share/man/man3/tcbdb.3 +1355 -0
- data/ext/tokyo/share/man/man3/tcfdb.3 +975 -0
- data/ext/tokyo/share/man/man3/tchdb.3 +898 -0
- data/ext/tokyo/share/man/man3/tclist.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmap.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmdb.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmpool.3 +1 -0
- data/ext/tokyo/share/man/man3/tcrdb.3 +1309 -0
- data/ext/tokyo/share/man/man3/tctdb.3 +1110 -0
- data/ext/tokyo/share/man/man3/tctree.3 +1 -0
- data/ext/tokyo/share/man/man3/tculog.3 +15 -0
- data/ext/tokyo/share/man/man3/tcutil.3 +4518 -0
- data/ext/tokyo/share/man/man3/tcxstr.3 +1 -0
- data/ext/tokyo/share/man/man3/tokyocabinet.3 +132 -0
- data/ext/tokyo/share/man/man3/ttutil.3 +14 -0
- data/ext/tokyo/share/man/man8/ttservctl.8 +37 -0
- data/ext/tokyo/share/tokyocabinet/COPYING +504 -0
- data/ext/tokyo/share/tokyocabinet/ChangeLog +1252 -0
- data/ext/tokyo/share/tokyocabinet/THANKS +12 -0
- data/ext/tokyo/share/tokyocabinet/doc/benchmark.pdf +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/common.css +211 -0
- data/ext/tokyo/share/tokyocabinet/doc/icon16.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/index.html +156 -0
- data/ext/tokyo/share/tokyocabinet/doc/index.ja.html +197 -0
- data/ext/tokyo/share/tokyocabinet/doc/logo-ja.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/logo.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/spex-en.html +7145 -0
- data/ext/tokyo/share/tokyocabinet/doc/spex-ja.html +7476 -0
- data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.pdf +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.ppt +0 -0
- data/ext/tokyo/share/tokyotyrant/COPYING +504 -0
- data/ext/tokyo/share/tokyotyrant/ChangeLog +578 -0
- data/ext/tokyo/share/tokyotyrant/THANKS +15 -0
- data/ext/tokyo/share/tokyotyrant/doc/common.css +211 -0
- data/ext/tokyo/share/tokyotyrant/doc/index.html +79 -0
- data/ext/tokyo/share/tokyotyrant/doc/spex.html +2264 -0
- data/ext/tokyo/share/tokyotyrant/ext/mapreduce.lua +57 -0
- data/ext/tokyo/share/tokyotyrant/ext/queue.lua +55 -0
- data/ext/tokyo/share/tokyotyrant/ext/senatus.lua +532 -0
- data/ext/tokyo/share/tokyotyrant/ext/usherette.lua +438 -0
- data/ext/tokyo_tyrant.c +147 -0
- data/ext/tokyo_tyrant.h +48 -0
- data/ext/tokyo_tyrant_db.c +227 -0
- data/ext/tokyo_tyrant_db.h +8 -0
- data/ext/tokyo_tyrant_module.c +453 -0
- data/ext/tokyo_tyrant_module.h +10 -0
- data/ext/tokyo_tyrant_query.c +226 -0
- data/ext/tokyo_tyrant_query.h +9 -0
- data/ext/tokyo_tyrant_table.c +319 -0
- data/ext/tokyo_tyrant_table.h +8 -0
- data/ext/tokyocabinet-1.4.41/COPYING +504 -0
- data/ext/tokyocabinet-1.4.41/ChangeLog +1252 -0
- data/ext/tokyocabinet-1.4.41/Makefile.in +825 -0
- data/ext/tokyocabinet-1.4.41/README +38 -0
- data/ext/tokyocabinet-1.4.41/THANKS +12 -0
- data/ext/tokyocabinet-1.4.41/bros/Makefile +133 -0
- data/ext/tokyocabinet-1.4.41/bros/bdbtest.c +438 -0
- data/ext/tokyocabinet-1.4.41/bros/cdbtest.c +219 -0
- data/ext/tokyocabinet-1.4.41/bros/cmpsqltctest.c +186 -0
- data/ext/tokyocabinet-1.4.41/bros/gdbmtest.c +216 -0
- data/ext/tokyocabinet-1.4.41/bros/mapreporter +72 -0
- data/ext/tokyocabinet-1.4.41/bros/maptest.cc +677 -0
- data/ext/tokyocabinet-1.4.41/bros/ndbmtest.c +204 -0
- data/ext/tokyocabinet-1.4.41/bros/qdbmtest.c +375 -0
- data/ext/tokyocabinet-1.4.41/bros/reporter +141 -0
- data/ext/tokyocabinet-1.4.41/bros/result.xls +0 -0
- data/ext/tokyocabinet-1.4.41/bros/sdbmtest.c +204 -0
- data/ext/tokyocabinet-1.4.41/bros/sqltest.c +404 -0
- data/ext/tokyocabinet-1.4.41/bros/tctest.c +748 -0
- data/ext/tokyocabinet-1.4.41/bros/tdbtest.c +205 -0
- data/ext/tokyocabinet-1.4.41/configure +7402 -0
- data/ext/tokyocabinet-1.4.41/configure.in +362 -0
- data/ext/tokyocabinet-1.4.41/doc/benchmark.pdf +0 -0
- data/ext/tokyocabinet-1.4.41/doc/common.css +211 -0
- data/ext/tokyocabinet-1.4.41/doc/icon16.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/index.html +156 -0
- data/ext/tokyocabinet-1.4.41/doc/index.ja.html +197 -0
- data/ext/tokyocabinet-1.4.41/doc/logo-ja.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/logo.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/spex-en.html +7145 -0
- data/ext/tokyocabinet-1.4.41/doc/spex-ja.html +7476 -0
- data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.pdf +0 -0
- data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.ppt +0 -0
- data/ext/tokyocabinet-1.4.41/example/Makefile +113 -0
- data/ext/tokyocabinet-1.4.41/example/tcadbex.c +55 -0
- data/ext/tokyocabinet-1.4.41/example/tcbdbex.c +64 -0
- data/ext/tokyocabinet-1.4.41/example/tcfdbex.c +60 -0
- data/ext/tokyocabinet-1.4.41/example/tchdbex.c +60 -0
- data/ext/tokyocabinet-1.4.41/example/tctchat.c +97 -0
- data/ext/tokyocabinet-1.4.41/example/tctchat.tmpl +141 -0
- data/ext/tokyocabinet-1.4.41/example/tctdbex.c +85 -0
- data/ext/tokyocabinet-1.4.41/example/tctsearch.c +95 -0
- data/ext/tokyocabinet-1.4.41/example/tctsearch.tmpl +122 -0
- data/ext/tokyocabinet-1.4.41/example/tcutilex.c +77 -0
- data/ext/tokyocabinet-1.4.41/f.tsv +2 -0
- data/ext/tokyocabinet-1.4.41/lab/calccomp +118 -0
- data/ext/tokyocabinet-1.4.41/lab/datechange +56 -0
- data/ext/tokyocabinet-1.4.41/lab/diffcheck +45 -0
- data/ext/tokyocabinet-1.4.41/lab/htmltotsv +102 -0
- data/ext/tokyocabinet-1.4.41/lab/magic +19 -0
- data/ext/tokyocabinet-1.4.41/lab/printenv.cgi +27 -0
- data/ext/tokyocabinet-1.4.41/lab/stepcount +26 -0
- data/ext/tokyocabinet-1.4.41/lab/stopwatch +61 -0
- data/ext/tokyocabinet-1.4.41/lab/tabcheck +43 -0
- data/ext/tokyocabinet-1.4.41/lab/wgettsv +239 -0
- data/ext/tokyocabinet-1.4.41/lab/widthcheck +57 -0
- data/ext/tokyocabinet-1.4.41/man/htmltoman +104 -0
- data/ext/tokyocabinet-1.4.41/man/tcadb.3 +676 -0
- data/ext/tokyocabinet-1.4.41/man/tcamgr.1 +97 -0
- data/ext/tokyocabinet-1.4.41/man/tcamttest.1 +35 -0
- data/ext/tokyocabinet-1.4.41/man/tcatest.1 +55 -0
- data/ext/tokyocabinet-1.4.41/man/tcbdb.3 +1355 -0
- data/ext/tokyocabinet-1.4.41/man/tcbmgr.1 +125 -0
- data/ext/tokyocabinet-1.4.41/man/tcbmttest.1 +81 -0
- data/ext/tokyocabinet-1.4.41/man/tcbtest.1 +107 -0
- data/ext/tokyocabinet-1.4.41/man/tcfdb.3 +975 -0
- data/ext/tokyocabinet-1.4.41/man/tcfmgr.1 +98 -0
- data/ext/tokyocabinet-1.4.41/man/tcfmttest.1 +62 -0
- data/ext/tokyocabinet-1.4.41/man/tcftest.1 +73 -0
- data/ext/tokyocabinet-1.4.41/man/tchdb.3 +898 -0
- data/ext/tokyocabinet-1.4.41/man/tchmgr.1 +110 -0
- data/ext/tokyocabinet-1.4.41/man/tchmttest.1 +85 -0
- data/ext/tokyocabinet-1.4.41/man/tchtest.1 +95 -0
- data/ext/tokyocabinet-1.4.41/man/tclist.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmap.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmdb.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmpool.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tctdb.3 +1110 -0
- data/ext/tokyocabinet-1.4.41/man/tctmgr.1 +140 -0
- data/ext/tokyocabinet-1.4.41/man/tctmttest.1 +92 -0
- data/ext/tokyocabinet-1.4.41/man/tctree.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcttest.1 +105 -0
- data/ext/tokyocabinet-1.4.41/man/tcucodec.1 +162 -0
- data/ext/tokyocabinet-1.4.41/man/tcumttest.1 +41 -0
- data/ext/tokyocabinet-1.4.41/man/tcutest.1 +81 -0
- data/ext/tokyocabinet-1.4.41/man/tcutil.3 +4518 -0
- data/ext/tokyocabinet-1.4.41/man/tcxstr.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tokyocabinet.3 +132 -0
- data/ext/tokyocabinet-1.4.41/md5.c +381 -0
- data/ext/tokyocabinet-1.4.41/md5.h +101 -0
- data/ext/tokyocabinet-1.4.41/myconf.c +493 -0
- data/ext/tokyocabinet-1.4.41/myconf.h +549 -0
- data/ext/tokyocabinet-1.4.41/tcadb.c +4339 -0
- data/ext/tokyocabinet-1.4.41/tcadb.h +548 -0
- data/ext/tokyocabinet-1.4.41/tcamgr.c +1019 -0
- data/ext/tokyocabinet-1.4.41/tcamttest.c +542 -0
- data/ext/tokyocabinet-1.4.41/tcatest.c +1845 -0
- data/ext/tokyocabinet-1.4.41/tcawmgr.c +482 -0
- data/ext/tokyocabinet-1.4.41/tcbdb.c +4180 -0
- data/ext/tokyocabinet-1.4.41/tcbdb.h +1101 -0
- data/ext/tokyocabinet-1.4.41/tcbmgr.c +1012 -0
- data/ext/tokyocabinet-1.4.41/tcbmttest.c +1810 -0
- data/ext/tokyocabinet-1.4.41/tcbtest.c +2586 -0
- data/ext/tokyocabinet-1.4.41/tcfdb.c +2746 -0
- data/ext/tokyocabinet-1.4.41/tcfdb.h +858 -0
- data/ext/tokyocabinet-1.4.41/tcfmgr.c +786 -0
- data/ext/tokyocabinet-1.4.41/tcfmttest.c +1220 -0
- data/ext/tokyocabinet-1.4.41/tcftest.c +1695 -0
- data/ext/tokyocabinet-1.4.41/tchdb.c +5153 -0
- data/ext/tokyocabinet-1.4.41/tchdb.h +871 -0
- data/ext/tokyocabinet-1.4.41/tchmgr.c +842 -0
- data/ext/tokyocabinet-1.4.41/tchmttest.c +1757 -0
- data/ext/tokyocabinet-1.4.41/tchtest.c +2129 -0
- data/ext/tokyocabinet-1.4.41/tctdb.c +6199 -0
- data/ext/tokyocabinet-1.4.41/tctdb.h +1086 -0
- data/ext/tokyocabinet-1.4.41/tctmgr.c +1241 -0
- data/ext/tokyocabinet-1.4.41/tctmttest.c +1563 -0
- data/ext/tokyocabinet-1.4.41/tcttest.c +2062 -0
- data/ext/tokyocabinet-1.4.41/tcucodec.c +1357 -0
- data/ext/tokyocabinet-1.4.41/tcumttest.c +578 -0
- data/ext/tokyocabinet-1.4.41/tcutest.c +1875 -0
- data/ext/tokyocabinet-1.4.41/tcutil.c +10528 -0
- data/ext/tokyocabinet-1.4.41/tcutil.h +4184 -0
- data/ext/tokyocabinet-1.4.41/tokyocabinet.idl +336 -0
- data/ext/tokyocabinet-1.4.41/tokyocabinet.pc.in +14 -0
- data/ext/tokyotyrant-1.1.39/COPYING +504 -0
- data/ext/tokyotyrant-1.1.39/ChangeLog +578 -0
- data/ext/tokyotyrant-1.1.39/Makefile.in +365 -0
- data/ext/tokyotyrant-1.1.39/README +38 -0
- data/ext/tokyotyrant-1.1.39/THANKS +15 -0
- data/ext/tokyotyrant-1.1.39/configure +6979 -0
- data/ext/tokyotyrant-1.1.39/configure.in +300 -0
- data/ext/tokyotyrant-1.1.39/doc/common.css +211 -0
- data/ext/tokyotyrant-1.1.39/doc/index.html +79 -0
- data/ext/tokyotyrant-1.1.39/doc/spex.html +2264 -0
- data/ext/tokyotyrant-1.1.39/example/Makefile +68 -0
- data/ext/tokyotyrant-1.1.39/example/httptest.pl +88 -0
- data/ext/tokyotyrant-1.1.39/example/mcftest.pl +39 -0
- data/ext/tokyotyrant-1.1.39/example/mctest.pl +43 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex.c +49 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex.o +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.c +79 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.o +0 -0
- data/ext/tokyotyrant-1.1.39/ext/mapreduce.lua +57 -0
- data/ext/tokyotyrant-1.1.39/ext/queue.lua +55 -0
- data/ext/tokyotyrant-1.1.39/ext/senatus.lua +532 -0
- data/ext/tokyotyrant-1.1.39/ext/usherette.lua +438 -0
- data/ext/tokyotyrant-1.1.39/lab/datechange +56 -0
- data/ext/tokyotyrant-1.1.39/lab/diffcheck +45 -0
- data/ext/tokyotyrant-1.1.39/lab/fibonacci.lua +20 -0
- data/ext/tokyotyrant-1.1.39/lab/footprint.lua +67 -0
- data/ext/tokyotyrant-1.1.39/lab/highlow.lua +88 -0
- data/ext/tokyotyrant-1.1.39/lab/killdualmaster +12 -0
- data/ext/tokyotyrant-1.1.39/lab/rundualmaster +38 -0
- data/ext/tokyotyrant-1.1.39/lab/stepcount +26 -0
- data/ext/tokyotyrant-1.1.39/lab/tabcheck +43 -0
- data/ext/tokyotyrant-1.1.39/lab/ushrtregister.pl +55 -0
- data/ext/tokyotyrant-1.1.39/lab/widthcheck +57 -0
- data/ext/tokyotyrant-1.1.39/man/htmltoman +100 -0
- data/ext/tokyotyrant-1.1.39/man/tcrdb.3 +1309 -0
- data/ext/tokyotyrant-1.1.39/man/tcrmgr.1 +164 -0
- data/ext/tokyotyrant-1.1.39/man/tcrmttest.1 +55 -0
- data/ext/tokyotyrant-1.1.39/man/tcrtest.1 +89 -0
- data/ext/tokyotyrant-1.1.39/man/tculog.3 +15 -0
- data/ext/tokyotyrant-1.1.39/man/ttservctl.8 +37 -0
- data/ext/tokyotyrant-1.1.39/man/ttserver.1 +84 -0
- data/ext/tokyotyrant-1.1.39/man/ttulmgr.1 +40 -0
- data/ext/tokyotyrant-1.1.39/man/ttultest.1 +16 -0
- data/ext/tokyotyrant-1.1.39/man/ttutil.3 +14 -0
- data/ext/tokyotyrant-1.1.39/myconf.c +169 -0
- data/ext/tokyotyrant-1.1.39/myconf.h +408 -0
- data/ext/tokyotyrant-1.1.39/scrext.c +2394 -0
- data/ext/tokyotyrant-1.1.39/scrext.h +96 -0
- data/ext/tokyotyrant-1.1.39/tcrdb.c +2637 -0
- data/ext/tokyotyrant-1.1.39/tcrdb.h +801 -0
- data/ext/tokyotyrant-1.1.39/tcrmgr.c +1559 -0
- data/ext/tokyotyrant-1.1.39/tcrmttest.c +915 -0
- data/ext/tokyotyrant-1.1.39/tcrtest.c +1542 -0
- data/ext/tokyotyrant-1.1.39/tculog.c +1211 -0
- data/ext/tokyotyrant-1.1.39/tculog.h +392 -0
- data/ext/tokyotyrant-1.1.39/tokyotyrant.idl +143 -0
- data/ext/tokyotyrant-1.1.39/tokyotyrant.pc.in +14 -0
- data/ext/tokyotyrant-1.1.39/ttservctl +163 -0
- data/ext/tokyotyrant-1.1.39/ttserver.c +3583 -0
- data/ext/tokyotyrant-1.1.39/ttskeldir.c +141 -0
- data/ext/tokyotyrant-1.1.39/ttskelmock.c +64 -0
- data/ext/tokyotyrant-1.1.39/ttskelnull.c +79 -0
- data/ext/tokyotyrant-1.1.39/ttskelproxy.c +74 -0
- data/ext/tokyotyrant-1.1.39/ttulmgr.c +266 -0
- data/ext/tokyotyrant-1.1.39/ttultest.c +371 -0
- data/ext/tokyotyrant-1.1.39/ttutil.c +1510 -0
- data/ext/tokyotyrant-1.1.39/ttutil.h +494 -0
- data/lib/tokyo_tyrant/balancer.rb +189 -0
- data/spec/ext.lua +4 -0
- data/spec/plu_db.rb +538 -0
- data/spec/spec.rb +1 -0
- data/spec/spec_base.rb +17 -0
- data/spec/start_tyrants.sh +36 -0
- data/spec/stop_tyrants.sh +9 -0
- data/spec/tokyo_tyrant_balancer_db_spec.rb +160 -0
- data/spec/tokyo_tyrant_balancer_table_spec.rb +177 -0
- data/spec/tokyo_tyrant_query_spec.rb +159 -0
- data/spec/tokyo_tyrant_spec.rb +254 -0
- data/spec/tokyo_tyrant_table_spec.rb +301 -0
- metadata +402 -0
@@ -0,0 +1,125 @@
|
|
1
|
+
.TH "TCBMGR" 1 "2009-10-13" "Man Page" "Tokyo Cabinet"
|
2
|
+
|
3
|
+
.SH NAME
|
4
|
+
tcbmgr \- the command line utility of the B+ tree database API
|
5
|
+
|
6
|
+
.SH DESCRIPTION
|
7
|
+
The command `\fBtcbmgr\fR' is a utility for test and debugging of the B+ tree database API and its applications. `\fIpath\fR' specifies the path of a database file. `\fIlmemb\fR' specifies the number of members in each leaf page. `\fInmemb\fR' specifies the number of members in each non\-leaf page. `\fIbnum\fR' specifies the number of buckets. `\fIapow\fR' specifies the power of the alignment. `\fIfpow\fR' specifies the power of the free block pool. `\fIkey\fR' specifies the key of a record. `\fIvalue\fR' specifies the value of a record. `\fIfile\fR' specifies the input file.
|
8
|
+
.PP
|
9
|
+
.RS
|
10
|
+
.br
|
11
|
+
\fBtcbmgr create \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fIpath\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
|
12
|
+
.RS
|
13
|
+
Create a database file.
|
14
|
+
.RE
|
15
|
+
.br
|
16
|
+
\fBtcbmgr inform \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fIpath\fB\fR
|
17
|
+
.RS
|
18
|
+
Print miscellaneous information to the standard output.
|
19
|
+
.RE
|
20
|
+
.br
|
21
|
+
\fBtcbmgr put \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-dk\fR|\fB\-dc\fR|\fB\-dd\fR|\fB\-db\fR|\fB\-dai\fR|\fB\-dad\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB\fR
|
22
|
+
.RS
|
23
|
+
Store a record.
|
24
|
+
.RE
|
25
|
+
.br
|
26
|
+
\fBtcbmgr out \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB\fR
|
27
|
+
.RS
|
28
|
+
Remove a record.
|
29
|
+
.RE
|
30
|
+
.br
|
31
|
+
\fBtcbmgr get \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-pz\fR]\fB \fIpath\fB \fIkey\fB\fR
|
32
|
+
.RS
|
33
|
+
Print the value of a record.
|
34
|
+
.RE
|
35
|
+
.br
|
36
|
+
\fBtcbmgr list \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-m \fInum\fB\fR]\fB \fR[\fB\-bk\fR]\fB \fR[\fB\-pv\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-j \fIstr\fB\fR]\fB \fR[\fB\-rb \fIbkey\fB \fIekey\fB\fR]\fB \fR[\fB\-fm \fIstr\fB\fR]\fB \fIpath\fB\fR
|
37
|
+
.RS
|
38
|
+
Print keys of all records, separated by line feeds.
|
39
|
+
.RE
|
40
|
+
.br
|
41
|
+
\fBtcbmgr optimize \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-tz\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-df\fR]\fB \fIpath\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
|
42
|
+
.RS
|
43
|
+
Optimize a database file.
|
44
|
+
.RE
|
45
|
+
.br
|
46
|
+
\fBtcbmgr importtsv \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-sc\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
|
47
|
+
.RS
|
48
|
+
Store records of TSV in each line of a file.
|
49
|
+
.RE
|
50
|
+
.br
|
51
|
+
\fBtcbmgr version\fR
|
52
|
+
.RS
|
53
|
+
Print the version information of Tokyo Cabinet.
|
54
|
+
.RE
|
55
|
+
.RE
|
56
|
+
.PP
|
57
|
+
Options feature the following.
|
58
|
+
.PP
|
59
|
+
.RS
|
60
|
+
\fB\-cd\fR : use the comparison function `tccmpdecimal'.
|
61
|
+
.br
|
62
|
+
\fB\-ci\fR : use the comparison function `tccmpint32'.
|
63
|
+
.br
|
64
|
+
\fB\-cj\fR : use the comparison function `tccmpint64'.
|
65
|
+
.br
|
66
|
+
\fB\-tl\fR : enable the option `BDBTLARGE'.
|
67
|
+
.br
|
68
|
+
\fB\-td\fR : enable the option `BDBTDEFLATE'.
|
69
|
+
.br
|
70
|
+
\fB\-tb\fR : enable the option `BDBTBZIP'.
|
71
|
+
.br
|
72
|
+
\fB\-tt\fR : enable the option `BDBTTCBS'.
|
73
|
+
.br
|
74
|
+
\fB\-tx\fR : enable the option `BDBTEXCODEC'.
|
75
|
+
.br
|
76
|
+
\fB\-nl\fR : enable the option `BDBNOLCK'.
|
77
|
+
.br
|
78
|
+
\fB\-nb\fR : enable the option `BDBLCKNB'.
|
79
|
+
.br
|
80
|
+
\fB\-sx\fR : the input data is evaluated as a hexadecimal data string.
|
81
|
+
.br
|
82
|
+
\fB\-dk\fR : use the function `tcbdbputkeep' instead of `tcbdbput'.
|
83
|
+
.br
|
84
|
+
\fB\-dc\fR : use the function `tcbdbputcat' instead of `tcbdbput'.
|
85
|
+
.br
|
86
|
+
\fB\-dd\fR : use the function `tcbdbputdup' instead of `tcbdbput'.
|
87
|
+
.br
|
88
|
+
\fB\-db\fR : use the function `tcbdbputdupback' instead of `tcbdbput'.
|
89
|
+
.br
|
90
|
+
\fB\-dai\fR : use the function `tcbdbaddint' instead of `tcbdbput'.
|
91
|
+
.br
|
92
|
+
\fB\-dad\fR : use the function `tcbdbadddouble' instead of `tcbdbput'.
|
93
|
+
.br
|
94
|
+
\fB\-px\fR : the output data is converted into a hexadecimal data string.
|
95
|
+
.br
|
96
|
+
\fB\-pz\fR : do not append line feed at the end of the output.
|
97
|
+
.br
|
98
|
+
\fB\-m \fInum\fR\fR : specify the maximum number of the output.
|
99
|
+
.br
|
100
|
+
\fB\-bk\fR : perform backword scanning.
|
101
|
+
.br
|
102
|
+
\fB\-pv\fR : print values of records also.
|
103
|
+
.br
|
104
|
+
\fB\-j \fIstr\fR\fR : specify the key where the cursor jump to.
|
105
|
+
.br
|
106
|
+
\fB\-rb \fIbkey\fR \fIekey\fR\fR : specify the range of keys.
|
107
|
+
.br
|
108
|
+
\fB\-fm \fIstr\fR\fR : specify the prefix of keys.
|
109
|
+
.br
|
110
|
+
\fB\-tz\fR : enable the option `UINT8_MAX'.
|
111
|
+
.br
|
112
|
+
\fB\-df\fR : perform defragmentation only.
|
113
|
+
.br
|
114
|
+
\fB\-sc\fR : normalize keys as lower cases.
|
115
|
+
.br
|
116
|
+
.RE
|
117
|
+
.PP
|
118
|
+
This command returns 0 on success, another on failure.
|
119
|
+
|
120
|
+
.SH SEE ALSO
|
121
|
+
.PP
|
122
|
+
.BR tcbtest (1),
|
123
|
+
.BR tcbmttest (1),
|
124
|
+
.BR tcbdb (3),
|
125
|
+
.BR tokyocabinet (3)
|
@@ -0,0 +1,81 @@
|
|
1
|
+
.TH "TCBMTTEST" 1 "2009-10-13" "Man Page" "Tokyo Cabinet"
|
2
|
+
|
3
|
+
.SH NAME
|
4
|
+
tcbmttest \- test cases of the B+ tree database API
|
5
|
+
|
6
|
+
.SH DESCRIPTION
|
7
|
+
.PP
|
8
|
+
The command `\fBtcbmttest\fR' is a utility for facility test and performance test. This command is used in the following format. `\fIpath\fR' specifies the path of a database file. `\fItnum\fR' specifies the number of running threads. `\fIrnum\fR' specifies the number of iterations. `\fIlmemb\fR' specifies the number of members in each leaf page. `\fInmemb\fR' specifies the number of members in each non\-leaf page. `\fIbnum\fR' specifies the number of buckets. `\fIapow\fR' specifies the power of the alignment. `\fIfpow\fR' specifies the power of the free block pool.
|
9
|
+
.PP
|
10
|
+
.RS
|
11
|
+
.br
|
12
|
+
\fBtcbmttest write \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-rnd\fR]\fB \fIpath\fB \fItnum\fB \fIrnum\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
|
13
|
+
.RS
|
14
|
+
Store records with keys of 8 bytes. They change as `00000001', `00000002'...
|
15
|
+
.RE
|
16
|
+
.br
|
17
|
+
\fBtcbmttest read \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-wb\fR]\fB \fR[\fB\-rnd\fR]\fB \fIpath\fB \fItnum\fB\fR
|
18
|
+
.RS
|
19
|
+
Retrieve all records of the database above.
|
20
|
+
.RE
|
21
|
+
.br
|
22
|
+
\fBtcbmttest remove \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-rnd\fR]\fB \fIpath\fB \fItnum\fB\fR
|
23
|
+
.RS
|
24
|
+
Remove all records of the database above.
|
25
|
+
.RE
|
26
|
+
.br
|
27
|
+
\fBtcbmttest wicked \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-nc\fR]\fB \fIpath\fB \fItnum\fB \fIrnum\fB\fR
|
28
|
+
.RS
|
29
|
+
Perform updating operations selected at random.
|
30
|
+
.RE
|
31
|
+
.br
|
32
|
+
\fBtcbmttest typical \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-nc\fR]\fB \fR[\fB\-rr \fInum\fB\fR]\fB \fIpath\fB \fItnum\fB \fIrnum\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
|
33
|
+
.RS
|
34
|
+
Perform typical operations selected at random.
|
35
|
+
.RE
|
36
|
+
.br
|
37
|
+
\fBtcbmttest race \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fIpath\fB \fItnum\fB \fIrnum\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
|
38
|
+
.RS
|
39
|
+
Perform race condition test.
|
40
|
+
.RE
|
41
|
+
.RE
|
42
|
+
.PP
|
43
|
+
Options feature the following.
|
44
|
+
.PP
|
45
|
+
.RS
|
46
|
+
\fB\-tl\fR : enable the option `BDBTLARGE'.
|
47
|
+
.br
|
48
|
+
\fB\-td\fR : enable the option `BDBTDEFLATE'.
|
49
|
+
.br
|
50
|
+
\fB\-tb\fR : enable the option `BDBTBZIP'.
|
51
|
+
.br
|
52
|
+
\fB\-tt\fR : enable the option `BDBTTCBS'.
|
53
|
+
.br
|
54
|
+
\fB\-tx\fR : enable the option `BDBTEXCODEC'.
|
55
|
+
.br
|
56
|
+
\fB\-xm \fInum\fR\fR : specify the size of the extra mapped memory.
|
57
|
+
.br
|
58
|
+
\fB\-df \fInum\fR\fR : specify the unit step number of auto defragmentation.
|
59
|
+
.br
|
60
|
+
\fB\-nl\fR : enable the option `BDBNOLCK'.
|
61
|
+
.br
|
62
|
+
\fB\-nb\fR : enable the option `BDBLCKNB'.
|
63
|
+
.br
|
64
|
+
\fB\-rnd\fR : select keys at random.
|
65
|
+
.br
|
66
|
+
\fB\-wb\fR : use the function `tchdbget3' instead of `tchdbget'.
|
67
|
+
.br
|
68
|
+
\fB\-nc\fR : omit the comparison test.
|
69
|
+
.br
|
70
|
+
\fB\-rr \fInum\fR\fR : specify the ratio of reading operation by percentage.
|
71
|
+
.br
|
72
|
+
.RE
|
73
|
+
.PP
|
74
|
+
This command returns 0 on success, another on failure.
|
75
|
+
|
76
|
+
.SH SEE ALSO
|
77
|
+
.PP
|
78
|
+
.BR tcbtest (1),
|
79
|
+
.BR tcbmgr (1),
|
80
|
+
.BR tcbdb (3),
|
81
|
+
.BR tokyocabinet (3)
|
@@ -0,0 +1,107 @@
|
|
1
|
+
.TH "TCBTEST" 1 "2009-10-13" "Man Page" "Tokyo Cabinet"
|
2
|
+
|
3
|
+
.SH NAME
|
4
|
+
tcbtest \- test cases of the B+ tree database API
|
5
|
+
|
6
|
+
.SH DESCRIPTION
|
7
|
+
The command `\fBtcbtest\fR' is a utility for facility test and performance test. This command is used in the following format. `\fIpath\fR' specifies the path of a database file. `\fIrnum\fR' specifies the number of iterations. `\fIlmemb\fR' specifies the number of members in each leaf page. `\fInmemb\fR' specifies the number of members in each non\-leaf page. `\fIbnum\fR' specifies the number of buckets. `\fIapow\fR' specifies the power of the alignment. `\fIfpow\fR' specifies the power of the free block pool.
|
8
|
+
.PP
|
9
|
+
.RS
|
10
|
+
.br
|
11
|
+
\fBtcbtest write \fR[\fB\-mt\fR]\fB \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-lc \fInum\fB\fR]\fB \fR[\fB\-nc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-ls \fInum\fB\fR]\fB \fR[\fB\-ca \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-rnd\fR]\fB \fIpath\fB \fIrnum\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
|
12
|
+
.RS
|
13
|
+
Store records with keys of 8 bytes. They change as `00000001', `00000002'...
|
14
|
+
.RE
|
15
|
+
.br
|
16
|
+
\fBtcbtest read \fR[\fB\-mt\fR]\fB \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-lc \fInum\fB\fR]\fB \fR[\fB\-nc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-wb\fR]\fB \fR[\fB\-rnd\fR]\fB \fIpath\fB\fR
|
17
|
+
.RS
|
18
|
+
Retrieve all records of the database above.
|
19
|
+
.RE
|
20
|
+
.br
|
21
|
+
\fBtcbtest remove \fR[\fB\-mt\fR]\fB \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-lc \fInum\fB\fR]\fB \fR[\fB\-nc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-rnd\fR]\fB \fIpath\fB\fR
|
22
|
+
.RS
|
23
|
+
Remove all records of the database above.
|
24
|
+
.RE
|
25
|
+
.br
|
26
|
+
\fBtcbtest rcat \fR[\fB\-mt\fR]\fB \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-lc \fInum\fB\fR]\fB \fR[\fB\-nc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-ls \fInum\fB\fR]\fB \fR[\fB\-ca \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fR[\fB\-pn \fInum\fB\fR]\fB \fR[\fB\-dai\fR|\fB\-dad\fR|\fB\-rl\fR|\fB\-ru\fR]\fB \fIpath\fB \fIrnum\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
|
27
|
+
.RS
|
28
|
+
Store records with partway duplicated keys using concatenate mode.
|
29
|
+
.RE
|
30
|
+
.br
|
31
|
+
\fBtcbtest queue \fR[\fB\-mt\fR]\fB \fR[\fB\-cd\fR|\fB\-ci\fR|\fB\-cj\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-lc \fInum\fB\fR]\fB \fR[\fB\-nc \fInum\fB\fR]\fB \fR[\fB\-xm \fInum\fB\fR]\fB \fR[\fB\-df \fInum\fB\fR]\fB \fR[\fB\-ls \fInum\fB\fR]\fB \fR[\fB\-ca \fInum\fB\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fIpath\fB \fIrnum\fB \fR[\fB\fIlmemb\fB \fR[\fB\fInmemb\fB \fR[\fB\fIbnum\fB \fR[\fB\fIapow\fB \fR[\fB\fIfpow\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR]\fB\fR
|
32
|
+
.RS
|
33
|
+
Perform queueing and dequeueing.
|
34
|
+
.RE
|
35
|
+
.br
|
36
|
+
\fBtcbtest misc \fR[\fB\-mt\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fIpath\fB \fIrnum\fB\fR
|
37
|
+
.RS
|
38
|
+
Perform miscellaneous test of various operations.
|
39
|
+
.RE
|
40
|
+
.br
|
41
|
+
\fBtcbtest wicked \fR[\fB\-mt\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-td\fR|\fB\-tb\fR|\fB\-tt\fR|\fB\-tx\fR]\fB \fR[\fB\-nl\fR|\fB\-nb\fR]\fB \fIpath\fB \fIrnum\fB\fR
|
42
|
+
.RS
|
43
|
+
Perform updating operations selected at random.
|
44
|
+
.RE
|
45
|
+
.RE
|
46
|
+
.PP
|
47
|
+
Options feature the following.
|
48
|
+
.PP
|
49
|
+
.RS
|
50
|
+
\fB\-mt\fR : call the function `tchdbsetmutex'.
|
51
|
+
.br
|
52
|
+
\fB\-cd\fR : use the comparison function `tccmpdecimal'.
|
53
|
+
.br
|
54
|
+
\fB\-ci\fR : use the comparison function `tccmpint32'.
|
55
|
+
.br
|
56
|
+
\fB\-cj\fR : use the comparison function `tccmpint64'.
|
57
|
+
.br
|
58
|
+
\fB\-tl\fR : enable the option `BDBTLARGE'.
|
59
|
+
.br
|
60
|
+
\fB\-td\fR : enable the option `BDBTDEFLATE'.
|
61
|
+
.br
|
62
|
+
\fB\-tb\fR : enable the option `BDBTBZIP'.
|
63
|
+
.br
|
64
|
+
\fB\-tt\fR : enable the option `BDBTTCBS'.
|
65
|
+
.br
|
66
|
+
\fB\-tx\fR : enable the option `BDBTEXCODEC'.
|
67
|
+
.br
|
68
|
+
\fB\-lc \fInum\fR\fR : specify the number of cached leaf pages.
|
69
|
+
.br
|
70
|
+
\fB\-nc \fInum\fR\fR : specify the number of cached non\-leaf pages.
|
71
|
+
.br
|
72
|
+
\fB\-xm \fInum\fR\fR : specify the size of the extra mapped memory.
|
73
|
+
.br
|
74
|
+
\fB\-df \fInum\fR\fR : specify the unit step number of auto defragmentation.
|
75
|
+
.br
|
76
|
+
\fB\-ls \fInum\fR\fR : specify the maximum size of each leaf page.
|
77
|
+
.br
|
78
|
+
\fB\-ca \fInum\fR\fR : specify the capacity number of records.
|
79
|
+
.br
|
80
|
+
\fB\-nl\fR : enable the option `BDBNOLCK'.
|
81
|
+
.br
|
82
|
+
\fB\-nb\fR : enable the option `BDBLCKNB'.
|
83
|
+
.br
|
84
|
+
\fB\-rnd\fR : select keys at random.
|
85
|
+
.br
|
86
|
+
\fB\-wb\fR : use the function `tcbdbget3' instead of `tcbdbget'.
|
87
|
+
.br
|
88
|
+
\fB\-pn \fInum\fR\fR : specify the number of patterns.
|
89
|
+
.br
|
90
|
+
\fB\-dai\fR : use the function `tcbdbaddint' instead of `tcbdbputcat'.
|
91
|
+
.br
|
92
|
+
\fB\-dad\fR : use the function `tcbdbadddouble' instead of `tcbdbputcat'.
|
93
|
+
.br
|
94
|
+
\fB\-rl\fR : set the length of values at random.
|
95
|
+
.br
|
96
|
+
\fB\-ru\fR : select update operations at random.
|
97
|
+
.br
|
98
|
+
.RE
|
99
|
+
.PP
|
100
|
+
This command returns 0 on success, another on failure.
|
101
|
+
|
102
|
+
.SH SEE ALSO
|
103
|
+
.PP
|
104
|
+
.BR tcbmttest (1),
|
105
|
+
.BR tcbmgr (1),
|
106
|
+
.BR tcbdb (3),
|
107
|
+
.BR tokyocabinet (3)
|
@@ -0,0 +1,975 @@
|
|
1
|
+
.TH "TCFDB" 3 "2009-10-13" "Man Page" "Tokyo Cabinet"
|
2
|
+
|
3
|
+
.SH NAME
|
4
|
+
tcfdb \- the fixed-length database API
|
5
|
+
|
6
|
+
.SH DESCRIPTION
|
7
|
+
.PP
|
8
|
+
Fixed\-length database is a file containing an array of fixed\-length elements and is handled with the fixed\-length database API.
|
9
|
+
.PP
|
10
|
+
To use the fixed\-length database API, include `\fBtcutil.h\fR', `\fBtcfdb.h\fR', and related standard header files. Usually, write the following description near the front of a source file.
|
11
|
+
.PP
|
12
|
+
.RS
|
13
|
+
.br
|
14
|
+
\fB#include <tcutil.h>\fR
|
15
|
+
.br
|
16
|
+
\fB#include <tcfdb.h>\fR
|
17
|
+
.br
|
18
|
+
\fB#include <stdlib.h>\fR
|
19
|
+
.br
|
20
|
+
\fB#include <stdbool.h>\fR
|
21
|
+
.br
|
22
|
+
\fB#include <stdint.h>\fR
|
23
|
+
.RE
|
24
|
+
.PP
|
25
|
+
Objects whose type is pointer to `\fBTCFDB\fR' are used to handle fixed\-length databases. A fixed\-length database object is created with the function `\fBtcfdbnew\fR' and is deleted with the function `\fBtcfdbdel\fR'. To avoid memory leak, it is important to delete every object when it is no longer in use.
|
26
|
+
.PP
|
27
|
+
Before operations to store or retrieve records, it is necessary to open a database file and connect the fixed\-length database object to it. The function `\fBtcfdbopen\fR' is used to open a database file and the function `\fBtcfdbclose\fR' is used to close the database file. To avoid data missing or corruption, it is important to close every database file when it is no longer in use. It is forbidden for multible database objects in a process to open the same database at the same time.
|
28
|
+
|
29
|
+
.SH API
|
30
|
+
.PP
|
31
|
+
The function `tcfdberrmsg' is used in order to get the message string corresponding to an error code.
|
32
|
+
.PP
|
33
|
+
.RS
|
34
|
+
.br
|
35
|
+
\fBconst char *tcfdberrmsg(int \fIecode\fB);\fR
|
36
|
+
.RS
|
37
|
+
`\fIecode\fR' specifies the error code.
|
38
|
+
.RE
|
39
|
+
.RS
|
40
|
+
The return value is the message string of the error code.
|
41
|
+
.RE
|
42
|
+
.RE
|
43
|
+
.PP
|
44
|
+
The function `tcfdbnew' is used in order to create a fixed\-length database object.
|
45
|
+
.PP
|
46
|
+
.RS
|
47
|
+
.br
|
48
|
+
\fBTCFDB *tcfdbnew(void);\fR
|
49
|
+
.RS
|
50
|
+
The return value is the new fixed\-length database object.
|
51
|
+
.RE
|
52
|
+
.RE
|
53
|
+
.PP
|
54
|
+
The function `tcfdbdel' is used in order to delete a fixed\-length database object.
|
55
|
+
.PP
|
56
|
+
.RS
|
57
|
+
.br
|
58
|
+
\fBvoid tcfdbdel(TCFDB *\fIfdb\fB);\fR
|
59
|
+
.RS
|
60
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
61
|
+
.RE
|
62
|
+
.RS
|
63
|
+
If the database is not closed, it is closed implicitly. Note that the deleted object and its derivatives can not be used anymore.
|
64
|
+
.RE
|
65
|
+
.RE
|
66
|
+
.PP
|
67
|
+
The function `tcfdbecode' is used in order to get the last happened error code of a fixed\-length database object.
|
68
|
+
.PP
|
69
|
+
.RS
|
70
|
+
.br
|
71
|
+
\fBint tcfdbecode(TCFDB *\fIfdb\fB);\fR
|
72
|
+
.RS
|
73
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
74
|
+
.RE
|
75
|
+
.RS
|
76
|
+
The return value is the last happened error code.
|
77
|
+
.RE
|
78
|
+
.RS
|
79
|
+
The following error codes are defined: `TCESUCCESS' for success, `TCETHREAD' for threading error, `TCEINVALID' for invalid operation, `TCENOFILE' for file not found, `TCENOPERM' for no permission, `TCEMETA' for invalid meta data, `TCERHEAD' for invalid record header, `TCEOPEN' for open error, `TCECLOSE' for close error, `TCETRUNC' for trunc error, `TCESYNC' for sync error, `TCESTAT' for stat error, `TCESEEK' for seek error, `TCEREAD' for read error, `TCEWRITE' for write error, `TCEMMAP' for mmap error, `TCELOCK' for lock error, `TCEUNLINK' for unlink error, `TCERENAME' for rename error, `TCEMKDIR' for mkdir error, `TCERMDIR' for rmdir error, `TCEKEEP' for existing record, `TCENOREC' for no record found, and `TCEMISC' for miscellaneous error.
|
80
|
+
.RE
|
81
|
+
.RE
|
82
|
+
.PP
|
83
|
+
The function `tcfdbsetmutex' is used in order to set mutual exclusion control of a fixed\-length database object for threading.
|
84
|
+
.PP
|
85
|
+
.RS
|
86
|
+
.br
|
87
|
+
\fBbool tcfdbsetmutex(TCFDB *\fIfdb\fB);\fR
|
88
|
+
.RS
|
89
|
+
`\fIfdb\fR' specifies the fixed\-length database object which is not opened.
|
90
|
+
.RE
|
91
|
+
.RS
|
92
|
+
If successful, the return value is true, else, it is false.
|
93
|
+
.RE
|
94
|
+
.RS
|
95
|
+
Note that the mutual exclusion control is needed if the object is shared by plural threads and this function should be called before the database is opened.
|
96
|
+
.RE
|
97
|
+
.RE
|
98
|
+
.PP
|
99
|
+
The function `tcfdbtune' is used in order to set the tuning parameters of a fixed\-length database object.
|
100
|
+
.PP
|
101
|
+
.RS
|
102
|
+
.br
|
103
|
+
\fBbool tcfdbtune(TCFDB *\fIfdb\fB, int32_t \fIwidth\fB, int64_t \fIlimsiz\fB);\fR
|
104
|
+
.RS
|
105
|
+
`\fIfdb\fR' specifies the fixed\-length database object which is not opened.
|
106
|
+
.RE
|
107
|
+
.RS
|
108
|
+
`\fIwidth\fR' specifies the width of the value of each record. If it is not more than 0, the default value is specified. The default value is 255.
|
109
|
+
.RE
|
110
|
+
.RS
|
111
|
+
`\fIlimsiz\fR' specifies the limit size of the database file. If it is not more than 0, the default value is specified. The default value is 268435456.
|
112
|
+
.RE
|
113
|
+
.RS
|
114
|
+
If successful, the return value is true, else, it is false.
|
115
|
+
.RE
|
116
|
+
.RS
|
117
|
+
Note that the tuning parameters should be set before the database is opened.
|
118
|
+
.RE
|
119
|
+
.RE
|
120
|
+
.PP
|
121
|
+
The function `tcfdbopen' is used in order to open a database file and connect a fixed\-length database object.
|
122
|
+
.PP
|
123
|
+
.RS
|
124
|
+
.br
|
125
|
+
\fBbool tcfdbopen(TCFDB *\fIfdb\fB, const char *\fIpath\fB, int \fIomode\fB);\fR
|
126
|
+
.RS
|
127
|
+
`\fIfdb\fR' specifies the fixed\-length database object which is not opened.
|
128
|
+
.RE
|
129
|
+
.RS
|
130
|
+
`\fIpath\fR' specifies the path of the database file.
|
131
|
+
.RE
|
132
|
+
.RS
|
133
|
+
`\fIomode\fR' specifies the connection mode: `FDBOWRITER' as a writer, `FDBOREADER' as a reader. If the mode is `FDBOWRITER', the following may be added by bitwise\-or: `FDBOCREAT', which means it creates a new database if not exist, `FDBOTRUNC', which means it creates a new database regardless if one exists, `FDBOTSYNC', which means every transaction synchronizes updated contents with the device. Both of `FDBOREADER' and `FDBOWRITER' can be added to by bitwise\-or: `FDBONOLCK', which means it opens the database file without file locking, or `FDBOLCKNB', which means locking is performed without blocking.
|
134
|
+
.RE
|
135
|
+
.RS
|
136
|
+
If successful, the return value is true, else, it is false.
|
137
|
+
.RE
|
138
|
+
.RE
|
139
|
+
.PP
|
140
|
+
The function `tcfdbclose' is used in order to close a fixed\-length database object.
|
141
|
+
.PP
|
142
|
+
.RS
|
143
|
+
.br
|
144
|
+
\fBbool tcfdbclose(TCFDB *\fIfdb\fB);\fR
|
145
|
+
.RS
|
146
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
147
|
+
.RE
|
148
|
+
.RS
|
149
|
+
If successful, the return value is true, else, it is false.
|
150
|
+
.RE
|
151
|
+
.RS
|
152
|
+
Update of a database is assured to be written when the database is closed. If a writer opens a database but does not close it appropriately, the database will be broken.
|
153
|
+
.RE
|
154
|
+
.RE
|
155
|
+
.PP
|
156
|
+
The function `tcfdbput' is used in order to store a record into a fixed\-length database object.
|
157
|
+
.PP
|
158
|
+
.RS
|
159
|
+
.br
|
160
|
+
\fBbool tcfdbput(TCFDB *\fIfdb\fB, int64_t \fIid\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
161
|
+
.RS
|
162
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
163
|
+
.RE
|
164
|
+
.RS
|
165
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDPREV', the number less by one than the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified. If it is `FDBIDNEXT', the number greater by one than the maximum ID number of existing records is specified.
|
166
|
+
.RE
|
167
|
+
.RS
|
168
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
169
|
+
.RE
|
170
|
+
.RS
|
171
|
+
`\fIvsiz\fR' specifies the size of the region of the value. If the size of the value is greater than the width tuning parameter of the database, the size is cut down to the width.
|
172
|
+
.RE
|
173
|
+
.RS
|
174
|
+
If successful, the return value is true, else, it is false.
|
175
|
+
.RE
|
176
|
+
.RS
|
177
|
+
If a record with the same key exists in the database, it is overwritten.
|
178
|
+
.RE
|
179
|
+
.RE
|
180
|
+
.PP
|
181
|
+
The function `tcfdbput2' is used in order to store a record with a decimal key into a fixed\-length database object.
|
182
|
+
.PP
|
183
|
+
.RS
|
184
|
+
.br
|
185
|
+
\fBbool tcfdbput2(TCFDB *\fIfdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
186
|
+
.RS
|
187
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
188
|
+
.RE
|
189
|
+
.RS
|
190
|
+
`\fIkbuf\fR' specifies the pointer to the region of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "prev", the number less by one than the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified. If it is "next", the number greater by one than the maximum ID number of existing records is specified.
|
191
|
+
.RE
|
192
|
+
.RS
|
193
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
194
|
+
.RE
|
195
|
+
.RS
|
196
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
197
|
+
.RE
|
198
|
+
.RS
|
199
|
+
`\fIvsiz\fR' specifies the size of the region of the value. If the size of the value is greater than the width tuning parameter of the database, the size is cut down to the width.
|
200
|
+
.RE
|
201
|
+
.RS
|
202
|
+
If successful, the return value is true, else, it is false.
|
203
|
+
.RE
|
204
|
+
.RS
|
205
|
+
If a record with the same key exists in the database, it is overwritten.
|
206
|
+
.RE
|
207
|
+
.RE
|
208
|
+
.PP
|
209
|
+
The function `tcfdbput3' is used in order to store a string record with a decimal key into a fixed\-length database object.
|
210
|
+
.PP
|
211
|
+
.RS
|
212
|
+
.br
|
213
|
+
\fBbool tcfdbput3(TCFDB *\fIfdb\fB, const char *\fIkstr\fB, const void *\fIvstr\fB);\fR
|
214
|
+
.RS
|
215
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
216
|
+
.RE
|
217
|
+
.RS
|
218
|
+
`\fIkstr\fR' specifies the string of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "prev", the number less by one than the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified. If it is "next", the number greater by one than the maximum ID number of existing records is specified.
|
219
|
+
.RE
|
220
|
+
.RS
|
221
|
+
`\fIvstr\fR' specifies the string of the value.
|
222
|
+
.RE
|
223
|
+
.RS
|
224
|
+
If successful, the return value is true, else, it is false.
|
225
|
+
.RE
|
226
|
+
.RS
|
227
|
+
If a record with the same key exists in the database, it is overwritten.
|
228
|
+
.RE
|
229
|
+
.RE
|
230
|
+
.PP
|
231
|
+
The function `tcfdbputkeep' is used in order to store a new record into a fixed\-length database object.
|
232
|
+
.PP
|
233
|
+
.RS
|
234
|
+
.br
|
235
|
+
\fBbool tcfdbputkeep(TCFDB *\fIfdb\fB, int64_t \fIid\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
236
|
+
.RS
|
237
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
238
|
+
.RE
|
239
|
+
.RS
|
240
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDPREV', the number less by one than the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified. If it is `FDBIDNEXT', the number greater by one than the maximum ID number of existing records is specified.
|
241
|
+
.RE
|
242
|
+
.RS
|
243
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
244
|
+
.RE
|
245
|
+
.RS
|
246
|
+
`\fIvsiz\fR' specifies the size of the region of the value. If the size of the value is greater than the width tuning parameter of the database, the size is cut down to the width.
|
247
|
+
.RE
|
248
|
+
.RS
|
249
|
+
If successful, the return value is true, else, it is false.
|
250
|
+
.RE
|
251
|
+
.RS
|
252
|
+
If a record with the same key exists in the database, this function has no effect.
|
253
|
+
.RE
|
254
|
+
.RE
|
255
|
+
.PP
|
256
|
+
The function `tcfdbputkeep2' is used in order to store a new record with a decimal key into a fixed\-length database object.
|
257
|
+
.PP
|
258
|
+
.RS
|
259
|
+
.br
|
260
|
+
\fBbool tcfdbputkeep2(TCFDB *\fIfdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
261
|
+
.RS
|
262
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
263
|
+
.RE
|
264
|
+
.RS
|
265
|
+
`\fIkbuf\fR' specifies the pointer to the region of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "prev", the number less by one than the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified. If it is "next", the number greater by one than the maximum ID number of existing records is specified.
|
266
|
+
.RE
|
267
|
+
.RS
|
268
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
269
|
+
.RE
|
270
|
+
.RS
|
271
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
272
|
+
.RE
|
273
|
+
.RS
|
274
|
+
`\fIvsiz\fR' specifies the size of the region of the value. If the size of the value is greater than the width tuning parameter of the database, the size is cut down to the width.
|
275
|
+
.RE
|
276
|
+
.RS
|
277
|
+
If successful, the return value is true, else, it is false.
|
278
|
+
.RE
|
279
|
+
.RS
|
280
|
+
If a record with the same key exists in the database, this function has no effect.
|
281
|
+
.RE
|
282
|
+
.RE
|
283
|
+
.PP
|
284
|
+
The function `tcfdbputkeep3' is used in order to store a new string record with a decimal key into a fixed\-length database object.
|
285
|
+
.PP
|
286
|
+
.RS
|
287
|
+
.br
|
288
|
+
\fBbool tcfdbputkeep3(TCFDB *\fIfdb\fB, const char *\fIkstr\fB, const void *\fIvstr\fB);\fR
|
289
|
+
.RS
|
290
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
291
|
+
.RE
|
292
|
+
.RS
|
293
|
+
`\fIkstr\fR' specifies the string of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "prev", the number less by one than the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified. If it is "next", the number greater by one than the maximum ID number of existing records is specified.
|
294
|
+
.RE
|
295
|
+
.RS
|
296
|
+
`\fIvstr\fR' specifies the string of the value.
|
297
|
+
.RE
|
298
|
+
.RS
|
299
|
+
If successful, the return value is true, else, it is false.
|
300
|
+
.RE
|
301
|
+
.RS
|
302
|
+
If a record with the same key exists in the database, this function has no effect.
|
303
|
+
.RE
|
304
|
+
.RE
|
305
|
+
.PP
|
306
|
+
The function `tcfdbputcat' is used in order to concatenate a value at the end of the existing record in a fixed\-length database object.
|
307
|
+
.PP
|
308
|
+
.RS
|
309
|
+
.br
|
310
|
+
\fBbool tcfdbputcat(TCFDB *\fIfdb\fB, int64_t \fIid\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
311
|
+
.RS
|
312
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
313
|
+
.RE
|
314
|
+
.RS
|
315
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDPREV', the number less by one than the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified. If it is `FDBIDNEXT', the number greater by one than the maximum ID number of existing records is specified.
|
316
|
+
.RE
|
317
|
+
.RS
|
318
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
319
|
+
.RE
|
320
|
+
.RS
|
321
|
+
`\fIvsiz\fR' specifies the size of the region of the value. If the size of the value is greater than the width tuning parameter of the database, the size is cut down to the width.
|
322
|
+
.RE
|
323
|
+
.RS
|
324
|
+
If successful, the return value is true, else, it is false.
|
325
|
+
.RE
|
326
|
+
.RS
|
327
|
+
If there is no corresponding record, a new record is created.
|
328
|
+
.RE
|
329
|
+
.RE
|
330
|
+
.PP
|
331
|
+
The function `tcfdbputcat2' is used in order to concatenate a value with a decimal key in a fixed\-length database object.
|
332
|
+
.PP
|
333
|
+
.RS
|
334
|
+
.br
|
335
|
+
\fBbool tcfdbputcat2(TCFDB *\fIfdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
336
|
+
.RS
|
337
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
338
|
+
.RE
|
339
|
+
.RS
|
340
|
+
`\fIkbuf\fR' specifies the pointer to the region of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "prev", the number less by one than the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified. If it is "next", the number greater by one than the maximum ID number of existing records is specified.
|
341
|
+
.RE
|
342
|
+
.RS
|
343
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
344
|
+
.RE
|
345
|
+
.RS
|
346
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
347
|
+
.RE
|
348
|
+
.RS
|
349
|
+
`\fIvsiz\fR' specifies the size of the region of the value. If the size of the value is greater than the width tuning parameter of the database, the size is cut down to the width.
|
350
|
+
.RE
|
351
|
+
.RS
|
352
|
+
If successful, the return value is true, else, it is false.
|
353
|
+
.RE
|
354
|
+
.RS
|
355
|
+
If there is no corresponding record, a new record is created.
|
356
|
+
.RE
|
357
|
+
.RE
|
358
|
+
.PP
|
359
|
+
The function `tcfdbputcat3' is used in order to concatenate a string value with a decimal key in a fixed\-length database object.
|
360
|
+
.PP
|
361
|
+
.RS
|
362
|
+
.br
|
363
|
+
\fBbool tcfdbputcat3(TCFDB *\fIfdb\fB, const char *\fIkstr\fB, const void *\fIvstr\fB);\fR
|
364
|
+
.RS
|
365
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
366
|
+
.RE
|
367
|
+
.RS
|
368
|
+
`\fIkstr\fR' specifies the string of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "prev", the number less by one than the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified. If it is "next", the number greater by one than the maximum ID number of existing records is specified.
|
369
|
+
.RE
|
370
|
+
.RS
|
371
|
+
`\fIvstr\fR' specifies the string of the value.
|
372
|
+
.RE
|
373
|
+
.RS
|
374
|
+
If successful, the return value is true, else, it is false.
|
375
|
+
.RE
|
376
|
+
.RS
|
377
|
+
If there is no corresponding record, a new record is created.
|
378
|
+
.RE
|
379
|
+
.RE
|
380
|
+
.PP
|
381
|
+
The function `tcfdbout' is used in order to remove a record of a fixed\-length database object.
|
382
|
+
.PP
|
383
|
+
.RS
|
384
|
+
.br
|
385
|
+
\fBbool tcfdbout(TCFDB *\fIfdb\fB, int64_t \fIid\fB);\fR
|
386
|
+
.RS
|
387
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
388
|
+
.RE
|
389
|
+
.RS
|
390
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified.
|
391
|
+
.RE
|
392
|
+
.RS
|
393
|
+
If successful, the return value is true, else, it is false.
|
394
|
+
.RE
|
395
|
+
.RE
|
396
|
+
.PP
|
397
|
+
The function `tcfdbout2' is used in order to remove a record with a decimal key of a fixed\-length database object.
|
398
|
+
.PP
|
399
|
+
.RS
|
400
|
+
.br
|
401
|
+
\fBbool tcfdbout2(TCFDB *\fIfdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB);\fR
|
402
|
+
.RS
|
403
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
404
|
+
.RE
|
405
|
+
.RS
|
406
|
+
`\fIkbuf\fR' specifies the pointer to the region of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified.
|
407
|
+
.RE
|
408
|
+
.RS
|
409
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
410
|
+
.RE
|
411
|
+
.RS
|
412
|
+
If successful, the return value is true, else, it is false.
|
413
|
+
.RE
|
414
|
+
.RE
|
415
|
+
.PP
|
416
|
+
The function `tcfdbout3' is used in order to remove a string record with a decimal key of a fixed\-length database object.
|
417
|
+
.PP
|
418
|
+
.RS
|
419
|
+
.br
|
420
|
+
\fBbool tcfdbout3(TCFDB *\fIfdb\fB, const char *\fIkstr\fB);\fR
|
421
|
+
.RS
|
422
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
423
|
+
.RE
|
424
|
+
.RS
|
425
|
+
`\fIkstr\fR' specifies the string of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified.
|
426
|
+
.RE
|
427
|
+
.RS
|
428
|
+
If successful, the return value is true, else, it is false.
|
429
|
+
.RE
|
430
|
+
.RE
|
431
|
+
.PP
|
432
|
+
The function `tcfdbget' is used in order to retrieve a record in a fixed\-length database object.
|
433
|
+
.PP
|
434
|
+
.RS
|
435
|
+
.br
|
436
|
+
\fBvoid *tcfdbget(TCFDB *\fIfdb\fB, int64_t \fIid\fB, int *\fIsp\fB);\fR
|
437
|
+
.RS
|
438
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
439
|
+
.RE
|
440
|
+
.RS
|
441
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified.
|
442
|
+
.RE
|
443
|
+
.RS
|
444
|
+
`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned.
|
445
|
+
.RE
|
446
|
+
.RS
|
447
|
+
If successful, the return value is the pointer to the region of the value of the corresponding record. `NULL' is returned if no record corresponds.
|
448
|
+
.RE
|
449
|
+
.RS
|
450
|
+
Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string. Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.
|
451
|
+
.RE
|
452
|
+
.RE
|
453
|
+
.PP
|
454
|
+
The function `tcfdbget2' is used in order to retrieve a record with a decimal key in a fixed\-length database object.
|
455
|
+
.PP
|
456
|
+
.RS
|
457
|
+
.br
|
458
|
+
\fBvoid *tcfdbget2(TCFDB *\fIfdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, int *\fIsp\fB);\fR
|
459
|
+
.RS
|
460
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
461
|
+
.RE
|
462
|
+
.RS
|
463
|
+
`\fIkbuf\fR' specifies the pointer to the region of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified.
|
464
|
+
.RE
|
465
|
+
.RS
|
466
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
467
|
+
.RE
|
468
|
+
.RS
|
469
|
+
`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned.
|
470
|
+
.RE
|
471
|
+
.RS
|
472
|
+
If successful, the return value is the pointer to the region of the value of the corresponding record. `NULL' is returned if no record corresponds.
|
473
|
+
.RE
|
474
|
+
.RS
|
475
|
+
Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string. Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.
|
476
|
+
.RE
|
477
|
+
.RE
|
478
|
+
.PP
|
479
|
+
The function `tcfdbget3' is used in order to retrieve a string record with a decimal key in a fixed\-length database object.
|
480
|
+
.PP
|
481
|
+
.RS
|
482
|
+
.br
|
483
|
+
\fBchar *tcfdbget3(TCFDB *\fIfdb\fB, const char *\fIkstr\fB);\fR
|
484
|
+
.RS
|
485
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
486
|
+
.RE
|
487
|
+
.RS
|
488
|
+
`\fIkstr\fR' specifies the string of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified.
|
489
|
+
.RE
|
490
|
+
.RS
|
491
|
+
If successful, the return value is the string of the value of the corresponding record. `NULL' is returned if no record corresponds.
|
492
|
+
.RE
|
493
|
+
.RS
|
494
|
+
Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string. Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.
|
495
|
+
.RE
|
496
|
+
.RE
|
497
|
+
.PP
|
498
|
+
The function `tcfdbget4' is used in order to retrieve a record in a fixed\-length database object and write the value into a buffer.
|
499
|
+
.PP
|
500
|
+
.RS
|
501
|
+
.br
|
502
|
+
\fBint tcfdbget4(TCFDB *\fIfdb\fB, int64_t \fIid\fB, void *\fIvbuf\fB, int \fImax\fB);\fR
|
503
|
+
.RS
|
504
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
505
|
+
.RE
|
506
|
+
.RS
|
507
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified.
|
508
|
+
.RE
|
509
|
+
.RS
|
510
|
+
`\fIvbuf\fR' specifies the pointer to the buffer into which the value of the corresponding record is written.
|
511
|
+
.RE
|
512
|
+
.RS
|
513
|
+
`\fImax\fR' specifies the size of the buffer.
|
514
|
+
.RE
|
515
|
+
.RS
|
516
|
+
If successful, the return value is the size of the written data, else, it is \-1. \-1 is returned if no record corresponds to the specified key.
|
517
|
+
.RE
|
518
|
+
.RS
|
519
|
+
Note that an additional zero code is not appended at the end of the region of the writing buffer.
|
520
|
+
.RE
|
521
|
+
.RE
|
522
|
+
.PP
|
523
|
+
The function `tcfdbvsiz' is used in order to get the size of the value of a record in a fixed\-length database object.
|
524
|
+
.PP
|
525
|
+
.RS
|
526
|
+
.br
|
527
|
+
\fBint tcfdbvsiz(TCFDB *\fIfdb\fB, int64_t \fIid\fB);\fR
|
528
|
+
.RS
|
529
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
530
|
+
.RE
|
531
|
+
.RS
|
532
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified.
|
533
|
+
.RE
|
534
|
+
.RS
|
535
|
+
If successful, the return value is the size of the value of the corresponding record, else, it is \-1.
|
536
|
+
.RE
|
537
|
+
.RE
|
538
|
+
.PP
|
539
|
+
The function `tcfdbvsiz2' is used in order to get the size of the value with a decimal key in a fixed\-length database object.
|
540
|
+
.PP
|
541
|
+
.RS
|
542
|
+
.br
|
543
|
+
\fBint tcfdbvsiz2(TCFDB *\fIfdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB);\fR
|
544
|
+
.RS
|
545
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
546
|
+
.RE
|
547
|
+
.RS
|
548
|
+
`\fIkbuf\fR' specifies the pointer to the region of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified.
|
549
|
+
.RE
|
550
|
+
.RS
|
551
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
552
|
+
.RE
|
553
|
+
.RS
|
554
|
+
If successful, the return value is the size of the value of the corresponding record, else, it is \-1.
|
555
|
+
.RE
|
556
|
+
.RE
|
557
|
+
.PP
|
558
|
+
The function `tcfdbvsiz3' is used in order to get the size of the string value with a decimal key in a fixed\-length database object.
|
559
|
+
.PP
|
560
|
+
.RS
|
561
|
+
.br
|
562
|
+
\fBint tcfdbvsiz3(TCFDB *\fIfdb\fB, const char *\fIkstr\fB);\fR
|
563
|
+
.RS
|
564
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
565
|
+
.RE
|
566
|
+
.RS
|
567
|
+
`\fIkstr\fR' specifies the string of the decimal key. It should be more than 0. If it is "min", the minimum ID number of existing records is specified. If it is "max", the maximum ID number of existing records is specified.
|
568
|
+
.RE
|
569
|
+
.RS
|
570
|
+
If successful, the return value is the size of the value of the corresponding record, else, it is \-1.
|
571
|
+
.RE
|
572
|
+
.RE
|
573
|
+
.PP
|
574
|
+
The function `tcfdbiterinit' is used in order to initialize the iterator of a fixed\-length database object.
|
575
|
+
.PP
|
576
|
+
.RS
|
577
|
+
.br
|
578
|
+
\fBbool tcfdbiterinit(TCFDB *\fIfdb\fB);\fR
|
579
|
+
.RS
|
580
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
581
|
+
.RE
|
582
|
+
.RS
|
583
|
+
If successful, the return value is true, else, it is false.
|
584
|
+
.RE
|
585
|
+
.RS
|
586
|
+
The iterator is used in order to access the key of every record stored in a database.
|
587
|
+
.RE
|
588
|
+
.RE
|
589
|
+
.PP
|
590
|
+
The function `tcfdbiternext' is used in order to get the next ID number of the iterator of a fixed\-length database object.
|
591
|
+
.PP
|
592
|
+
.RS
|
593
|
+
.br
|
594
|
+
\fBuint64_t tcfdbiternext(TCFDB *\fIfdb\fB);\fR
|
595
|
+
.RS
|
596
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
597
|
+
.RE
|
598
|
+
.RS
|
599
|
+
If successful, the return value is the next ID number of the iterator, else, it is 0. 0 is returned when no record is to be get out of the iterator.
|
600
|
+
.RE
|
601
|
+
.RS
|
602
|
+
It is possible to access every record by iteration of calling this function. It is allowed to update or remove records whose keys are fetched while the iteration. The order of this traversal access method is ascending of the ID number.
|
603
|
+
.RE
|
604
|
+
.RE
|
605
|
+
.PP
|
606
|
+
The function `tcfdbiternext2' is used in order to get the next decimay key of the iterator of a fixed\-length database object.
|
607
|
+
.PP
|
608
|
+
.RS
|
609
|
+
.br
|
610
|
+
\fBvoid *tcfdbiternext2(TCFDB *\fIfdb\fB, int *\fIsp\fB);\fR
|
611
|
+
.RS
|
612
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
613
|
+
.RE
|
614
|
+
.RS
|
615
|
+
`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned.
|
616
|
+
.RE
|
617
|
+
.RS
|
618
|
+
If successful, the return value is the pointer to the region of the next decimal key, else, it is `NULL'. `NULL' is returned when no record is to be get out of the iterator.
|
619
|
+
.RE
|
620
|
+
.RS
|
621
|
+
Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string. Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use. It is possible to access every record by iteration of calling this function. It is allowed to update or remove records whose keys are fetched while the iteration. The order of this traversal access method is ascending of the ID number.
|
622
|
+
.RE
|
623
|
+
.RE
|
624
|
+
.PP
|
625
|
+
The function `tcfdbiternext3' is used in order to get the next decimay key string of the iterator of a fixed\-length database object.
|
626
|
+
.PP
|
627
|
+
.RS
|
628
|
+
.br
|
629
|
+
\fBchar *tcfdbiternext3(TCFDB *\fIfdb\fB);\fR
|
630
|
+
.RS
|
631
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
632
|
+
.RE
|
633
|
+
.RS
|
634
|
+
If successful, the return value is the string of the next decimal key, else, it is `NULL'. `NULL' is returned when no record is to be get out of the iterator.
|
635
|
+
.RE
|
636
|
+
.RS
|
637
|
+
Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use. It is possible to access every record by iteration of calling this function. It is allowed to update or remove records whose keys are fetched while the iteration. The order of this traversal access method is ascending of the ID number.
|
638
|
+
.RE
|
639
|
+
.RE
|
640
|
+
.PP
|
641
|
+
The function `tcfdbrange' is used in order to get range matching ID numbers in a fixed\-length database object.
|
642
|
+
.PP
|
643
|
+
.RS
|
644
|
+
.br
|
645
|
+
\fBuint64_t *tcfdbrange(TCFDB *\fIfdb\fB, int64_t \fIlower\fB, int64_t \fIupper\fB, int \fImax\fB, int *\fInp\fB);\fR
|
646
|
+
.RS
|
647
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
648
|
+
.RE
|
649
|
+
.RS
|
650
|
+
`\fIlower\fR' specifies the lower limit of the range. If it is `FDBIDMIN', the minimum ID is specified.
|
651
|
+
.RE
|
652
|
+
.RS
|
653
|
+
`\fIupper\fR' specifies the upper limit of the range. If it is `FDBIDMAX', the maximum ID is specified.
|
654
|
+
.RE
|
655
|
+
.RS
|
656
|
+
`\fImax\fR' specifies the maximum number of keys to be fetched. If it is negative, no limit is specified.
|
657
|
+
.RE
|
658
|
+
.RS
|
659
|
+
`\fInp\fR' specifies the pointer to the variable into which the number of elements of the return value is assigned.
|
660
|
+
.RE
|
661
|
+
.RS
|
662
|
+
If successful, the return value is the pointer to an array of ID numbers of the corresponding records. `NULL' is returned on failure. This function does never fail. It returns an empty array even if no key corresponds.
|
663
|
+
.RE
|
664
|
+
.RS
|
665
|
+
Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.
|
666
|
+
.RE
|
667
|
+
.RE
|
668
|
+
.PP
|
669
|
+
The function `tcfdbrange2' is used in order to get range matching decimal keys in a fixed\-length database object.
|
670
|
+
.PP
|
671
|
+
.RS
|
672
|
+
.br
|
673
|
+
\fBTCLIST *tcfdbrange2(TCFDB *\fIfdb\fB, const void *\fIlbuf\fB, int \fIlsiz\fB, const void *\fIubuf\fB, int \fIusiz\fB, int \fImax\fB);\fR
|
674
|
+
.RS
|
675
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
676
|
+
.RE
|
677
|
+
.RS
|
678
|
+
`\fIlbuf\fR' specifies the pointer to the region of the lower key. If it is "min", the minimum ID number of existing records is specified.
|
679
|
+
.RE
|
680
|
+
.RS
|
681
|
+
`\fIlsiz\fR' specifies the size of the region of the lower key.
|
682
|
+
.RE
|
683
|
+
.RS
|
684
|
+
`\fIubuf\fR' specifies the pointer to the region of the upper key. If it is "max", the maximum ID number of existing records is specified.
|
685
|
+
.RE
|
686
|
+
.RS
|
687
|
+
`\fIusiz\fR' specifies the size of the region of the upper key.
|
688
|
+
.RE
|
689
|
+
.RS
|
690
|
+
`\fImax\fR' specifies the maximum number of keys to be fetched. If it is negative, no limit is specified.
|
691
|
+
.RE
|
692
|
+
.RS
|
693
|
+
The return value is a list object of the corresponding decimal keys. This function does never fail. It returns an empty list even if no key corresponds.
|
694
|
+
.RE
|
695
|
+
.RS
|
696
|
+
Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use. Note that this function may be very slow because every key in the database is scanned.
|
697
|
+
.RE
|
698
|
+
.RE
|
699
|
+
.PP
|
700
|
+
The function `tcfdbrange3' is used in order to get range matching decimal keys with strings in a fixed\-length database object.
|
701
|
+
.PP
|
702
|
+
.RS
|
703
|
+
.br
|
704
|
+
\fBTCLIST *tcfdbrange3(TCFDB *\fIfdb\fB, const char *\fIlstr\fB, const char *\fIustr\fB, int \fImax\fB);\fR
|
705
|
+
.RS
|
706
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
707
|
+
.RE
|
708
|
+
.RS
|
709
|
+
`\fIlstr\fR' specifies the string of the lower key. If it is "min", the minimum ID number of existing records is specified.
|
710
|
+
.RE
|
711
|
+
.RS
|
712
|
+
`\fIustr\fR' specifies the string of the upper key. If it is "max", the maximum ID number of existing records is specified.
|
713
|
+
.RE
|
714
|
+
.RS
|
715
|
+
`\fImax\fR' specifies the maximum number of keys to be fetched. If it is negative, no limit is specified.
|
716
|
+
.RE
|
717
|
+
.RS
|
718
|
+
The return value is a list object of the corresponding decimal keys. This function does never fail. It returns an empty list even if no key corresponds.
|
719
|
+
.RE
|
720
|
+
.RS
|
721
|
+
Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use. Note that this function may be very slow because every key in the database is scanned.
|
722
|
+
.RE
|
723
|
+
.RE
|
724
|
+
.PP
|
725
|
+
The function `tcfdbrange4' is used in order to get keys with an interval notation in a fixed\-length database object.
|
726
|
+
.PP
|
727
|
+
.RS
|
728
|
+
.br
|
729
|
+
\fBTCLIST *tcfdbrange4(TCFDB *\fIfdb\fB, const void *\fIibuf\fB, int \fIisiz\fB, int \fImax\fB);\fR
|
730
|
+
.RS
|
731
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
732
|
+
.RE
|
733
|
+
.RS
|
734
|
+
`\fIibuf\fR' specifies the pointer to the region of the interval notation.
|
735
|
+
.RE
|
736
|
+
.RS
|
737
|
+
`\fIisiz\fR' specifies the size of the region of the interval notation.
|
738
|
+
.RE
|
739
|
+
.RS
|
740
|
+
`\fImax\fR' specifies the maximum number of keys to be fetched. If it is negative, no limit is specified.
|
741
|
+
.RE
|
742
|
+
.RS
|
743
|
+
The return value is a list object of the corresponding decimal keys. This function does never fail. It returns an empty list even if no key corresponds.
|
744
|
+
.RE
|
745
|
+
.RS
|
746
|
+
Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use. Note that this function may be very slow because every key in the database is scanned.
|
747
|
+
.RE
|
748
|
+
.RE
|
749
|
+
.PP
|
750
|
+
The function `tcfdbrange5' is used in order to get keys with an interval notation string in a fixed\-length database object.
|
751
|
+
.PP
|
752
|
+
.RS
|
753
|
+
.br
|
754
|
+
\fBTCLIST *tcfdbrange5(TCFDB *\fIfdb\fB, const void *\fIistr\fB, int \fImax\fB);\fR
|
755
|
+
.RS
|
756
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
757
|
+
.RE
|
758
|
+
.RS
|
759
|
+
`\fIistr\fR' specifies the pointer to the region of the interval notation string.
|
760
|
+
.RE
|
761
|
+
.RS
|
762
|
+
`\fImax\fR' specifies the maximum number of keys to be fetched. If it is negative, no limit is specified.
|
763
|
+
.RE
|
764
|
+
.RS
|
765
|
+
The return value is a list object of the corresponding decimal keys. This function does never fail. It returns an empty list even if no key corresponds.
|
766
|
+
.RE
|
767
|
+
.RS
|
768
|
+
Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use. Note that this function may be very slow because every key in the database is scanned.
|
769
|
+
.RE
|
770
|
+
.RE
|
771
|
+
.PP
|
772
|
+
The function `tcfdbaddint' is used in order to add an integer to a record in a fixed\-length database object.
|
773
|
+
.PP
|
774
|
+
.RS
|
775
|
+
.br
|
776
|
+
\fBint tcfdbaddint(TCFDB *\fIfdb\fB, int64_t \fIid\fB, int \fInum\fB);\fR
|
777
|
+
.RS
|
778
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
779
|
+
.RE
|
780
|
+
.RS
|
781
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDPREV', the number less by one than the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified. If it is `FDBIDNEXT', the number greater by one than the maximum ID number of existing records is specified.
|
782
|
+
.RE
|
783
|
+
.RS
|
784
|
+
`\fInum\fR' specifies the additional value.
|
785
|
+
.RE
|
786
|
+
.RS
|
787
|
+
If successful, the return value is the summation value, else, it is `INT_MIN'.
|
788
|
+
.RE
|
789
|
+
.RS
|
790
|
+
If the corresponding record exists, the value is treated as an integer and is added to. If no record corresponds, a new record of the additional value is stored.
|
791
|
+
.RE
|
792
|
+
.RE
|
793
|
+
.PP
|
794
|
+
The function `tcfdbadddouble' is used in order to add a real number to a record in a fixed\-length database object.
|
795
|
+
.PP
|
796
|
+
.RS
|
797
|
+
.br
|
798
|
+
\fBdouble tcfdbadddouble(TCFDB *\fIfdb\fB, int64_t \fIid\fB, double \fInum\fB);\fR
|
799
|
+
.RS
|
800
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
801
|
+
.RE
|
802
|
+
.RS
|
803
|
+
`\fIid\fR' specifies the ID number. It should be more than 0. If it is `FDBIDMIN', the minimum ID number of existing records is specified. If it is `FDBIDPREV', the number less by one than the minimum ID number of existing records is specified. If it is `FDBIDMAX', the maximum ID number of existing records is specified. If it is `FDBIDNEXT', the number greater by one than the maximum ID number of existing records is specified.
|
804
|
+
.RE
|
805
|
+
.RS
|
806
|
+
`\fInum\fR' specifies the additional value.
|
807
|
+
.RE
|
808
|
+
.RS
|
809
|
+
If successful, the return value is the summation value, else, it is Not\-a\-Number.
|
810
|
+
.RE
|
811
|
+
.RS
|
812
|
+
If the corresponding record exists, the value is treated as a real number and is added to. If no record corresponds, a new record of the additional value is stored.
|
813
|
+
.RE
|
814
|
+
.RE
|
815
|
+
.PP
|
816
|
+
The function `tcfdbsync' is used in order to synchronize updated contents of a fixed\-length database object with the file and the device.
|
817
|
+
.PP
|
818
|
+
.RS
|
819
|
+
.br
|
820
|
+
\fBbool tcfdbsync(TCFDB *\fIfdb\fB);\fR
|
821
|
+
.RS
|
822
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
823
|
+
.RE
|
824
|
+
.RS
|
825
|
+
If successful, the return value is true, else, it is false.
|
826
|
+
.RE
|
827
|
+
.RS
|
828
|
+
This function is useful when another process connects to the same database file.
|
829
|
+
.RE
|
830
|
+
.RE
|
831
|
+
.PP
|
832
|
+
The function `tcfdboptimize' is used in order to optimize the file of a fixed\-length database object.
|
833
|
+
.PP
|
834
|
+
.RS
|
835
|
+
.br
|
836
|
+
\fBbool tcfdboptimize(TCFDB *\fIfdb\fB, int32_t \fIwidth\fB, int64_t \fIlimsiz\fB);\fR
|
837
|
+
.RS
|
838
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
839
|
+
.RE
|
840
|
+
.RS
|
841
|
+
`\fIwidth\fR' specifies the width of the value of each record. If it is not more than 0, the current setting is not changed.
|
842
|
+
.RE
|
843
|
+
.RS
|
844
|
+
`\fIlimsiz\fR' specifies the limit size of the database file. If it is not more than 0, the current setting is not changed.
|
845
|
+
.RE
|
846
|
+
.RS
|
847
|
+
If successful, the return value is true, else, it is false.
|
848
|
+
.RE
|
849
|
+
.RE
|
850
|
+
.PP
|
851
|
+
The function `tcfdbvanish' is used in order to remove all records of a fixed\-length database object.
|
852
|
+
.PP
|
853
|
+
.RS
|
854
|
+
.br
|
855
|
+
\fBbool tcfdbvanish(TCFDB *\fIfdb\fB);\fR
|
856
|
+
.RS
|
857
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
858
|
+
.RE
|
859
|
+
.RS
|
860
|
+
If successful, the return value is true, else, it is false.
|
861
|
+
.RE
|
862
|
+
.RE
|
863
|
+
.PP
|
864
|
+
The function `tcfdbcopy' is used in order to copy the database file of a fixed\-length database object.
|
865
|
+
.PP
|
866
|
+
.RS
|
867
|
+
.br
|
868
|
+
\fBbool tcfdbcopy(TCFDB *\fIfdb\fB, const char *\fIpath\fB);\fR
|
869
|
+
.RS
|
870
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
871
|
+
.RE
|
872
|
+
.RS
|
873
|
+
`\fIpath\fR' specifies the path of the destination file. If it begins with `@', the trailing substring is executed as a command line.
|
874
|
+
.RE
|
875
|
+
.RS
|
876
|
+
If successful, the return value is true, else, it is false. False is returned if the executed command returns non\-zero code.
|
877
|
+
.RE
|
878
|
+
.RS
|
879
|
+
The database file is assured to be kept synchronized and not modified while the copying or executing operation is in progress. So, this function is useful to create a backup file of the database file.
|
880
|
+
.RE
|
881
|
+
.RE
|
882
|
+
.PP
|
883
|
+
The function `tcfdbtranbegin' is used in order to begin the transaction of a fixed\-length database object.
|
884
|
+
.PP
|
885
|
+
.RS
|
886
|
+
.br
|
887
|
+
\fBbool tcfdbtranbegin(TCFDB *\fIfdb\fB);\fR
|
888
|
+
.RS
|
889
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
890
|
+
.RE
|
891
|
+
.RS
|
892
|
+
If successful, the return value is true, else, it is false.
|
893
|
+
.RE
|
894
|
+
.RS
|
895
|
+
The database is locked by the thread while the transaction so that only one transaction can be activated with a database object at the same time. Thus, the serializable isolation level is assumed if every database operation is performed in the transaction. All updated regions are kept track of by write ahead logging while the transaction. If the database is closed during transaction, the transaction is aborted implicitly.
|
896
|
+
.RE
|
897
|
+
.RE
|
898
|
+
.PP
|
899
|
+
The function `tcfdbtrancommit' is used in order to commit the transaction of a fixed\-length database object.
|
900
|
+
.PP
|
901
|
+
.RS
|
902
|
+
.br
|
903
|
+
\fBbool tcfdbtrancommit(TCFDB *\fIfdb\fB);\fR
|
904
|
+
.RS
|
905
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
906
|
+
.RE
|
907
|
+
.RS
|
908
|
+
If successful, the return value is true, else, it is false.
|
909
|
+
.RE
|
910
|
+
.RS
|
911
|
+
Update in the transaction is fixed when it is committed successfully.
|
912
|
+
.RE
|
913
|
+
.RE
|
914
|
+
.PP
|
915
|
+
The function `tcfdbtranabort' is used in order to abort the transaction of a fixed\-length database object.
|
916
|
+
.PP
|
917
|
+
.RS
|
918
|
+
.br
|
919
|
+
\fBbool tcfdbtranabort(TCFDB *\fIfdb\fB);\fR
|
920
|
+
.RS
|
921
|
+
`\fIfdb\fR' specifies the fixed\-length database object connected as a writer.
|
922
|
+
.RE
|
923
|
+
.RS
|
924
|
+
If successful, the return value is true, else, it is false.
|
925
|
+
.RE
|
926
|
+
.RS
|
927
|
+
Update in the transaction is discarded when it is aborted. The state of the database is rollbacked to before transaction.
|
928
|
+
.RE
|
929
|
+
.RE
|
930
|
+
.PP
|
931
|
+
The function `tcfdbpath' is used in order to get the file path of a fixed\-length database object.
|
932
|
+
.PP
|
933
|
+
.RS
|
934
|
+
.br
|
935
|
+
\fBconst char *tcfdbpath(TCFDB *\fIfdb\fB);\fR
|
936
|
+
.RS
|
937
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
938
|
+
.RE
|
939
|
+
.RS
|
940
|
+
The return value is the path of the database file or `NULL' if the object does not connect to any database file.
|
941
|
+
.RE
|
942
|
+
.RE
|
943
|
+
.PP
|
944
|
+
The function `tcfdbrnum' is used in order to get the number of records of a fixed\-length database object.
|
945
|
+
.PP
|
946
|
+
.RS
|
947
|
+
.br
|
948
|
+
\fBuint64_t tcfdbrnum(TCFDB *\fIfdb\fB);\fR
|
949
|
+
.RS
|
950
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
951
|
+
.RE
|
952
|
+
.RS
|
953
|
+
The return value is the number of records or 0 if the object does not connect to any database file.
|
954
|
+
.RE
|
955
|
+
.RE
|
956
|
+
.PP
|
957
|
+
The function `tcfdbfsiz' is used in order to get the size of the database file of a fixed\-length database object.
|
958
|
+
.PP
|
959
|
+
.RS
|
960
|
+
.br
|
961
|
+
\fBuint64_t tcfdbfsiz(TCFDB *\fIfdb\fB);\fR
|
962
|
+
.RS
|
963
|
+
`\fIfdb\fR' specifies the fixed\-length database object.
|
964
|
+
.RE
|
965
|
+
.RS
|
966
|
+
The return value is the size of the database file or 0 if the object does not connect to any database file.
|
967
|
+
.RE
|
968
|
+
.RE
|
969
|
+
|
970
|
+
.SH SEE ALSO
|
971
|
+
.PP
|
972
|
+
.BR tcftest (1),
|
973
|
+
.BR tcfmttest (1),
|
974
|
+
.BR tcfmgr (1),
|
975
|
+
.BR tokyocabinet (3)
|