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 @@
|
|
1
|
+
.so man3/tcutil.3
|
@@ -0,0 +1 @@
|
|
1
|
+
.so man3/tcutil.3
|
@@ -0,0 +1 @@
|
|
1
|
+
.so man3/tcutil.3
|
@@ -0,0 +1 @@
|
|
1
|
+
.so man3/tcutil.3
|
@@ -0,0 +1,1309 @@
|
|
1
|
+
.TH "TCRDB" 3 "2009-08-31" "Man Page" "Tokyo Tyrant"
|
2
|
+
|
3
|
+
.SH NAME
|
4
|
+
tcrdb \- the remote database API
|
5
|
+
|
6
|
+
.SH DESCRIPTION
|
7
|
+
.PP
|
8
|
+
Remote database is a set of interfaces to use an abstract database of Tokyo Cabinet, mediated by a server of Tokyo Tyrant.
|
9
|
+
.PP
|
10
|
+
.PP
|
11
|
+
To use the remote database API, include `\fBtcrdb.h\fR' and related standard header files. Usually, write the following description near the front of a source file.
|
12
|
+
.PP
|
13
|
+
.RS
|
14
|
+
.br
|
15
|
+
\fB#include <tcrdb.h>\fR
|
16
|
+
.br
|
17
|
+
\fB#include <stdlib.h>\fR
|
18
|
+
.br
|
19
|
+
\fB#include <stdbool.h>\fR
|
20
|
+
.br
|
21
|
+
\fB#include <stdint.h>\fR
|
22
|
+
.RE
|
23
|
+
.PP
|
24
|
+
Objects whose type is pointer to `\fBTCRDB\fR' are used to handle remote databases. a remote database object is created with the function `\fBtcrdbnew\fR' and is deleted with the function `\fBtcrdbdel\fR'. To avoid memory leak, it is important to delete every object when it is no longer in use.
|
25
|
+
.PP
|
26
|
+
Before operations to store or retrieve records, it is necessary to connect the remote database object to the server. The function `\fBtcrdbopen\fR' is used to open a database connection and the function `\fBtcrdbclose\fR' is used to close the connection.
|
27
|
+
|
28
|
+
.SH DESCRIPTION
|
29
|
+
.PP
|
30
|
+
The function `tcrdberrmsg' is used in order to get the message string corresponding to an error code.
|
31
|
+
.PP
|
32
|
+
.RS
|
33
|
+
.br
|
34
|
+
\fBconst char *tcrdberrmsg(int \fIecode\fB);\fR
|
35
|
+
.RS
|
36
|
+
`\fIecode\fR' specifies the error code.
|
37
|
+
.RE
|
38
|
+
.RS
|
39
|
+
The return value is the message string of the error code.
|
40
|
+
.RE
|
41
|
+
.RE
|
42
|
+
.PP
|
43
|
+
The function `tcrdbnew' is used in order to create a remote database object.
|
44
|
+
.PP
|
45
|
+
.RS
|
46
|
+
.br
|
47
|
+
\fBTCRDB *tcrdbnew(void);\fR
|
48
|
+
.RS
|
49
|
+
The return value is the new remote database object.
|
50
|
+
.RE
|
51
|
+
.RE
|
52
|
+
.PP
|
53
|
+
The function `tcrdbdel' is used in order to delete a remote database object.
|
54
|
+
.PP
|
55
|
+
.RS
|
56
|
+
.br
|
57
|
+
\fBvoid tcrdbdel(TCRDB *\fIrdb\fB);\fR
|
58
|
+
.RS
|
59
|
+
`\fIrdb\fR' specifies the remote database object.
|
60
|
+
.RE
|
61
|
+
.RE
|
62
|
+
.PP
|
63
|
+
The function `tcrdbecode' is used in order to get the last happened error code of a remote database object.
|
64
|
+
.PP
|
65
|
+
.RS
|
66
|
+
.br
|
67
|
+
\fBint tcrdbecode(TCRDB *\fIrdb\fB);\fR
|
68
|
+
.RS
|
69
|
+
`\fIrdb\fR' specifies the remote database object.
|
70
|
+
.RE
|
71
|
+
.RS
|
72
|
+
The return value is the last happened error code.
|
73
|
+
.RE
|
74
|
+
.RS
|
75
|
+
The following error code is defined: `TTESUCCESS' for success, `TTEINVALID' for invalid operation, `TTENOHOST' for host not found, `TTEREFUSED' for connection refused, `TTESEND' for send error, `TTERECV' for recv error, `TTEKEEP' for existing record, `TTENOREC' for no record found, `TTEMISC' for miscellaneous error.
|
76
|
+
.RE
|
77
|
+
.RE
|
78
|
+
.PP
|
79
|
+
The function `tcrdbtune' is used in order to set the tuning parameters of a hash database object.
|
80
|
+
.PP
|
81
|
+
.RS
|
82
|
+
.br
|
83
|
+
\fBbool tcrdbtune(TCRDB *\fIrdb\fB, double \fItimeout\fB, int \fIopts\fB);\fR
|
84
|
+
.RS
|
85
|
+
`\fIrdb\fR' specifies the remote database object.
|
86
|
+
.RE
|
87
|
+
.RS
|
88
|
+
`\fItimeout\fR' specifies the timeout of each query in seconds. If it is not more than 0, the timeout is not specified.
|
89
|
+
.RE
|
90
|
+
.RS
|
91
|
+
`\fIopts\fR' specifies options by bitwise\-or: `RDBTRECON' specifies that the connection is recovered automatically when it is disconnected.
|
92
|
+
.RE
|
93
|
+
.RS
|
94
|
+
If successful, the return value is true, else, it is false.
|
95
|
+
.RE
|
96
|
+
.RS
|
97
|
+
Note that the tuning parameters should be set before the database is opened.
|
98
|
+
.RE
|
99
|
+
.RE
|
100
|
+
.PP
|
101
|
+
The function `tcrdbopen' is used in order to open a remote database.
|
102
|
+
.PP
|
103
|
+
.RS
|
104
|
+
.br
|
105
|
+
\fBbool tcrdbopen(TCRDB *\fIrdb\fB, const char *\fIhost\fB, int \fIport\fB);\fR
|
106
|
+
.RS
|
107
|
+
`\fIrdb\fR' specifies the remote database object.
|
108
|
+
.RE
|
109
|
+
.RS
|
110
|
+
`\fIhost\fR' specifies the name or the address of the server.
|
111
|
+
.RE
|
112
|
+
.RS
|
113
|
+
`\fIport\fR' specifies the port number. If it is not more than 0, UNIX domain socket is used and the path of the socket file is specified by the host parameter.
|
114
|
+
.RE
|
115
|
+
.RS
|
116
|
+
If successful, the return value is true, else, it is false.
|
117
|
+
.RE
|
118
|
+
.RE
|
119
|
+
.PP
|
120
|
+
The function `tcrdbopen2' is used in order to open a remote database with a simple server expression.
|
121
|
+
.PP
|
122
|
+
.RS
|
123
|
+
.br
|
124
|
+
\fBbool tcrdbopen2(TCRDB *\fIrdb\fB, const char *\fIexpr\fB);\fR
|
125
|
+
.RS
|
126
|
+
`\fIrdb\fR' specifies the remote database object.
|
127
|
+
.RE
|
128
|
+
.RS
|
129
|
+
`\fIexpr\fR' specifies the simple server expression. It is composed of two substrings separated by ":". The former field specifies the name or the address of the server. The latter field specifies the port number. If the latter field is omitted, the default port number is specified.
|
130
|
+
.RE
|
131
|
+
.RS
|
132
|
+
If successful, the return value is true, else, it is false.
|
133
|
+
.RE
|
134
|
+
.RE
|
135
|
+
.PP
|
136
|
+
The function `tcrdbclose' is used in order to close a remote database object.
|
137
|
+
.PP
|
138
|
+
.RS
|
139
|
+
.br
|
140
|
+
\fBbool tcrdbclose(TCRDB *\fIrdb\fB);\fR
|
141
|
+
.RS
|
142
|
+
`\fIrdb\fR' specifies the remote database object.
|
143
|
+
.RE
|
144
|
+
.RS
|
145
|
+
If successful, the return value is true, else, it is false.
|
146
|
+
.RE
|
147
|
+
.RE
|
148
|
+
.PP
|
149
|
+
The function `tcrdbput' is used in order to store a record into a remote database object.
|
150
|
+
.PP
|
151
|
+
.RS
|
152
|
+
.br
|
153
|
+
\fBbool tcrdbput(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
154
|
+
.RS
|
155
|
+
`\fIrdb\fR' specifies the remote database object.
|
156
|
+
.RE
|
157
|
+
.RS
|
158
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
159
|
+
.RE
|
160
|
+
.RS
|
161
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
162
|
+
.RE
|
163
|
+
.RS
|
164
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
165
|
+
.RE
|
166
|
+
.RS
|
167
|
+
`\fIvsiz\fR' specifies the size of the region of the value.
|
168
|
+
.RE
|
169
|
+
.RS
|
170
|
+
If successful, the return value is true, else, it is false.
|
171
|
+
.RE
|
172
|
+
.RS
|
173
|
+
If a record with the same key exists in the database, it is overwritten.
|
174
|
+
.RE
|
175
|
+
.RE
|
176
|
+
.PP
|
177
|
+
The function `tcrdbput2' is used in order to store a string record into a remote object.
|
178
|
+
.PP
|
179
|
+
.RS
|
180
|
+
.br
|
181
|
+
\fBbool tcrdbput2(TCRDB *\fIrdb\fB, const char *\fIkstr\fB, const char *\fIvstr\fB);\fR
|
182
|
+
.RS
|
183
|
+
`\fIrdb\fR' specifies the remote database object.
|
184
|
+
.RE
|
185
|
+
.RS
|
186
|
+
`\fIkstr\fR' specifies the string of the key.
|
187
|
+
.RE
|
188
|
+
.RS
|
189
|
+
`\fIvstr\fR' specifies the string of the value.
|
190
|
+
.RE
|
191
|
+
.RS
|
192
|
+
If successful, the return value is true, else, it is false.
|
193
|
+
.RE
|
194
|
+
.RS
|
195
|
+
If a record with the same key exists in the database, it is overwritten.
|
196
|
+
.RE
|
197
|
+
.RE
|
198
|
+
.PP
|
199
|
+
The function `tcrdbputkeep' is used in order to store a new record into a remote database object.
|
200
|
+
.PP
|
201
|
+
.RS
|
202
|
+
.br
|
203
|
+
\fBbool tcrdbputkeep(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
204
|
+
.RS
|
205
|
+
`\fIrdb\fR' specifies the remote database object.
|
206
|
+
.RE
|
207
|
+
.RS
|
208
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
209
|
+
.RE
|
210
|
+
.RS
|
211
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
212
|
+
.RE
|
213
|
+
.RS
|
214
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
215
|
+
.RE
|
216
|
+
.RS
|
217
|
+
`\fIvsiz\fR' specifies the size of the region of the value.
|
218
|
+
.RE
|
219
|
+
.RS
|
220
|
+
If successful, the return value is true, else, it is false.
|
221
|
+
.RE
|
222
|
+
.RS
|
223
|
+
If a record with the same key exists in the database, this function has no effect.
|
224
|
+
.RE
|
225
|
+
.RE
|
226
|
+
.PP
|
227
|
+
The function `tcrdbputkeep2' is used in order to store a new string record into a remote database object.
|
228
|
+
.PP
|
229
|
+
.RS
|
230
|
+
.br
|
231
|
+
\fBbool tcrdbputkeep2(TCRDB *\fIrdb\fB, const char *\fIkstr\fB, const char *\fIvstr\fB);\fR
|
232
|
+
.RS
|
233
|
+
`\fIrdb\fR' specifies the remote database object.
|
234
|
+
.RE
|
235
|
+
.RS
|
236
|
+
`\fIkstr\fR' specifies the string of the key.
|
237
|
+
.RE
|
238
|
+
.RS
|
239
|
+
`\fIvstr\fR' specifies the string of the value.
|
240
|
+
.RE
|
241
|
+
.RS
|
242
|
+
If successful, the return value is true, else, it is false.
|
243
|
+
.RE
|
244
|
+
.RS
|
245
|
+
If a record with the same key exists in the database, this function has no effect.
|
246
|
+
.RE
|
247
|
+
.RE
|
248
|
+
.PP
|
249
|
+
The function `tcrdbputcat' is used in order to concatenate a value at the end of the existing record in a remote database object.
|
250
|
+
.PP
|
251
|
+
.RS
|
252
|
+
.br
|
253
|
+
\fBbool tcrdbputcat(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
254
|
+
.RS
|
255
|
+
`\fIrdb\fR' specifies the remote database object.
|
256
|
+
.RE
|
257
|
+
.RS
|
258
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
259
|
+
.RE
|
260
|
+
.RS
|
261
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
262
|
+
.RE
|
263
|
+
.RS
|
264
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
265
|
+
.RE
|
266
|
+
.RS
|
267
|
+
`\fIvsiz\fR' specifies the size of the region of the value.
|
268
|
+
.RE
|
269
|
+
.RS
|
270
|
+
If successful, the return value is true, else, it is false.
|
271
|
+
.RE
|
272
|
+
.RS
|
273
|
+
If there is no corresponding record, a new record is created.
|
274
|
+
.RE
|
275
|
+
.RE
|
276
|
+
.PP
|
277
|
+
The function `tcrdbputcat2' is used in order to concatenate a string value at the end of the existing record in a remote database object.
|
278
|
+
.PP
|
279
|
+
.RS
|
280
|
+
.br
|
281
|
+
\fBbool tcrdbputcat2(TCRDB *\fIrdb\fB, const char *\fIkstr\fB, const char *\fIvstr\fB);\fR
|
282
|
+
.RS
|
283
|
+
`\fIrdb\fR' specifies the remote database object.
|
284
|
+
.RE
|
285
|
+
.RS
|
286
|
+
`\fIkstr\fR' specifies the string of the key.
|
287
|
+
.RE
|
288
|
+
.RS
|
289
|
+
`\fIvstr\fR' specifies the string of the value.
|
290
|
+
.RE
|
291
|
+
.RS
|
292
|
+
If successful, the return value is true, else, it is false.
|
293
|
+
.RE
|
294
|
+
.RS
|
295
|
+
If there is no corresponding record, a new record is created.
|
296
|
+
.RE
|
297
|
+
.RE
|
298
|
+
.PP
|
299
|
+
The function `tcrdbputshl' is used in order to concatenate a value at the end of the existing record and shift it to the left.
|
300
|
+
.PP
|
301
|
+
.RS
|
302
|
+
.br
|
303
|
+
\fBbool tcrdbputshl(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB, int \fIwidth\fB);\fR
|
304
|
+
.RS
|
305
|
+
`\fIrdb\fR' specifies the remote database object.
|
306
|
+
.RE
|
307
|
+
.RS
|
308
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
309
|
+
.RE
|
310
|
+
.RS
|
311
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
312
|
+
.RE
|
313
|
+
.RS
|
314
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
315
|
+
.RE
|
316
|
+
.RS
|
317
|
+
`\fIvsiz\fR' specifies the size of the region of the value.
|
318
|
+
.RE
|
319
|
+
.RS
|
320
|
+
`\fIwidth\fR' specifies the width of the record.
|
321
|
+
.RE
|
322
|
+
.RS
|
323
|
+
If successful, the return value is true, else, it is false.
|
324
|
+
.RE
|
325
|
+
.RS
|
326
|
+
If there is no corresponding record, a new record is created.
|
327
|
+
.RE
|
328
|
+
.RE
|
329
|
+
.PP
|
330
|
+
The function `tcrdbputshl2' is used in order to concatenate a string value at the end of the existing record and shift it to the left.
|
331
|
+
.PP
|
332
|
+
.RS
|
333
|
+
.br
|
334
|
+
\fBbool tcrdbputshl2(TCRDB *\fIrdb\fB, const char *\fIkstr\fB, const char *\fIvstr\fB, int \fIwidth\fB);\fR
|
335
|
+
.RS
|
336
|
+
`\fIrdb\fR' specifies the remote database object.
|
337
|
+
.RE
|
338
|
+
.RS
|
339
|
+
`\fIkstr\fR' specifies the string of the key.
|
340
|
+
.RE
|
341
|
+
.RS
|
342
|
+
`\fIvstr\fR' specifies the string of the value.
|
343
|
+
.RE
|
344
|
+
.RS
|
345
|
+
`\fIwidth\fR' specifies the width of the record.
|
346
|
+
.RE
|
347
|
+
.RS
|
348
|
+
If successful, the return value is true, else, it is false.
|
349
|
+
.RE
|
350
|
+
.RS
|
351
|
+
If there is no corresponding record, a new record is created.
|
352
|
+
.RE
|
353
|
+
.RE
|
354
|
+
.PP
|
355
|
+
The function `tcrdbputnr' is used in order to store a record into a remote database object without response from the server.
|
356
|
+
.PP
|
357
|
+
.RS
|
358
|
+
.br
|
359
|
+
\fBbool tcrdbputnr(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR
|
360
|
+
.RS
|
361
|
+
`\fIrdb\fR' specifies the remote database object.
|
362
|
+
.RE
|
363
|
+
.RS
|
364
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
365
|
+
.RE
|
366
|
+
.RS
|
367
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
368
|
+
.RE
|
369
|
+
.RS
|
370
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
371
|
+
.RE
|
372
|
+
.RS
|
373
|
+
`\fIvsiz\fR' specifies the size of the region of the value.
|
374
|
+
.RE
|
375
|
+
.RS
|
376
|
+
If successful, the return value is true, else, it is false.
|
377
|
+
.RE
|
378
|
+
.RS
|
379
|
+
If a record with the same key exists in the database, it is overwritten.
|
380
|
+
.RE
|
381
|
+
.RE
|
382
|
+
.PP
|
383
|
+
The function `tcrdbputnr2' is used in order to store a string record into a remote object without response from the server.
|
384
|
+
.PP
|
385
|
+
.RS
|
386
|
+
.br
|
387
|
+
\fBbool tcrdbputnr2(TCRDB *\fIrdb\fB, const char *\fIkstr\fB, const char *\fIvstr\fB);\fR
|
388
|
+
.RS
|
389
|
+
`\fIrdb\fR' specifies the remote database object.
|
390
|
+
.RE
|
391
|
+
.RS
|
392
|
+
`\fIkstr\fR' specifies the string of the key.
|
393
|
+
.RE
|
394
|
+
.RS
|
395
|
+
`\fIvstr\fR' specifies the string of the value.
|
396
|
+
.RE
|
397
|
+
.RS
|
398
|
+
If successful, the return value is true, else, it is false.
|
399
|
+
.RE
|
400
|
+
.RS
|
401
|
+
If a record with the same key exists in the database, it is overwritten.
|
402
|
+
.RE
|
403
|
+
.RE
|
404
|
+
.PP
|
405
|
+
The function `tcrdbout' is used in order to remove a record of a remote database object.
|
406
|
+
.PP
|
407
|
+
.RS
|
408
|
+
.br
|
409
|
+
\fBbool tcrdbout(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB);\fR
|
410
|
+
.RS
|
411
|
+
`\fIrdb\fR' specifies the remote database object.
|
412
|
+
.RE
|
413
|
+
.RS
|
414
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
415
|
+
.RE
|
416
|
+
.RS
|
417
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
418
|
+
.RE
|
419
|
+
.RS
|
420
|
+
If successful, the return value is true, else, it is false.
|
421
|
+
.RE
|
422
|
+
.RE
|
423
|
+
.PP
|
424
|
+
The function `tcrdbout2' is used in order to remove a string record of a remote database object.
|
425
|
+
.PP
|
426
|
+
.RS
|
427
|
+
.br
|
428
|
+
\fBbool tcrdbout2(TCRDB *\fIrdb\fB, const char *\fIkstr\fB);\fR
|
429
|
+
.RS
|
430
|
+
`\fIrdb\fR' specifies the remote database object.
|
431
|
+
.RE
|
432
|
+
.RS
|
433
|
+
`\fIkstr\fR' specifies the string of the key.
|
434
|
+
.RE
|
435
|
+
.RS
|
436
|
+
If successful, the return value is true, else, it is false.
|
437
|
+
.RE
|
438
|
+
.RE
|
439
|
+
.PP
|
440
|
+
The function `tcrdbget' is used in order to retrieve a record in a remote database object.
|
441
|
+
.PP
|
442
|
+
.RS
|
443
|
+
.br
|
444
|
+
\fBvoid *tcrdbget(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, int *\fIsp\fB);\fR
|
445
|
+
.RS
|
446
|
+
`\fIrdb\fR' specifies the remote database object.
|
447
|
+
.RE
|
448
|
+
.RS
|
449
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
450
|
+
.RE
|
451
|
+
.RS
|
452
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
453
|
+
.RE
|
454
|
+
.RS
|
455
|
+
`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned.
|
456
|
+
.RE
|
457
|
+
.RS
|
458
|
+
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.
|
459
|
+
.RE
|
460
|
+
.RS
|
461
|
+
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.
|
462
|
+
.RE
|
463
|
+
.RE
|
464
|
+
.PP
|
465
|
+
The function `tcrdbget2' is used in order to retrieve a string record in a remote database object.
|
466
|
+
.PP
|
467
|
+
.RS
|
468
|
+
.br
|
469
|
+
\fBchar *tcrdbget2(TCRDB *\fIrdb\fB, const char *\fIkstr\fB);\fR
|
470
|
+
.RS
|
471
|
+
`\fIrdb\fR' specifies the remote database object.
|
472
|
+
.RE
|
473
|
+
.RS
|
474
|
+
`\fIkstr\fR' specifies the string of the key.
|
475
|
+
.RE
|
476
|
+
.RS
|
477
|
+
If successful, the return value is the string of the value of the corresponding record. `NULL' is returned if no record corresponds.
|
478
|
+
.RE
|
479
|
+
.RS
|
480
|
+
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.
|
481
|
+
.RE
|
482
|
+
.RE
|
483
|
+
.PP
|
484
|
+
The function `tcrdbget3' is used in order to retrieve records in a remote database object.
|
485
|
+
.PP
|
486
|
+
.RS
|
487
|
+
.br
|
488
|
+
\fBbool tcrdbget3(TCRDB *\fIrdb\fB, TCMAP *\fIrecs\fB);\fR
|
489
|
+
.RS
|
490
|
+
`\fIrdb\fR' specifies the remote database object.
|
491
|
+
.RE
|
492
|
+
.RS
|
493
|
+
`\fIrecs\fR' specifies a map object containing the retrieval keys. As a result of this function, keys existing in the database have the corresponding values and keys not existing in the database are removed.
|
494
|
+
.RE
|
495
|
+
.RS
|
496
|
+
If successful, the return value is true, else, it is false.
|
497
|
+
.RE
|
498
|
+
.RE
|
499
|
+
.PP
|
500
|
+
The function `tcrdbvsiz' is used in order to get the size of the value of a record in a remote database object.
|
501
|
+
.PP
|
502
|
+
.RS
|
503
|
+
.br
|
504
|
+
\fBint tcrdbvsiz(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB);\fR
|
505
|
+
.RS
|
506
|
+
`\fIrdb\fR' specifies the remote database object.
|
507
|
+
.RE
|
508
|
+
.RS
|
509
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
510
|
+
.RE
|
511
|
+
.RS
|
512
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
513
|
+
.RE
|
514
|
+
.RS
|
515
|
+
If successful, the return value is the size of the value of the corresponding record, else, it is \-1.
|
516
|
+
.RE
|
517
|
+
.RE
|
518
|
+
.PP
|
519
|
+
The function `tcrdbvsiz2' is used in order to get the size of the value of a string record in a remote database object.
|
520
|
+
.PP
|
521
|
+
.RS
|
522
|
+
.br
|
523
|
+
\fBint tcrdbvsiz2(TCRDB *\fIrdb\fB, const char *\fIkstr\fB);\fR
|
524
|
+
.RS
|
525
|
+
`\fIrdb\fR' specifies the remote database object.
|
526
|
+
.RE
|
527
|
+
.RS
|
528
|
+
`\fIkstr\fR' specifies the string of the key.
|
529
|
+
.RE
|
530
|
+
.RS
|
531
|
+
If successful, the return value is the size of the value of the corresponding record, else, it is \-1.
|
532
|
+
.RE
|
533
|
+
.RE
|
534
|
+
.PP
|
535
|
+
The function `tcrdbiterinit' is used in order to initialize the iterator of a remote database object.
|
536
|
+
.PP
|
537
|
+
.RS
|
538
|
+
.br
|
539
|
+
\fBbool tcrdbiterinit(TCRDB *\fIrdb\fB);\fR
|
540
|
+
.RS
|
541
|
+
`\fIrdb\fR' specifies the remote database object.
|
542
|
+
.RE
|
543
|
+
.RS
|
544
|
+
If successful, the return value is true, else, it is false.
|
545
|
+
.RE
|
546
|
+
.RS
|
547
|
+
The iterator is used in order to access the key of every record stored in a database.
|
548
|
+
.RE
|
549
|
+
.RE
|
550
|
+
.PP
|
551
|
+
The function `tcrdbiternext' is used in order to get the next key of the iterator of a remote database object.
|
552
|
+
.PP
|
553
|
+
.RS
|
554
|
+
.br
|
555
|
+
\fBvoid *tcrdbiternext(TCRDB *\fIrdb\fB, int *\fIsp\fB);\fR
|
556
|
+
.RS
|
557
|
+
`\fIrdb\fR' specifies the remote database object.
|
558
|
+
.RE
|
559
|
+
.RS
|
560
|
+
`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned.
|
561
|
+
.RE
|
562
|
+
.RS
|
563
|
+
If successful, the return value is the pointer to the region of the next key, else, it is `NULL'. `NULL' is returned when no record is to be get out of the iterator.
|
564
|
+
.RE
|
565
|
+
.RS
|
566
|
+
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. The iterator can be updated by multiple connections and then it is not assured that every record is traversed.
|
567
|
+
.RE
|
568
|
+
.RE
|
569
|
+
.PP
|
570
|
+
The function `tcrdbiternext2' is used in order to get the next key string of the iterator of a remote database object.
|
571
|
+
.PP
|
572
|
+
.RS
|
573
|
+
.br
|
574
|
+
\fBchar *tcrdbiternext2(TCRDB *\fIrdb\fB);\fR
|
575
|
+
.RS
|
576
|
+
`\fIrdb\fR' specifies the remote database object.
|
577
|
+
.RE
|
578
|
+
.RS
|
579
|
+
If successful, the return value is the string of the next key, else, it is `NULL'. `NULL' is returned when no record is to be get out of the iterator.
|
580
|
+
.RE
|
581
|
+
.RS
|
582
|
+
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. The iterator can be updated by multiple connections and then it is not assured that every record is traversed.
|
583
|
+
.RE
|
584
|
+
.RE
|
585
|
+
.PP
|
586
|
+
The function `tcrdbfwmkeys' is used in order to get forward matching keys in a remote database object.
|
587
|
+
.PP
|
588
|
+
.RS
|
589
|
+
.br
|
590
|
+
\fBTCLIST *tcrdbfwmkeys(TCRDB *\fIrdb\fB, const void *\fIpbuf\fB, int \fIpsiz\fB, int \fImax\fB);\fR
|
591
|
+
.RS
|
592
|
+
`\fIrdb\fR' specifies the remote database object.
|
593
|
+
.RE
|
594
|
+
.RS
|
595
|
+
`\fIpbuf\fR' specifies the pointer to the region of the prefix.
|
596
|
+
.RE
|
597
|
+
.RS
|
598
|
+
`\fIpsiz\fR' specifies the size of the region of the prefix.
|
599
|
+
.RE
|
600
|
+
.RS
|
601
|
+
`\fImax\fR' specifies the maximum number of keys to be fetched. If it is negative, no limit is specified.
|
602
|
+
.RE
|
603
|
+
.RS
|
604
|
+
The return value is a list object of the corresponding keys. This function does never fail. It returns an empty list even if no key corresponds.
|
605
|
+
.RE
|
606
|
+
.RS
|
607
|
+
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.
|
608
|
+
.RE
|
609
|
+
.RE
|
610
|
+
.PP
|
611
|
+
The function `tcrdbfwmkeys2' is used in order to get forward matching string keys in a remote database object.
|
612
|
+
.PP
|
613
|
+
.RS
|
614
|
+
.br
|
615
|
+
\fBTCLIST *tcrdbfwmkeys2(TCRDB *\fIrdb\fB, const char *\fIpstr\fB, int \fImax\fB);\fR
|
616
|
+
.RS
|
617
|
+
`\fIrdb\fR' specifies the remote database object.
|
618
|
+
.RE
|
619
|
+
.RS
|
620
|
+
`\fIpstr\fR' specifies the string of the prefix.
|
621
|
+
.RE
|
622
|
+
.RS
|
623
|
+
`\fImax\fR' specifies the maximum number of keys to be fetched. If it is negative, no limit is specified.
|
624
|
+
.RE
|
625
|
+
.RS
|
626
|
+
The return value is a list object of the corresponding keys. This function does never fail. It returns an empty list even if no key corresponds.
|
627
|
+
.RE
|
628
|
+
.RS
|
629
|
+
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.
|
630
|
+
.RE
|
631
|
+
.RE
|
632
|
+
.PP
|
633
|
+
The function `tcrdbaddint' is used in order to add an integer to a record in a remote database object.
|
634
|
+
.PP
|
635
|
+
.RS
|
636
|
+
.br
|
637
|
+
\fBint tcrdbaddint(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, int \fInum\fB);\fR
|
638
|
+
.RS
|
639
|
+
`\fIrdb\fR' specifies the remote database object.
|
640
|
+
.RE
|
641
|
+
.RS
|
642
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
643
|
+
.RE
|
644
|
+
.RS
|
645
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
646
|
+
.RE
|
647
|
+
.RS
|
648
|
+
`\fInum\fR' specifies the additional value.
|
649
|
+
.RE
|
650
|
+
.RS
|
651
|
+
If successful, the return value is the summation value, else, it is `INT_MIN'.
|
652
|
+
.RE
|
653
|
+
.RS
|
654
|
+
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.
|
655
|
+
.RE
|
656
|
+
.RE
|
657
|
+
.PP
|
658
|
+
The function `tcrdbadddouble' is used in order to add a real number to a record in a remote database object.
|
659
|
+
.PP
|
660
|
+
.RS
|
661
|
+
.br
|
662
|
+
\fBdouble tcrdbadddouble(TCRDB *\fIrdb\fB, const void *\fIkbuf\fB, int \fIksiz\fB, double \fInum\fB);\fR
|
663
|
+
.RS
|
664
|
+
`\fIrdb\fR' specifies the remote database object.
|
665
|
+
.RE
|
666
|
+
.RS
|
667
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
668
|
+
.RE
|
669
|
+
.RS
|
670
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
671
|
+
.RE
|
672
|
+
.RS
|
673
|
+
`\fInum\fR' specifies the additional value.
|
674
|
+
.RE
|
675
|
+
.RS
|
676
|
+
If successful, the return value is the summation value, else, it is Not\-a\-Number.
|
677
|
+
.RE
|
678
|
+
.RS
|
679
|
+
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.
|
680
|
+
.RE
|
681
|
+
.RE
|
682
|
+
.PP
|
683
|
+
The function `tcrdbext' is used in order to call a function of the script language extension.
|
684
|
+
.PP
|
685
|
+
.RS
|
686
|
+
.br
|
687
|
+
\fBvoid *tcrdbext(TCRDB *\fIrdb\fB, const char *\fIname\fB, int \fIopts\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB, int *\fIsp\fB);\fR
|
688
|
+
.RS
|
689
|
+
`\fIrdb\fR' specifies the remote database object.
|
690
|
+
.RE
|
691
|
+
.RS
|
692
|
+
`\fIname\fR' specifies the function name.
|
693
|
+
.RE
|
694
|
+
.RS
|
695
|
+
`\fIopts\fR' specifies options by bitwise\-or: `RDBXOLCKREC' for record locking, `RDBXOLCKGLB' for global locking.
|
696
|
+
.RE
|
697
|
+
.RS
|
698
|
+
`\fIkbuf\fR' specifies the pointer to the region of the key.
|
699
|
+
.RE
|
700
|
+
.RS
|
701
|
+
`\fIksiz\fR' specifies the size of the region of the key.
|
702
|
+
.RE
|
703
|
+
.RS
|
704
|
+
`\fIvbuf\fR' specifies the pointer to the region of the value.
|
705
|
+
.RE
|
706
|
+
.RS
|
707
|
+
`\fIvsiz\fR' specifies the size of the region of the value.
|
708
|
+
.RE
|
709
|
+
.RS
|
710
|
+
`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned.
|
711
|
+
.RE
|
712
|
+
.RS
|
713
|
+
If successful, the return value is the pointer to the region of the value of the response. `NULL' is returned on failure.
|
714
|
+
.RE
|
715
|
+
.RS
|
716
|
+
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.
|
717
|
+
.RE
|
718
|
+
.RE
|
719
|
+
.PP
|
720
|
+
The function `tcrdbext2' is used in order to call a function of the script language extension with string parameters.
|
721
|
+
.PP
|
722
|
+
.RS
|
723
|
+
.br
|
724
|
+
\fBchar *tcrdbext2(TCRDB *\fIrdb\fB, const char *\fIname\fB, int \fIopts\fB, const char *\fIkstr\fB, const char *\fIvstr\fB);\fR
|
725
|
+
.RS
|
726
|
+
`\fIrdb\fR' specifies the remote database object.
|
727
|
+
.RE
|
728
|
+
.RS
|
729
|
+
`\fIname\fR' specifies the function name.
|
730
|
+
.RE
|
731
|
+
.RS
|
732
|
+
`\fIopts\fR' specifies options by bitwise\-or: `RDBXOLCKREC' for record locking, `RDBXOLCKGLB' for global locking.
|
733
|
+
.RE
|
734
|
+
.RS
|
735
|
+
`\fIkstr\fR' specifies the string of the key.
|
736
|
+
.RE
|
737
|
+
.RS
|
738
|
+
`\fIvstr\fR' specifies the string of the value.
|
739
|
+
.RE
|
740
|
+
.RS
|
741
|
+
If successful, the return value is the string of the value of the response. `NULL' is returned on failure.
|
742
|
+
.RE
|
743
|
+
.RS
|
744
|
+
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.
|
745
|
+
.RE
|
746
|
+
.RE
|
747
|
+
.PP
|
748
|
+
The function `tcrdbsync' is used in order to synchronize updated contents of a remote database object with the file and the device.
|
749
|
+
.PP
|
750
|
+
.RS
|
751
|
+
.br
|
752
|
+
\fBbool tcrdbsync(TCRDB *\fIrdb\fB);\fR
|
753
|
+
.RS
|
754
|
+
`\fIrdb\fR' specifies the remote database object.
|
755
|
+
.RE
|
756
|
+
.RS
|
757
|
+
If successful, the return value is true, else, it is false.
|
758
|
+
.RE
|
759
|
+
.RE
|
760
|
+
.PP
|
761
|
+
The function `tcrdboptimize' is used in order to optimize the storage of a remove database object.
|
762
|
+
.PP
|
763
|
+
.RS
|
764
|
+
.br
|
765
|
+
\fBbool tcrdboptimize(TCRDB *\fIrdb\fB, const char *\fIparams\fB);\fR
|
766
|
+
.RS
|
767
|
+
`\fIrdb\fR' specifies the remote database object.
|
768
|
+
.RE
|
769
|
+
.RS
|
770
|
+
`\fIparams\fR' specifies the string of the tuning parameters. If it is `NULL', it is not used.
|
771
|
+
.RE
|
772
|
+
.RS
|
773
|
+
If successful, the return value is true, else, it is false.
|
774
|
+
.RE
|
775
|
+
.RE
|
776
|
+
.PP
|
777
|
+
The function `tcrdbvanish' is used in order to remove all records of a remote database object.
|
778
|
+
.PP
|
779
|
+
.RS
|
780
|
+
.br
|
781
|
+
\fBbool tcrdbvanish(TCRDB *\fIrdb\fB);\fR
|
782
|
+
.RS
|
783
|
+
`\fIrdb\fR' specifies the remote database object.
|
784
|
+
.RE
|
785
|
+
.RS
|
786
|
+
If successful, the return value is true, else, it is false.
|
787
|
+
.RE
|
788
|
+
.RE
|
789
|
+
.PP
|
790
|
+
The function `tcrdbcopy' is used in order to copy the database file of a remote database object.
|
791
|
+
.PP
|
792
|
+
.RS
|
793
|
+
.br
|
794
|
+
\fBbool tcrdbcopy(TCRDB *\fIrdb\fB, const char *\fIpath\fB);\fR
|
795
|
+
.RS
|
796
|
+
`\fIrdb\fR' specifies the remote database object.
|
797
|
+
.RE
|
798
|
+
.RS
|
799
|
+
`\fIpath\fR' specifies the path of the destination file. If it begins with `@', the trailing substring is executed as a command line.
|
800
|
+
.RE
|
801
|
+
.RS
|
802
|
+
If successful, the return value is true, else, it is false. False is returned if the executed command returns non\-zero code.
|
803
|
+
.RE
|
804
|
+
.RS
|
805
|
+
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.
|
806
|
+
.RE
|
807
|
+
.RE
|
808
|
+
.PP
|
809
|
+
The function `tcrdbrestore' is used in order to restore the database file of a remote database object from the update log.
|
810
|
+
.PP
|
811
|
+
.RS
|
812
|
+
.br
|
813
|
+
\fBbool tcrdbrestore(TCRDB *\fIrdb\fB, const char *\fIpath\fB, uint64_t \fIts\fB, int \fIopts\fB);\fR
|
814
|
+
.RS
|
815
|
+
`\fIrdb\fR' specifies the remote database object.
|
816
|
+
.RE
|
817
|
+
.RS
|
818
|
+
`\fIpath\fR' specifies the path of the update log directory.
|
819
|
+
.RE
|
820
|
+
.RS
|
821
|
+
`\fIopts\fR' specifies options by bitwise\-or: `RDBROCHKCON' for consistency checking.
|
822
|
+
.RE
|
823
|
+
.RS
|
824
|
+
`\fIts\fR' specifies the beginning time stamp in microseconds.
|
825
|
+
.RE
|
826
|
+
.RS
|
827
|
+
If successful, the return value is true, else, it is false.
|
828
|
+
.RE
|
829
|
+
.RE
|
830
|
+
.PP
|
831
|
+
The function `tcrdbsetmst' is used in order to set the replication master of a remote database object.
|
832
|
+
.PP
|
833
|
+
.RS
|
834
|
+
.br
|
835
|
+
\fBbool tcrdbsetmst(TCRDB *\fIrdb\fB, const char *\fIhost\fB, int \fIport\fB, uint64_t \fIts\fB, int \fIopts\fB);\fR
|
836
|
+
.RS
|
837
|
+
`\fIrdb\fR' specifies the remote database object.
|
838
|
+
.RE
|
839
|
+
.RS
|
840
|
+
`\fIhost\fR' specifies the name or the address of the server. If it is `NULL', replication of the database is disabled.
|
841
|
+
.RE
|
842
|
+
.RS
|
843
|
+
`\fIport\fR' specifies the port number.
|
844
|
+
.RE
|
845
|
+
.RS
|
846
|
+
`\fIts\fR' specifies the beginning timestamp in microseconds.
|
847
|
+
.RE
|
848
|
+
.RS
|
849
|
+
`\fIopts\fR' specifies options by bitwise\-or: `RDBROCHKCON' for consistency checking.
|
850
|
+
.RE
|
851
|
+
.RS
|
852
|
+
If successful, the return value is true, else, it is false.
|
853
|
+
.RE
|
854
|
+
.RE
|
855
|
+
.PP
|
856
|
+
The function `tcrdbsetmst2' is used in order to set the replication master of a remote database object with a simple server expression.
|
857
|
+
.PP
|
858
|
+
.RS
|
859
|
+
.br
|
860
|
+
\fBbool tcrdbsetmst2(TCRDB *\fIrdb\fB, const char *\fIexpr\fB, uint64_t \fIts\fB, int \fIopts\fB);\fR
|
861
|
+
.RS
|
862
|
+
`\fIrdb\fR' specifies the remote database object.
|
863
|
+
.RE
|
864
|
+
.RS
|
865
|
+
`\fIexpr\fR' specifies the simple server expression. It is composed of two substrings separated by ":". The former field specifies the name or the address of the server. The latter field specifies the port number. If the latter field is omitted, the default port number is specified.
|
866
|
+
.RE
|
867
|
+
.RS
|
868
|
+
`\fIts\fR' specifies the beginning timestamp in microseconds.
|
869
|
+
.RE
|
870
|
+
.RS
|
871
|
+
`\fIopts\fR' specifies options by bitwise\-or: `RDBROCHKCON' for consistency checking.
|
872
|
+
.RE
|
873
|
+
.RS
|
874
|
+
If successful, the return value is true, else, it is false.
|
875
|
+
.RE
|
876
|
+
.RE
|
877
|
+
.PP
|
878
|
+
The function `tcrdbrnum' is used in order to get the number of records of a remote database object.
|
879
|
+
.PP
|
880
|
+
.RS
|
881
|
+
.br
|
882
|
+
\fBuint64_t tcrdbrnum(TCRDB *\fIrdb\fB);\fR
|
883
|
+
.RS
|
884
|
+
`\fIrdb\fR' specifies the remote database object.
|
885
|
+
.RE
|
886
|
+
.RS
|
887
|
+
The return value is the number of records or 0 if the object does not connect to any database server.
|
888
|
+
.RE
|
889
|
+
.RE
|
890
|
+
.PP
|
891
|
+
The function `tcrdbsize' is used in order to get the size of the database of a remote database object.
|
892
|
+
.PP
|
893
|
+
.RS
|
894
|
+
.br
|
895
|
+
\fBuint64_t tcrdbsize(TCRDB *\fIrdb\fB);\fR
|
896
|
+
.RS
|
897
|
+
`\fIrdb\fR' specifies the remote database object.
|
898
|
+
.RE
|
899
|
+
.RS
|
900
|
+
The return value is the size of the database or 0 if the object does not connect to any database server.
|
901
|
+
.RE
|
902
|
+
.RE
|
903
|
+
.PP
|
904
|
+
The function `tcrdbstat' is used in order to get the status string of the database of a remote database object.
|
905
|
+
.PP
|
906
|
+
.RS
|
907
|
+
.br
|
908
|
+
\fBchar *tcrdbstat(TCRDB *\fIrdb\fB);\fR
|
909
|
+
.RS
|
910
|
+
`\fIrdb\fR' specifies the remote database object.
|
911
|
+
.RE
|
912
|
+
.RS
|
913
|
+
The return value is the status message of the database or `NULL' if the object does not connect to any database server. The message format is TSV. The first field of each line means the parameter name and the second field means the value.
|
914
|
+
.RE
|
915
|
+
.RS
|
916
|
+
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.
|
917
|
+
.RE
|
918
|
+
.RE
|
919
|
+
.PP
|
920
|
+
The function `tcrdbmisc' is used in order to call a versatile function for miscellaneous operations of a remote database object.
|
921
|
+
.PP
|
922
|
+
.RS
|
923
|
+
.br
|
924
|
+
\fBTCLIST *tcrdbmisc(TCRDB *\fIrdb\fB, const char *\fIname\fB, int \fIopts\fB, const TCLIST *\fIargs\fB);\fR
|
925
|
+
.RS
|
926
|
+
`\fIrdb\fR' specifies the remote database object.
|
927
|
+
.RE
|
928
|
+
.RS
|
929
|
+
`\fIname\fR' specifies the name of the function. All databases support "put", "out", "get", "putlist", "outlist", and "getlist". "put" is to store a record. It receives a key and a value, and returns an empty list. "out" is to remove a record. It receives a key, and returns an empty list. "get" is to retrieve a record. It receives a key, and returns a list of the values. "putlist" is to store records. It receives keys and values one after the other, and returns an empty list. "outlist" is to remove records. It receives keys, and returns an empty list. "getlist" is to retrieve records. It receives keys, and returns keys and values of corresponding records one after the other.
|
930
|
+
.RE
|
931
|
+
.RS
|
932
|
+
`\fIopts\fR' specifies options by bitwise\-or: `RDBMONOULOG' for omission of the update log.
|
933
|
+
.RE
|
934
|
+
.RS
|
935
|
+
`\fIargs\fR' specifies a list object containing arguments.
|
936
|
+
.RE
|
937
|
+
.RS
|
938
|
+
If successful, the return value is a list object of the result. `NULL' is returned on failure.
|
939
|
+
.RE
|
940
|
+
.RS
|
941
|
+
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.
|
942
|
+
.RE
|
943
|
+
.RE
|
944
|
+
|
945
|
+
.SH TABLE EXTENSION
|
946
|
+
.PP
|
947
|
+
The function `tcrdbtblput' is used in order to store a record into a remote database object.
|
948
|
+
.PP
|
949
|
+
.RS
|
950
|
+
.br
|
951
|
+
\fBbool tcrdbtblput(TCRDB *\fIrdb\fB, const void *\fIpkbuf\fB, int \fIpksiz\fB, TCMAP *\fIcols\fB);\fR
|
952
|
+
.RS
|
953
|
+
`\fIrdb\fR' specifies the remote database object.
|
954
|
+
.RE
|
955
|
+
.RS
|
956
|
+
`\fIpkbuf\fR' specifies the pointer to the region of the primary key.
|
957
|
+
.RE
|
958
|
+
.RS
|
959
|
+
`\fIpksiz\fR' specifies the size of the region of the primary key.
|
960
|
+
.RE
|
961
|
+
.RS
|
962
|
+
`\fIcols\fR' specifies a map object containing columns.
|
963
|
+
.RE
|
964
|
+
.RS
|
965
|
+
If successful, the return value is true, else, it is false.
|
966
|
+
.RE
|
967
|
+
.RS
|
968
|
+
If a record with the same key exists in the database, it is overwritten.
|
969
|
+
.RE
|
970
|
+
.RE
|
971
|
+
.PP
|
972
|
+
The function `tcrdbtblputkeep' is used in order to store a new record into a remote database object.
|
973
|
+
.PP
|
974
|
+
.RS
|
975
|
+
.br
|
976
|
+
\fBbool tcrdbtblputkeep(TCRDB *\fIrdb\fB, const void *\fIpkbuf\fB, int \fIpksiz\fB, TCMAP *\fIcols\fB);\fR
|
977
|
+
.RS
|
978
|
+
`\fIrdb\fR' specifies the remote database object.
|
979
|
+
.RE
|
980
|
+
.RS
|
981
|
+
`\fIpkbuf\fR' specifies the pointer to the region of the primary key.
|
982
|
+
.RE
|
983
|
+
.RS
|
984
|
+
`\fIpksiz\fR' specifies the size of the region of the primary key.
|
985
|
+
.RE
|
986
|
+
.RS
|
987
|
+
`\fIcols\fR' specifies a map object containing columns.
|
988
|
+
.RE
|
989
|
+
.RS
|
990
|
+
If successful, the return value is true, else, it is false.
|
991
|
+
.RE
|
992
|
+
.RS
|
993
|
+
If a record with the same key exists in the database, this function has no effect.
|
994
|
+
.RE
|
995
|
+
.RE
|
996
|
+
.PP
|
997
|
+
The function `tcrdbtblputcat' is used in order to concatenate columns of the existing record in a remote database object.
|
998
|
+
.PP
|
999
|
+
.RS
|
1000
|
+
.br
|
1001
|
+
\fBbool tcrdbtblputcat(TCRDB *\fIrdb\fB, const void *\fIpkbuf\fB, int \fIpksiz\fB, TCMAP *\fIcols\fB);\fR
|
1002
|
+
.RS
|
1003
|
+
`\fIrdb\fR' specifies the remote database object.
|
1004
|
+
.RE
|
1005
|
+
.RS
|
1006
|
+
`\fIpkbuf\fR' specifies the pointer to the region of the primary key.
|
1007
|
+
.RE
|
1008
|
+
.RS
|
1009
|
+
`\fIpksiz\fR' specifies the size of the region of the primary key.
|
1010
|
+
.RE
|
1011
|
+
.RS
|
1012
|
+
`\fIcols\fR' specifies a map object containing columns.
|
1013
|
+
.RE
|
1014
|
+
.RS
|
1015
|
+
If successful, the return value is true, else, it is false.
|
1016
|
+
.RE
|
1017
|
+
.RS
|
1018
|
+
If there is no corresponding record, a new record is created.
|
1019
|
+
.RE
|
1020
|
+
.RE
|
1021
|
+
.PP
|
1022
|
+
The function `tcrdbtblout' is used in order to remove a record of a remote database object.
|
1023
|
+
.PP
|
1024
|
+
.RS
|
1025
|
+
.br
|
1026
|
+
\fBbool tcrdbtblout(TCRDB *\fIrdb\fB, const void *\fIpkbuf\fB, int \fIpksiz\fB);\fR
|
1027
|
+
.RS
|
1028
|
+
`\fIrdb\fR' specifies the remote database object.
|
1029
|
+
.RE
|
1030
|
+
.RS
|
1031
|
+
`\fIpkbuf\fR' specifies the pointer to the region of the primary key.
|
1032
|
+
.RE
|
1033
|
+
.RS
|
1034
|
+
`\fIpksiz\fR' specifies the size of the region of the primary key.
|
1035
|
+
.RE
|
1036
|
+
.RS
|
1037
|
+
If successful, the return value is true, else, it is false.
|
1038
|
+
.RE
|
1039
|
+
.RE
|
1040
|
+
.PP
|
1041
|
+
The function `tcrdbtblget' is used in order to retrieve a record in a remote database object.
|
1042
|
+
.PP
|
1043
|
+
.RS
|
1044
|
+
.br
|
1045
|
+
\fBTCMAP *tcrdbtblget(TCRDB *\fIrdb\fB, const void *\fIpkbuf\fB, int \fIpksiz\fB);\fR
|
1046
|
+
.RS
|
1047
|
+
`\fIrdb\fR' specifies the remote database object.
|
1048
|
+
.RE
|
1049
|
+
.RS
|
1050
|
+
`\fIpkbuf\fR' specifies the pointer to the region of the primary key.
|
1051
|
+
.RE
|
1052
|
+
.RS
|
1053
|
+
`\fIpksiz\fR' specifies the size of the region of the primary key.
|
1054
|
+
.RE
|
1055
|
+
.RS
|
1056
|
+
If successful, the return value is a map object of the columns of the corresponding record. `NULL' is returned if no record corresponds.
|
1057
|
+
.RE
|
1058
|
+
.RS
|
1059
|
+
Because the object of the return value is created with the function `tcmapnew', it should be deleted with the function `tcmapdel' when it is no longer in use.
|
1060
|
+
.RE
|
1061
|
+
.RE
|
1062
|
+
.PP
|
1063
|
+
The function `tcrdbtblsetindex' is used in order to set a column index to a remote database object.
|
1064
|
+
.PP
|
1065
|
+
.RS
|
1066
|
+
.br
|
1067
|
+
\fBbool tcrdbtblsetindex(TCRDB *\fIrdb\fB, const char *\fIname\fB, int \fItype\fB);\fR
|
1068
|
+
.RS
|
1069
|
+
`\fIrdb\fR' specifies the remote database object.
|
1070
|
+
.RE
|
1071
|
+
.RS
|
1072
|
+
`\fIname\fR' specifies the name of a column. If the name of an existing index is specified, the index is rebuilt. An empty string means the primary key.
|
1073
|
+
.RE
|
1074
|
+
.RS
|
1075
|
+
`\fItype\fR' specifies the index type: `RDBITLEXICAL' for lexical string, `RDBITDECIMAL' for decimal string, `RDBITTOKEN' for token inverted index, `RDBITQGRAM' for q\-gram inverted index. If it is `RDBITOPT', the index is optimized. If it is `RDBITVOID', the index is removed. If `RDBITKEEP' is added by bitwise\-or and the index exists, this function merely returns failure.
|
1076
|
+
.RE
|
1077
|
+
.RS
|
1078
|
+
If successful, the return value is true, else, it is false.
|
1079
|
+
.RE
|
1080
|
+
.RE
|
1081
|
+
.PP
|
1082
|
+
The function `tcrdbtblgenuid' is used in order to generate a unique ID number of a remote database object.
|
1083
|
+
.PP
|
1084
|
+
.RS
|
1085
|
+
.br
|
1086
|
+
\fBint64_t tcrdbtblgenuid(TCRDB *\fIrdb\fB);\fR
|
1087
|
+
.RS
|
1088
|
+
`\fIrdb\fR' specifies the remote database object.
|
1089
|
+
.RE
|
1090
|
+
.RS
|
1091
|
+
The return value is the new unique ID number or \-1 on failure.
|
1092
|
+
.RE
|
1093
|
+
.RE
|
1094
|
+
.PP
|
1095
|
+
The function `tcrdbqrynew' is used in order to create a query object.
|
1096
|
+
.PP
|
1097
|
+
.RS
|
1098
|
+
.br
|
1099
|
+
\fBRDBQRY *tcrdbqrynew(TCRDB *\fIrdb\fB);\fR
|
1100
|
+
.RS
|
1101
|
+
`\fIrdb\fR' specifies the remote database object.
|
1102
|
+
.RE
|
1103
|
+
.RS
|
1104
|
+
The return value is the new query object.
|
1105
|
+
.RE
|
1106
|
+
.RE
|
1107
|
+
.PP
|
1108
|
+
The function `tcrdbqrydel' is used in order to delete a query object.
|
1109
|
+
.PP
|
1110
|
+
.RS
|
1111
|
+
.br
|
1112
|
+
\fBvoid tcrdbqrydel(RDBQRY *\fIqry\fB);\fR
|
1113
|
+
.RS
|
1114
|
+
`\fIqry\fR' specifies the query object.
|
1115
|
+
.RE
|
1116
|
+
.RE
|
1117
|
+
.PP
|
1118
|
+
The function `tcrdbqryaddcond' is used in order to add a narrowing condition to a query object.
|
1119
|
+
.PP
|
1120
|
+
.RS
|
1121
|
+
.br
|
1122
|
+
\fBvoid tcrdbqryaddcond(RDBQRY *\fIqry\fB, const char *\fIname\fB, int \fIop\fB, const char *\fIexpr\fB);\fR
|
1123
|
+
.RS
|
1124
|
+
`\fIqry\fR' specifies the query object.
|
1125
|
+
.RE
|
1126
|
+
.RS
|
1127
|
+
`\fIname\fR' specifies the name of a column. An empty string means the primary key.
|
1128
|
+
.RE
|
1129
|
+
.RS
|
1130
|
+
`\fIop\fR' specifies an operation type: `RDBQCSTREQ' for string which is equal to the expression, `RDBQCSTRINC' for string which is included in the expression, `RDBQCSTRBW' for string which begins with the expression, `RDBQCSTREW' for string which ends with the expression, `RDBQCSTRAND' for string which includes all tokens in the expression, `RDBQCSTROR' for string which includes at least one token in the expression, `RDBQCSTROREQ' for string which is equal to at least one token in the expression, `RDBQCSTRRX' for string which matches regular expressions of the expression, `RDBQCNUMEQ' for number which is equal to the expression, `RDBQCNUMGT' for number which is greater than the expression, `RDBQCNUMGE' for number which is greater than or equal to the expression, `RDBQCNUMLT' for number which is less than the expression, `RDBQCNUMLE' for number which is less than or equal to the expression, `RDBQCNUMBT' for number which is between two tokens of the expression, `RDBQCNUMOREQ' for number which is equal to at least one token in the expression, `RDBQCFTSPH' for full\-text search with the phrase of the expression, `RDBQCFTSAND' for full\-text search with all tokens in the expression, `RDBQCFTSOR' for full\-text search with at least one token in the expression, `RDBQCFTSEX' for full\-text search with the compound expression. All operations can be flagged by bitwise\-or: `RDBQCNEGATE' for negation, `RDBQCNOIDX' for using no index.
|
1131
|
+
.RE
|
1132
|
+
.RS
|
1133
|
+
`\fIexpr\fR' specifies an operand exression.
|
1134
|
+
.RE
|
1135
|
+
.RE
|
1136
|
+
.PP
|
1137
|
+
The function `tcrdbqrysetorder' is used in order to set the order of a query object.
|
1138
|
+
.PP
|
1139
|
+
.RS
|
1140
|
+
.br
|
1141
|
+
\fBvoid tcrdbqrysetorder(RDBQRY *\fIqry\fB, const char *\fIname\fB, int \fItype\fB);\fR
|
1142
|
+
.RS
|
1143
|
+
`\fIqry\fR' specifies the query object.
|
1144
|
+
.RE
|
1145
|
+
.RS
|
1146
|
+
`\fIname\fR' specifies the name of a column. An empty string means the primary key.
|
1147
|
+
.RE
|
1148
|
+
.RS
|
1149
|
+
`\fItype\fR' specifies the order type: `RDBQOSTRASC' for string ascending, `RDBQOSTRDESC' for string descending, `RDBQONUMASC' for number ascending, `RDBQONUMDESC' for number descending.
|
1150
|
+
.RE
|
1151
|
+
.RE
|
1152
|
+
.PP
|
1153
|
+
The function `tcrdbqrysetlimit' is used in order to set the limit number of records of the result of a query object.
|
1154
|
+
.PP
|
1155
|
+
.RS
|
1156
|
+
.br
|
1157
|
+
\fBvoid tcrdbqrysetlimit(RDBQRY *\fIqry\fB, int \fImax\fB, int \fIskip\fB);\fR
|
1158
|
+
.RS
|
1159
|
+
`\fIqry\fR' specifies the query object.
|
1160
|
+
.RE
|
1161
|
+
.RS
|
1162
|
+
`\fImax\fR' specifies the maximum number of records of the result. If it is negative, no limit is specified.
|
1163
|
+
.RE
|
1164
|
+
.RS
|
1165
|
+
`\fIskip\fR' specifies the number of skipped records of the result. If it is not more than 0, no record is skipped.
|
1166
|
+
.RE
|
1167
|
+
.RE
|
1168
|
+
.PP
|
1169
|
+
The function `tcrdbqrysearch' is used in order to execute the search of a query object.
|
1170
|
+
.PP
|
1171
|
+
.RS
|
1172
|
+
.br
|
1173
|
+
\fBTCLIST *tcrdbqrysearch(RDBQRY *\fIqry\fB);\fR
|
1174
|
+
.RS
|
1175
|
+
`\fIqry\fR' specifies the query object.
|
1176
|
+
.RE
|
1177
|
+
.RS
|
1178
|
+
The return value is a list object of the primary keys of the corresponding records. This function does never fail. It returns an empty list even if no record corresponds.
|
1179
|
+
.RE
|
1180
|
+
.RS
|
1181
|
+
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.
|
1182
|
+
.RE
|
1183
|
+
.RE
|
1184
|
+
.PP
|
1185
|
+
The function `tcrdbqrysearchout' is used in order to remove each record corresponding to a query object.
|
1186
|
+
.PP
|
1187
|
+
.RS
|
1188
|
+
.br
|
1189
|
+
\fBbool tcrdbqrysearchout(RDBQRY *\fIqry\fB);\fR
|
1190
|
+
.RS
|
1191
|
+
`\fIqry\fR' specifies the query object of the database.
|
1192
|
+
.RE
|
1193
|
+
.RS
|
1194
|
+
If successful, the return value is true, else, it is false.
|
1195
|
+
.RE
|
1196
|
+
.RE
|
1197
|
+
.PP
|
1198
|
+
The function `tcrdbqrysearchget' is used in order to get records corresponding to the search of a query object.
|
1199
|
+
.PP
|
1200
|
+
.RS
|
1201
|
+
.br
|
1202
|
+
\fBTCLIST *tcrdbqrysearchget(RDBQRY *\fIqry\fB);\fR
|
1203
|
+
.RS
|
1204
|
+
`\fIqry\fR' specifies the query object.
|
1205
|
+
.RE
|
1206
|
+
.RS
|
1207
|
+
The return value is a list object of zero separated columns of the corresponding records.
|
1208
|
+
.RE
|
1209
|
+
.RS
|
1210
|
+
This function does never fail. It returns an empty list even if no record corresponds. Each element of the list can be treated with the function `tcrdbqryrescols'. 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.
|
1211
|
+
.RE
|
1212
|
+
.RE
|
1213
|
+
.PP
|
1214
|
+
The function `tcrdbqryrescols' is used in order to get columns of a record in a search result.
|
1215
|
+
.PP
|
1216
|
+
.RS
|
1217
|
+
.br
|
1218
|
+
\fBTCMAP *tcrdbqryrescols(TCLIST *\fIres\fB, int \fIindex\fB);\fR
|
1219
|
+
.RS
|
1220
|
+
`\fIres\fR' specifies a list of zero separated columns of the search result.
|
1221
|
+
.RE
|
1222
|
+
.RS
|
1223
|
+
`\fIindex\fR' the index of a element of the search result.
|
1224
|
+
.RE
|
1225
|
+
.RS
|
1226
|
+
The return value is a map object containing columns.
|
1227
|
+
.RE
|
1228
|
+
.RS
|
1229
|
+
Because the object of the return value is created with the function `tcmapnew', it should be deleted with the function `tcmapdel' when it is no longer in use.
|
1230
|
+
.RE
|
1231
|
+
.RE
|
1232
|
+
.PP
|
1233
|
+
The function `tcrdbqrysearchcount' is used in order to get the count of corresponding records of a query object.
|
1234
|
+
.PP
|
1235
|
+
.RS
|
1236
|
+
.br
|
1237
|
+
\fBint tcrdbqrysearchcount(RDBQRY *\fIqry\fB);\fR
|
1238
|
+
.RS
|
1239
|
+
`\fIqry\fR' specifies the query object.
|
1240
|
+
.RE
|
1241
|
+
.RS
|
1242
|
+
The return value is the count of corresponding records or 0 on failure.
|
1243
|
+
.RE
|
1244
|
+
.RE
|
1245
|
+
.PP
|
1246
|
+
The function `tcrdbqryhint' is used in order to get the hint string of a query object.
|
1247
|
+
.PP
|
1248
|
+
.RS
|
1249
|
+
.br
|
1250
|
+
\fBconst char *tcrdbqryhint(RDBQRY *\fIqry\fB);\fR
|
1251
|
+
.RS
|
1252
|
+
`\fIqry\fR' specifies the query object.
|
1253
|
+
.RE
|
1254
|
+
.RS
|
1255
|
+
The return value is the hint string.
|
1256
|
+
.RE
|
1257
|
+
.RS
|
1258
|
+
This function should be called after the query execution by `tcrdbqrysearch' and so on. The region of the return value is overwritten when this function is called again.
|
1259
|
+
.RE
|
1260
|
+
.RE
|
1261
|
+
.PP
|
1262
|
+
The function `tcrdbmetasearch' is used in order to retrieve records with multiple query objects and get the set of the result.
|
1263
|
+
.PP
|
1264
|
+
.RS
|
1265
|
+
.br
|
1266
|
+
\fBTCLIST *tcrdbmetasearch(RDBQRY **\fIqrys\fB, int \fInum\fB, int \fItype\fB);\fR
|
1267
|
+
.RS
|
1268
|
+
`\fIqrys\fR' specifies an array of the query objects.
|
1269
|
+
.RE
|
1270
|
+
.RS
|
1271
|
+
`\fInum\fR' specifies the number of elements of the array.
|
1272
|
+
.RE
|
1273
|
+
.RS
|
1274
|
+
`\fItype\fR' specifies a set operation type: `RDBMSUNION' for the union set, `RDBMSISECT' for the intersection set, `RDBMSDIFF' for the difference set.
|
1275
|
+
.RE
|
1276
|
+
.RS
|
1277
|
+
The return value is a list object of the primary keys of the corresponding records. This function does never fail. It returns an empty list even if no record corresponds.
|
1278
|
+
.RE
|
1279
|
+
.RS
|
1280
|
+
If the first query object has the order setting, the result array is sorted by the order. 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.
|
1281
|
+
.RE
|
1282
|
+
.RE
|
1283
|
+
.PP
|
1284
|
+
The function `tcrdbparasearch' is used in order to search records for multiple servers in parallel.
|
1285
|
+
.PP
|
1286
|
+
.RS
|
1287
|
+
.br
|
1288
|
+
\fBTCLIST *tcrdbparasearch(RDBQRY **\fIqrys\fB, int \fInum\fB);\fR
|
1289
|
+
.RS
|
1290
|
+
`\fIqrys\fR' specifies an array of the query objects.
|
1291
|
+
.RE
|
1292
|
+
.RS
|
1293
|
+
`\fInum\fR' specifies the number of elements of the array.
|
1294
|
+
.RE
|
1295
|
+
.RS
|
1296
|
+
The return value is a list object of zero separated columns of the corresponding records.
|
1297
|
+
.RE
|
1298
|
+
.RS
|
1299
|
+
This function does never fail. It returns an empty list even if no record corresponds. Each element of the list can be treated with the function `tcrdbqryrescols'. 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.
|
1300
|
+
.RE
|
1301
|
+
.RE
|
1302
|
+
|
1303
|
+
.SH SEE ALSO
|
1304
|
+
.PP
|
1305
|
+
.BR ttserver (1),
|
1306
|
+
.BR tcrtest (1),
|
1307
|
+
.BR tcrmttest (1),
|
1308
|
+
.BR tcrmgr (1),
|
1309
|
+
.BR ttutil (3)
|