heroku-tokyotyrant 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. data/COPYING +504 -0
  2. data/README.rdoc +231 -0
  3. data/Rakefile +72 -0
  4. data/benchmarks/balancer.rb +101 -0
  5. data/benchmarks/bulk_db.rb +74 -0
  6. data/benchmarks/bulk_table.rb +87 -0
  7. data/benchmarks/db.rb +114 -0
  8. data/benchmarks/table.rb +161 -0
  9. data/ext/extconf.rb +43 -0
  10. data/ext/tokyo/bin/tcamgr +0 -0
  11. data/ext/tokyo/bin/tcamttest +0 -0
  12. data/ext/tokyo/bin/tcatest +0 -0
  13. data/ext/tokyo/bin/tcbmgr +0 -0
  14. data/ext/tokyo/bin/tcbmttest +0 -0
  15. data/ext/tokyo/bin/tcbtest +0 -0
  16. data/ext/tokyo/bin/tcfmgr +0 -0
  17. data/ext/tokyo/bin/tcfmttest +0 -0
  18. data/ext/tokyo/bin/tcftest +0 -0
  19. data/ext/tokyo/bin/tchmgr +0 -0
  20. data/ext/tokyo/bin/tchmttest +0 -0
  21. data/ext/tokyo/bin/tchtest +0 -0
  22. data/ext/tokyo/bin/tcrmgr +0 -0
  23. data/ext/tokyo/bin/tcrmttest +0 -0
  24. data/ext/tokyo/bin/tcrtest +0 -0
  25. data/ext/tokyo/bin/tctmgr +0 -0
  26. data/ext/tokyo/bin/tctmttest +0 -0
  27. data/ext/tokyo/bin/tcttest +0 -0
  28. data/ext/tokyo/bin/tcucodec +0 -0
  29. data/ext/tokyo/bin/tcumttest +0 -0
  30. data/ext/tokyo/bin/tcutest +0 -0
  31. data/ext/tokyo/bin/ttserver +0 -0
  32. data/ext/tokyo/bin/ttulmgr +0 -0
  33. data/ext/tokyo/bin/ttultest +0 -0
  34. data/ext/tokyo/include/tcadb.h +548 -0
  35. data/ext/tokyo/include/tcbdb.h +1101 -0
  36. data/ext/tokyo/include/tcfdb.h +858 -0
  37. data/ext/tokyo/include/tchdb.h +871 -0
  38. data/ext/tokyo/include/tcrdb.h +801 -0
  39. data/ext/tokyo/include/tctdb.h +1086 -0
  40. data/ext/tokyo/include/tculog.h +392 -0
  41. data/ext/tokyo/include/tcutil.h +4184 -0
  42. data/ext/tokyo/include/ttutil.h +494 -0
  43. data/ext/tokyo/lib/libtokyocabinet.9.4.0.dylib +0 -0
  44. data/ext/tokyo/lib/libtokyocabinet.9.dylib +0 -0
  45. data/ext/tokyo/lib/libtokyocabinet.a +0 -0
  46. data/ext/tokyo/lib/libtokyocabinet.dylib +0 -0
  47. data/ext/tokyo/lib/libtokyotyrant.3.22.0.dylib +0 -0
  48. data/ext/tokyo/lib/libtokyotyrant.3.dylib +0 -0
  49. data/ext/tokyo/lib/libtokyotyrant.a +0 -0
  50. data/ext/tokyo/lib/libtokyotyrant.dylib +0 -0
  51. data/ext/tokyo/lib/pkgconfig/tokyocabinet.pc +14 -0
  52. data/ext/tokyo/lib/pkgconfig/tokyotyrant.pc +14 -0
  53. data/ext/tokyo/lib/ttskeldir.bundle +0 -0
  54. data/ext/tokyo/lib/ttskelmock.bundle +0 -0
  55. data/ext/tokyo/lib/ttskelnull.bundle +0 -0
  56. data/ext/tokyo/lib/ttskelproxy.bundle +0 -0
  57. data/ext/tokyo/libexec/tcawmgr.cgi +0 -0
  58. data/ext/tokyo/sbin/ttservctl +163 -0
  59. data/ext/tokyo/share/man/man1/tcamgr.1 +97 -0
  60. data/ext/tokyo/share/man/man1/tcamttest.1 +35 -0
  61. data/ext/tokyo/share/man/man1/tcatest.1 +55 -0
  62. data/ext/tokyo/share/man/man1/tcbmgr.1 +125 -0
  63. data/ext/tokyo/share/man/man1/tcbmttest.1 +81 -0
  64. data/ext/tokyo/share/man/man1/tcbtest.1 +107 -0
  65. data/ext/tokyo/share/man/man1/tcfmgr.1 +98 -0
  66. data/ext/tokyo/share/man/man1/tcfmttest.1 +62 -0
  67. data/ext/tokyo/share/man/man1/tcftest.1 +73 -0
  68. data/ext/tokyo/share/man/man1/tchmgr.1 +110 -0
  69. data/ext/tokyo/share/man/man1/tchmttest.1 +85 -0
  70. data/ext/tokyo/share/man/man1/tchtest.1 +95 -0
  71. data/ext/tokyo/share/man/man1/tcrmgr.1 +164 -0
  72. data/ext/tokyo/share/man/man1/tcrmttest.1 +55 -0
  73. data/ext/tokyo/share/man/man1/tcrtest.1 +89 -0
  74. data/ext/tokyo/share/man/man1/tctmgr.1 +140 -0
  75. data/ext/tokyo/share/man/man1/tctmttest.1 +92 -0
  76. data/ext/tokyo/share/man/man1/tcttest.1 +105 -0
  77. data/ext/tokyo/share/man/man1/tcucodec.1 +162 -0
  78. data/ext/tokyo/share/man/man1/tcumttest.1 +41 -0
  79. data/ext/tokyo/share/man/man1/tcutest.1 +81 -0
  80. data/ext/tokyo/share/man/man1/ttserver.1 +84 -0
  81. data/ext/tokyo/share/man/man1/ttulmgr.1 +40 -0
  82. data/ext/tokyo/share/man/man1/ttultest.1 +16 -0
  83. data/ext/tokyo/share/man/man3/tcadb.3 +676 -0
  84. data/ext/tokyo/share/man/man3/tcbdb.3 +1355 -0
  85. data/ext/tokyo/share/man/man3/tcfdb.3 +975 -0
  86. data/ext/tokyo/share/man/man3/tchdb.3 +898 -0
  87. data/ext/tokyo/share/man/man3/tclist.3 +1 -0
  88. data/ext/tokyo/share/man/man3/tcmap.3 +1 -0
  89. data/ext/tokyo/share/man/man3/tcmdb.3 +1 -0
  90. data/ext/tokyo/share/man/man3/tcmpool.3 +1 -0
  91. data/ext/tokyo/share/man/man3/tcrdb.3 +1309 -0
  92. data/ext/tokyo/share/man/man3/tctdb.3 +1110 -0
  93. data/ext/tokyo/share/man/man3/tctree.3 +1 -0
  94. data/ext/tokyo/share/man/man3/tculog.3 +15 -0
  95. data/ext/tokyo/share/man/man3/tcutil.3 +4518 -0
  96. data/ext/tokyo/share/man/man3/tcxstr.3 +1 -0
  97. data/ext/tokyo/share/man/man3/tokyocabinet.3 +132 -0
  98. data/ext/tokyo/share/man/man3/ttutil.3 +14 -0
  99. data/ext/tokyo/share/man/man8/ttservctl.8 +37 -0
  100. data/ext/tokyo/share/tokyocabinet/COPYING +504 -0
  101. data/ext/tokyo/share/tokyocabinet/ChangeLog +1252 -0
  102. data/ext/tokyo/share/tokyocabinet/THANKS +12 -0
  103. data/ext/tokyo/share/tokyocabinet/doc/benchmark.pdf +0 -0
  104. data/ext/tokyo/share/tokyocabinet/doc/common.css +211 -0
  105. data/ext/tokyo/share/tokyocabinet/doc/icon16.png +0 -0
  106. data/ext/tokyo/share/tokyocabinet/doc/index.html +156 -0
  107. data/ext/tokyo/share/tokyocabinet/doc/index.ja.html +197 -0
  108. data/ext/tokyo/share/tokyocabinet/doc/logo-ja.png +0 -0
  109. data/ext/tokyo/share/tokyocabinet/doc/logo.png +0 -0
  110. data/ext/tokyo/share/tokyocabinet/doc/spex-en.html +7145 -0
  111. data/ext/tokyo/share/tokyocabinet/doc/spex-ja.html +7476 -0
  112. data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.pdf +0 -0
  113. data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.ppt +0 -0
  114. data/ext/tokyo/share/tokyotyrant/COPYING +504 -0
  115. data/ext/tokyo/share/tokyotyrant/ChangeLog +578 -0
  116. data/ext/tokyo/share/tokyotyrant/THANKS +15 -0
  117. data/ext/tokyo/share/tokyotyrant/doc/common.css +211 -0
  118. data/ext/tokyo/share/tokyotyrant/doc/index.html +79 -0
  119. data/ext/tokyo/share/tokyotyrant/doc/spex.html +2264 -0
  120. data/ext/tokyo/share/tokyotyrant/ext/mapreduce.lua +57 -0
  121. data/ext/tokyo/share/tokyotyrant/ext/queue.lua +55 -0
  122. data/ext/tokyo/share/tokyotyrant/ext/senatus.lua +532 -0
  123. data/ext/tokyo/share/tokyotyrant/ext/usherette.lua +438 -0
  124. data/ext/tokyo_tyrant.c +147 -0
  125. data/ext/tokyo_tyrant.h +48 -0
  126. data/ext/tokyo_tyrant_db.c +227 -0
  127. data/ext/tokyo_tyrant_db.h +8 -0
  128. data/ext/tokyo_tyrant_module.c +453 -0
  129. data/ext/tokyo_tyrant_module.h +10 -0
  130. data/ext/tokyo_tyrant_query.c +226 -0
  131. data/ext/tokyo_tyrant_query.h +9 -0
  132. data/ext/tokyo_tyrant_table.c +319 -0
  133. data/ext/tokyo_tyrant_table.h +8 -0
  134. data/ext/tokyocabinet-1.4.41/COPYING +504 -0
  135. data/ext/tokyocabinet-1.4.41/ChangeLog +1252 -0
  136. data/ext/tokyocabinet-1.4.41/Makefile.in +825 -0
  137. data/ext/tokyocabinet-1.4.41/README +38 -0
  138. data/ext/tokyocabinet-1.4.41/THANKS +12 -0
  139. data/ext/tokyocabinet-1.4.41/bros/Makefile +133 -0
  140. data/ext/tokyocabinet-1.4.41/bros/bdbtest.c +438 -0
  141. data/ext/tokyocabinet-1.4.41/bros/cdbtest.c +219 -0
  142. data/ext/tokyocabinet-1.4.41/bros/cmpsqltctest.c +186 -0
  143. data/ext/tokyocabinet-1.4.41/bros/gdbmtest.c +216 -0
  144. data/ext/tokyocabinet-1.4.41/bros/mapreporter +72 -0
  145. data/ext/tokyocabinet-1.4.41/bros/maptest.cc +677 -0
  146. data/ext/tokyocabinet-1.4.41/bros/ndbmtest.c +204 -0
  147. data/ext/tokyocabinet-1.4.41/bros/qdbmtest.c +375 -0
  148. data/ext/tokyocabinet-1.4.41/bros/reporter +141 -0
  149. data/ext/tokyocabinet-1.4.41/bros/result.xls +0 -0
  150. data/ext/tokyocabinet-1.4.41/bros/sdbmtest.c +204 -0
  151. data/ext/tokyocabinet-1.4.41/bros/sqltest.c +404 -0
  152. data/ext/tokyocabinet-1.4.41/bros/tctest.c +748 -0
  153. data/ext/tokyocabinet-1.4.41/bros/tdbtest.c +205 -0
  154. data/ext/tokyocabinet-1.4.41/configure +7402 -0
  155. data/ext/tokyocabinet-1.4.41/configure.in +362 -0
  156. data/ext/tokyocabinet-1.4.41/doc/benchmark.pdf +0 -0
  157. data/ext/tokyocabinet-1.4.41/doc/common.css +211 -0
  158. data/ext/tokyocabinet-1.4.41/doc/icon16.png +0 -0
  159. data/ext/tokyocabinet-1.4.41/doc/index.html +156 -0
  160. data/ext/tokyocabinet-1.4.41/doc/index.ja.html +197 -0
  161. data/ext/tokyocabinet-1.4.41/doc/logo-ja.png +0 -0
  162. data/ext/tokyocabinet-1.4.41/doc/logo.png +0 -0
  163. data/ext/tokyocabinet-1.4.41/doc/spex-en.html +7145 -0
  164. data/ext/tokyocabinet-1.4.41/doc/spex-ja.html +7476 -0
  165. data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.pdf +0 -0
  166. data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.ppt +0 -0
  167. data/ext/tokyocabinet-1.4.41/example/Makefile +113 -0
  168. data/ext/tokyocabinet-1.4.41/example/tcadbex.c +55 -0
  169. data/ext/tokyocabinet-1.4.41/example/tcbdbex.c +64 -0
  170. data/ext/tokyocabinet-1.4.41/example/tcfdbex.c +60 -0
  171. data/ext/tokyocabinet-1.4.41/example/tchdbex.c +60 -0
  172. data/ext/tokyocabinet-1.4.41/example/tctchat.c +97 -0
  173. data/ext/tokyocabinet-1.4.41/example/tctchat.tmpl +141 -0
  174. data/ext/tokyocabinet-1.4.41/example/tctdbex.c +85 -0
  175. data/ext/tokyocabinet-1.4.41/example/tctsearch.c +95 -0
  176. data/ext/tokyocabinet-1.4.41/example/tctsearch.tmpl +122 -0
  177. data/ext/tokyocabinet-1.4.41/example/tcutilex.c +77 -0
  178. data/ext/tokyocabinet-1.4.41/f.tsv +2 -0
  179. data/ext/tokyocabinet-1.4.41/lab/calccomp +118 -0
  180. data/ext/tokyocabinet-1.4.41/lab/datechange +56 -0
  181. data/ext/tokyocabinet-1.4.41/lab/diffcheck +45 -0
  182. data/ext/tokyocabinet-1.4.41/lab/htmltotsv +102 -0
  183. data/ext/tokyocabinet-1.4.41/lab/magic +19 -0
  184. data/ext/tokyocabinet-1.4.41/lab/printenv.cgi +27 -0
  185. data/ext/tokyocabinet-1.4.41/lab/stepcount +26 -0
  186. data/ext/tokyocabinet-1.4.41/lab/stopwatch +61 -0
  187. data/ext/tokyocabinet-1.4.41/lab/tabcheck +43 -0
  188. data/ext/tokyocabinet-1.4.41/lab/wgettsv +239 -0
  189. data/ext/tokyocabinet-1.4.41/lab/widthcheck +57 -0
  190. data/ext/tokyocabinet-1.4.41/man/htmltoman +104 -0
  191. data/ext/tokyocabinet-1.4.41/man/tcadb.3 +676 -0
  192. data/ext/tokyocabinet-1.4.41/man/tcamgr.1 +97 -0
  193. data/ext/tokyocabinet-1.4.41/man/tcamttest.1 +35 -0
  194. data/ext/tokyocabinet-1.4.41/man/tcatest.1 +55 -0
  195. data/ext/tokyocabinet-1.4.41/man/tcbdb.3 +1355 -0
  196. data/ext/tokyocabinet-1.4.41/man/tcbmgr.1 +125 -0
  197. data/ext/tokyocabinet-1.4.41/man/tcbmttest.1 +81 -0
  198. data/ext/tokyocabinet-1.4.41/man/tcbtest.1 +107 -0
  199. data/ext/tokyocabinet-1.4.41/man/tcfdb.3 +975 -0
  200. data/ext/tokyocabinet-1.4.41/man/tcfmgr.1 +98 -0
  201. data/ext/tokyocabinet-1.4.41/man/tcfmttest.1 +62 -0
  202. data/ext/tokyocabinet-1.4.41/man/tcftest.1 +73 -0
  203. data/ext/tokyocabinet-1.4.41/man/tchdb.3 +898 -0
  204. data/ext/tokyocabinet-1.4.41/man/tchmgr.1 +110 -0
  205. data/ext/tokyocabinet-1.4.41/man/tchmttest.1 +85 -0
  206. data/ext/tokyocabinet-1.4.41/man/tchtest.1 +95 -0
  207. data/ext/tokyocabinet-1.4.41/man/tclist.3 +1 -0
  208. data/ext/tokyocabinet-1.4.41/man/tcmap.3 +1 -0
  209. data/ext/tokyocabinet-1.4.41/man/tcmdb.3 +1 -0
  210. data/ext/tokyocabinet-1.4.41/man/tcmpool.3 +1 -0
  211. data/ext/tokyocabinet-1.4.41/man/tctdb.3 +1110 -0
  212. data/ext/tokyocabinet-1.4.41/man/tctmgr.1 +140 -0
  213. data/ext/tokyocabinet-1.4.41/man/tctmttest.1 +92 -0
  214. data/ext/tokyocabinet-1.4.41/man/tctree.3 +1 -0
  215. data/ext/tokyocabinet-1.4.41/man/tcttest.1 +105 -0
  216. data/ext/tokyocabinet-1.4.41/man/tcucodec.1 +162 -0
  217. data/ext/tokyocabinet-1.4.41/man/tcumttest.1 +41 -0
  218. data/ext/tokyocabinet-1.4.41/man/tcutest.1 +81 -0
  219. data/ext/tokyocabinet-1.4.41/man/tcutil.3 +4518 -0
  220. data/ext/tokyocabinet-1.4.41/man/tcxstr.3 +1 -0
  221. data/ext/tokyocabinet-1.4.41/man/tokyocabinet.3 +132 -0
  222. data/ext/tokyocabinet-1.4.41/md5.c +381 -0
  223. data/ext/tokyocabinet-1.4.41/md5.h +101 -0
  224. data/ext/tokyocabinet-1.4.41/myconf.c +493 -0
  225. data/ext/tokyocabinet-1.4.41/myconf.h +549 -0
  226. data/ext/tokyocabinet-1.4.41/tcadb.c +4339 -0
  227. data/ext/tokyocabinet-1.4.41/tcadb.h +548 -0
  228. data/ext/tokyocabinet-1.4.41/tcamgr.c +1019 -0
  229. data/ext/tokyocabinet-1.4.41/tcamttest.c +542 -0
  230. data/ext/tokyocabinet-1.4.41/tcatest.c +1845 -0
  231. data/ext/tokyocabinet-1.4.41/tcawmgr.c +482 -0
  232. data/ext/tokyocabinet-1.4.41/tcbdb.c +4180 -0
  233. data/ext/tokyocabinet-1.4.41/tcbdb.h +1101 -0
  234. data/ext/tokyocabinet-1.4.41/tcbmgr.c +1012 -0
  235. data/ext/tokyocabinet-1.4.41/tcbmttest.c +1810 -0
  236. data/ext/tokyocabinet-1.4.41/tcbtest.c +2586 -0
  237. data/ext/tokyocabinet-1.4.41/tcfdb.c +2746 -0
  238. data/ext/tokyocabinet-1.4.41/tcfdb.h +858 -0
  239. data/ext/tokyocabinet-1.4.41/tcfmgr.c +786 -0
  240. data/ext/tokyocabinet-1.4.41/tcfmttest.c +1220 -0
  241. data/ext/tokyocabinet-1.4.41/tcftest.c +1695 -0
  242. data/ext/tokyocabinet-1.4.41/tchdb.c +5153 -0
  243. data/ext/tokyocabinet-1.4.41/tchdb.h +871 -0
  244. data/ext/tokyocabinet-1.4.41/tchmgr.c +842 -0
  245. data/ext/tokyocabinet-1.4.41/tchmttest.c +1757 -0
  246. data/ext/tokyocabinet-1.4.41/tchtest.c +2129 -0
  247. data/ext/tokyocabinet-1.4.41/tctdb.c +6199 -0
  248. data/ext/tokyocabinet-1.4.41/tctdb.h +1086 -0
  249. data/ext/tokyocabinet-1.4.41/tctmgr.c +1241 -0
  250. data/ext/tokyocabinet-1.4.41/tctmttest.c +1563 -0
  251. data/ext/tokyocabinet-1.4.41/tcttest.c +2062 -0
  252. data/ext/tokyocabinet-1.4.41/tcucodec.c +1357 -0
  253. data/ext/tokyocabinet-1.4.41/tcumttest.c +578 -0
  254. data/ext/tokyocabinet-1.4.41/tcutest.c +1875 -0
  255. data/ext/tokyocabinet-1.4.41/tcutil.c +10528 -0
  256. data/ext/tokyocabinet-1.4.41/tcutil.h +4184 -0
  257. data/ext/tokyocabinet-1.4.41/tokyocabinet.idl +336 -0
  258. data/ext/tokyocabinet-1.4.41/tokyocabinet.pc.in +14 -0
  259. data/ext/tokyotyrant-1.1.39/COPYING +504 -0
  260. data/ext/tokyotyrant-1.1.39/ChangeLog +578 -0
  261. data/ext/tokyotyrant-1.1.39/Makefile.in +365 -0
  262. data/ext/tokyotyrant-1.1.39/README +38 -0
  263. data/ext/tokyotyrant-1.1.39/THANKS +15 -0
  264. data/ext/tokyotyrant-1.1.39/configure +6979 -0
  265. data/ext/tokyotyrant-1.1.39/configure.in +300 -0
  266. data/ext/tokyotyrant-1.1.39/doc/common.css +211 -0
  267. data/ext/tokyotyrant-1.1.39/doc/index.html +79 -0
  268. data/ext/tokyotyrant-1.1.39/doc/spex.html +2264 -0
  269. data/ext/tokyotyrant-1.1.39/example/Makefile +68 -0
  270. data/ext/tokyotyrant-1.1.39/example/httptest.pl +88 -0
  271. data/ext/tokyotyrant-1.1.39/example/mcftest.pl +39 -0
  272. data/ext/tokyotyrant-1.1.39/example/mctest.pl +43 -0
  273. data/ext/tokyotyrant-1.1.39/example/tcrdbex +0 -0
  274. data/ext/tokyotyrant-1.1.39/example/tcrdbex.c +49 -0
  275. data/ext/tokyotyrant-1.1.39/example/tcrdbex.o +0 -0
  276. data/ext/tokyotyrant-1.1.39/example/tcrdbtblex +0 -0
  277. data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.c +79 -0
  278. data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.o +0 -0
  279. data/ext/tokyotyrant-1.1.39/ext/mapreduce.lua +57 -0
  280. data/ext/tokyotyrant-1.1.39/ext/queue.lua +55 -0
  281. data/ext/tokyotyrant-1.1.39/ext/senatus.lua +532 -0
  282. data/ext/tokyotyrant-1.1.39/ext/usherette.lua +438 -0
  283. data/ext/tokyotyrant-1.1.39/lab/datechange +56 -0
  284. data/ext/tokyotyrant-1.1.39/lab/diffcheck +45 -0
  285. data/ext/tokyotyrant-1.1.39/lab/fibonacci.lua +20 -0
  286. data/ext/tokyotyrant-1.1.39/lab/footprint.lua +67 -0
  287. data/ext/tokyotyrant-1.1.39/lab/highlow.lua +88 -0
  288. data/ext/tokyotyrant-1.1.39/lab/killdualmaster +12 -0
  289. data/ext/tokyotyrant-1.1.39/lab/rundualmaster +38 -0
  290. data/ext/tokyotyrant-1.1.39/lab/stepcount +26 -0
  291. data/ext/tokyotyrant-1.1.39/lab/tabcheck +43 -0
  292. data/ext/tokyotyrant-1.1.39/lab/ushrtregister.pl +55 -0
  293. data/ext/tokyotyrant-1.1.39/lab/widthcheck +57 -0
  294. data/ext/tokyotyrant-1.1.39/man/htmltoman +100 -0
  295. data/ext/tokyotyrant-1.1.39/man/tcrdb.3 +1309 -0
  296. data/ext/tokyotyrant-1.1.39/man/tcrmgr.1 +164 -0
  297. data/ext/tokyotyrant-1.1.39/man/tcrmttest.1 +55 -0
  298. data/ext/tokyotyrant-1.1.39/man/tcrtest.1 +89 -0
  299. data/ext/tokyotyrant-1.1.39/man/tculog.3 +15 -0
  300. data/ext/tokyotyrant-1.1.39/man/ttservctl.8 +37 -0
  301. data/ext/tokyotyrant-1.1.39/man/ttserver.1 +84 -0
  302. data/ext/tokyotyrant-1.1.39/man/ttulmgr.1 +40 -0
  303. data/ext/tokyotyrant-1.1.39/man/ttultest.1 +16 -0
  304. data/ext/tokyotyrant-1.1.39/man/ttutil.3 +14 -0
  305. data/ext/tokyotyrant-1.1.39/myconf.c +169 -0
  306. data/ext/tokyotyrant-1.1.39/myconf.h +408 -0
  307. data/ext/tokyotyrant-1.1.39/scrext.c +2394 -0
  308. data/ext/tokyotyrant-1.1.39/scrext.h +96 -0
  309. data/ext/tokyotyrant-1.1.39/tcrdb.c +2637 -0
  310. data/ext/tokyotyrant-1.1.39/tcrdb.h +801 -0
  311. data/ext/tokyotyrant-1.1.39/tcrmgr.c +1559 -0
  312. data/ext/tokyotyrant-1.1.39/tcrmttest.c +915 -0
  313. data/ext/tokyotyrant-1.1.39/tcrtest.c +1542 -0
  314. data/ext/tokyotyrant-1.1.39/tculog.c +1211 -0
  315. data/ext/tokyotyrant-1.1.39/tculog.h +392 -0
  316. data/ext/tokyotyrant-1.1.39/tokyotyrant.idl +143 -0
  317. data/ext/tokyotyrant-1.1.39/tokyotyrant.pc.in +14 -0
  318. data/ext/tokyotyrant-1.1.39/ttservctl +163 -0
  319. data/ext/tokyotyrant-1.1.39/ttserver.c +3583 -0
  320. data/ext/tokyotyrant-1.1.39/ttskeldir.c +141 -0
  321. data/ext/tokyotyrant-1.1.39/ttskelmock.c +64 -0
  322. data/ext/tokyotyrant-1.1.39/ttskelnull.c +79 -0
  323. data/ext/tokyotyrant-1.1.39/ttskelproxy.c +74 -0
  324. data/ext/tokyotyrant-1.1.39/ttulmgr.c +266 -0
  325. data/ext/tokyotyrant-1.1.39/ttultest.c +371 -0
  326. data/ext/tokyotyrant-1.1.39/ttutil.c +1510 -0
  327. data/ext/tokyotyrant-1.1.39/ttutil.h +494 -0
  328. data/lib/tokyo_tyrant/balancer.rb +189 -0
  329. data/spec/ext.lua +4 -0
  330. data/spec/plu_db.rb +538 -0
  331. data/spec/spec.rb +1 -0
  332. data/spec/spec_base.rb +17 -0
  333. data/spec/start_tyrants.sh +36 -0
  334. data/spec/stop_tyrants.sh +9 -0
  335. data/spec/tokyo_tyrant_balancer_db_spec.rb +160 -0
  336. data/spec/tokyo_tyrant_balancer_table_spec.rb +177 -0
  337. data/spec/tokyo_tyrant_query_spec.rb +159 -0
  338. data/spec/tokyo_tyrant_spec.rb +254 -0
  339. data/spec/tokyo_tyrant_table_spec.rb +301 -0
  340. metadata +402 -0
@@ -0,0 +1,392 @@
1
+ /*************************************************************************************************
2
+ * The update log API of Tokyo Tyrant
3
+ * Copyright (C) 2006-2009 Mikio Hirabayashi
4
+ * This file is part of Tokyo Tyrant.
5
+ * Tokyo Tyrant is free software; you can redistribute it and/or modify it under the terms of
6
+ * the GNU Lesser General Public License as published by the Free Software Foundation; either
7
+ * version 2.1 of the License or any later version. Tokyo Tyrant is distributed in the hope
8
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10
+ * License for more details.
11
+ * You should have received a copy of the GNU Lesser General Public License along with Tokyo
12
+ * Tyrant; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
13
+ * Boston, MA 02111-1307 USA.
14
+ *************************************************************************************************/
15
+
16
+
17
+ #ifndef _TCULOG_H /* duplication check */
18
+ #define _TCULOG_H
19
+
20
+ #if defined(__cplusplus)
21
+ #define __TCULOG_CLINKAGEBEGIN extern "C" {
22
+ #define __TCULOG_CLINKAGEEND }
23
+ #else
24
+ #define __TCULOG_CLINKAGEBEGIN
25
+ #define __TCULOG_CLINKAGEEND
26
+ #endif
27
+ __TCULOG_CLINKAGEBEGIN
28
+
29
+
30
+ #include <ttutil.h>
31
+
32
+
33
+
34
+ /*************************************************************************************************
35
+ * API
36
+ *************************************************************************************************/
37
+
38
+
39
+ #define TCULSUFFIX ".ulog" /* suffix of update log files */
40
+ #define TCULMAGICNUM 0xc9 /* magic number of each command */
41
+ #define TCULMAGICNOP 0xca /* magic number of NOP command */
42
+ #define TCULRMTXNUM 31 /* number of mutexes of records */
43
+
44
+ typedef struct { /* type of structure for an update log */
45
+ pthread_mutex_t rmtxs[TCULRMTXNUM]; /* mutex for records */
46
+ pthread_rwlock_t rwlck; /* mutex for operation */
47
+ pthread_cond_t cnd; /* condition variable */
48
+ pthread_mutex_t wmtx; /* mutex for waiting condition */
49
+ char *base; /* path of the base directory */
50
+ uint64_t limsiz; /* limit size */
51
+ int max; /* number of maximum ID */
52
+ int fd; /* current file descriptor */
53
+ uint64_t size; /* current size */
54
+ void *aiocbs; /* AIO tasks */
55
+ int aiocbi; /* index of AIO tasks */
56
+ uint64_t aioend; /* end offset of AIO tasks */
57
+ } TCULOG;
58
+
59
+ typedef struct { /* type of structure for a log reader */
60
+ TCULOG *ulog; /* update log object */
61
+ uint64_t ts; /* beginning timestamp */
62
+ int num; /* number of current ID */
63
+ int fd; /* current file descriptor */
64
+ char *rbuf; /* record buffer */
65
+ int rsiz; /* size of the record buffer */
66
+ } TCULRD;
67
+
68
+ typedef struct { /* type of structure for a replication */
69
+ int fd; /* file descriptor */
70
+ TTSOCK *sock; /* socket object */
71
+ char *rbuf; /* record buffer */
72
+ int rsiz; /* size of the record buffer */
73
+ uint16_t mid; /* master server ID number */
74
+ } TCREPL;
75
+
76
+
77
+ /* Create an update log object.
78
+ The return value is the new update log object. */
79
+ TCULOG *tculognew(void);
80
+
81
+
82
+ /* Delete an update log object.
83
+ `ulog' specifies the update log object. */
84
+ void tculogdel(TCULOG *ulog);
85
+
86
+
87
+ /* Set AIO control of an update log object.
88
+ `ulog' specifies the update log object.
89
+ If successful, the return value is true, else, it is false. */
90
+ bool tculogsetaio(TCULOG *ulog);
91
+
92
+
93
+ /* Open files of an update log object.
94
+ `ulog' specifies the update log object.
95
+ `base' specifies the path of the base directory.
96
+ `limsiz' specifies the limit size of each file. If it is not more than 0, no limit is
97
+ specified.
98
+ If successful, the return value is true, else, it is false. */
99
+ bool tculogopen(TCULOG *ulog, const char *base, uint64_t limsiz);
100
+
101
+
102
+ /* Close files of an update log object.
103
+ `ulog' specifies the update log object.
104
+ If successful, the return value is true, else, it is false. */
105
+ bool tculogclose(TCULOG *ulog);
106
+
107
+
108
+ /* Get the mutex index of a record.
109
+ `ulog' specifies the update log object.
110
+ `kbuf' specifies the pointer to the region of the key.
111
+ `ksiz' specifies the size of the region of the key.
112
+ The return value is the mutex index of a record. */
113
+ int tculogrmtxidx(TCULOG *ulog, const char *kbuf, int ksiz);
114
+
115
+
116
+ /* Begin the critical section of an update log object.
117
+ `ulog' specifies the update log object.
118
+ `idx' specifies the index of the record lock. -1 means to lock all.
119
+ If successful, the return value is true, else, it is false. */
120
+ bool tculogbegin(TCULOG *ulog, int idx);
121
+
122
+
123
+ /* End the critical section of an update log object.
124
+ `ulog' specifies the update log object.
125
+ `idx' specifies the index of the record lock. -1 means to lock all.
126
+ If successful, the return value is true, else, it is false. */
127
+ bool tculogend(TCULOG *ulog, int idx);
128
+
129
+
130
+ /* Write a message into an update log object.
131
+ `ulog' specifies the update log object.
132
+ `ts' specifies the timestamp. If it is 0, the current time is specified.
133
+ `sid' specifies the origin server ID of the message.
134
+ `mid' specifies the master server ID of the message.
135
+ `ptr' specifies the pointer to the region of the message.
136
+ `size' specifies the size of the region.
137
+ If successful, the return value is true, else, it is false. */
138
+ bool tculogwrite(TCULOG *ulog, uint64_t ts, uint32_t sid, uint32_t mid,
139
+ const void *ptr, int size);
140
+
141
+
142
+ /* Create a log reader object.
143
+ `ulog' specifies the update log object.
144
+ `ts' specifies the beginning timestamp.
145
+ The return value is the new log reader object. */
146
+ TCULRD *tculrdnew(TCULOG *ulog, uint64_t ts);
147
+
148
+
149
+ /* Delete a log reader object.
150
+ `ulrd' specifies the log reader object. */
151
+ void tculrddel(TCULRD *ulrd);
152
+
153
+
154
+ /* Wait the next message is written.
155
+ `ulrd' specifies the log reader object. */
156
+ void tculrdwait(TCULRD *ulrd);
157
+
158
+
159
+ /* Read a message from a log reader object.
160
+ `ulrd' specifies the log reader object.
161
+ `sp' specifies the pointer to the variable into which the size of the region of the return
162
+ value is assigned.
163
+ `tsp' specifies the pointer to the variable into which the timestamp of the next message is
164
+ assigned.
165
+ `sidp' specifies the pointer to the variable into which the origin server ID of the next
166
+ message is assigned.
167
+ `midp' specifies the pointer to the variable into which the master server ID of the next
168
+ message is assigned.
169
+ If successful, the return value is the pointer to the region of the value of the next message.
170
+ `NULL' is returned if no record is to be read. */
171
+ const void *tculrdread(TCULRD *ulrd, int *sp, uint64_t *tsp, uint32_t *sidp, uint32_t *midp);
172
+
173
+
174
+ /* Store a record into an abstract database object.
175
+ `ulog' specifies the update log object.
176
+ `sid' specifies the origin server ID of the message.
177
+ `mid' specifies the master server ID of the message.
178
+ `adb' specifies the abstract database object.
179
+ `kbuf' specifies the pointer to the region of the key.
180
+ `ksiz' specifies the size of the region of the key.
181
+ `vbuf' specifies the pointer to the region of the value.
182
+ `vsiz' specifies the size of the region of the value.
183
+ If successful, the return value is true, else, it is false.
184
+ If a record with the same key exists in the database, it is overwritten. */
185
+ bool tculogadbput(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
186
+ const void *kbuf, int ksiz, const void *vbuf, int vsiz);
187
+
188
+
189
+ /* Store a new record into an abstract database object.
190
+ `ulog' specifies the update log object.
191
+ `sid' specifies the origin server ID of the message.
192
+ `mid' specifies the master server ID of the message.
193
+ `adb' specifies the abstract database object.
194
+ `kbuf' specifies the pointer to the region of the key.
195
+ `ksiz' specifies the size of the region of the key.
196
+ `vbuf' specifies the pointer to the region of the value.
197
+ `vsiz' specifies the size of the region of the value.
198
+ If successful, the return value is true, else, it is false.
199
+ If a record with the same key exists in the database, this function has no effect. */
200
+ bool tculogadbputkeep(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
201
+ const void *kbuf, int ksiz, const void *vbuf, int vsiz);
202
+
203
+
204
+ /* Concatenate a value at the end of the existing record in an abstract database object.
205
+ `ulog' specifies the update log object.
206
+ `sid' specifies the origin server ID of the message.
207
+ `mid' specifies the master server ID of the message.
208
+ `adb' specifies the abstract database object.
209
+ `kbuf' specifies the pointer to the region of the key.
210
+ `ksiz' specifies the size of the region of the key.
211
+ `vbuf' specifies the pointer to the region of the value.
212
+ `vsiz' specifies the size of the region of the value.
213
+ If successful, the return value is true, else, it is false.
214
+ If there is no corresponding record, a new record is created. */
215
+ bool tculogadbputcat(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
216
+ const void *kbuf, int ksiz, const void *vbuf, int vsiz);
217
+
218
+
219
+ /* Concatenate a value at the end of the existing record and shift it to the left.
220
+ `ulog' specifies the update log object.
221
+ `sid' specifies the origin server ID of the message.
222
+ `mid' specifies the master server ID of the message.
223
+ `adb' specifies the abstract database object.
224
+ `kbuf' specifies the pointer to the region of the key.
225
+ `ksiz' specifies the size of the region of the key.
226
+ `vbuf' specifies the pointer to the region of the value.
227
+ `vsiz' specifies the size of the region of the value.
228
+ `width' specifies the width of the record.
229
+ If successful, the return value is true, else, it is false.
230
+ If there is no corresponding record, a new record is created. */
231
+ bool tculogadbputshl(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
232
+ const void *kbuf, int ksiz, const void *vbuf, int vsiz, int width);
233
+
234
+
235
+ /* Remove a record of an abstract database object.
236
+ `ulog' specifies the update log object.
237
+ `sid' specifies the origin server ID of the message.
238
+ `mid' specifies the master server ID of the message.
239
+ `adb' specifies the abstract database object.
240
+ `kbuf' specifies the pointer to the region of the key.
241
+ `ksiz' specifies the size of the region of the key.
242
+ If successful, the return value is true, else, it is false. */
243
+ bool tculogadbout(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
244
+ const void *kbuf, int ksiz);
245
+
246
+
247
+ /* Add an integer to a record in an abstract database object.
248
+ `ulog' specifies the update log object.
249
+ `sid' specifies the origin server ID of the message.
250
+ `mid' specifies the master server ID of the message.
251
+ `adb' specifies the abstract database object connected as a writer.
252
+ `kbuf' specifies the pointer to the region of the key.
253
+ `ksiz' specifies the size of the region of the key.
254
+ `num' specifies the additional value.
255
+ If successful, the return value is the summation value, else, it is `INT_MIN'.
256
+ If the corresponding record exists, the value is treated as an integer and is added to. If no
257
+ record corresponds, a new record of the additional value is stored. */
258
+ int tculogadbaddint(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
259
+ const void *kbuf, int ksiz, int num);
260
+
261
+
262
+ /* Add a real number to a record in an abstract database object.
263
+ `ulog' specifies the update log object.
264
+ `sid' specifies the origin server ID of the message.
265
+ `mid' specifies the master server ID of the message.
266
+ `adb' specifies the abstract database object connected as a writer.
267
+ `kbuf' specifies the pointer to the region of the key.
268
+ `ksiz' specifies the size of the region of the key.
269
+ `num' specifies the additional value.
270
+ If successful, the return value is the summation value, else, it is `NAN'.
271
+ If the corresponding record exists, the value is treated as a real number and is added to. If
272
+ no record corresponds, a new record of the additional value is stored. */
273
+ double tculogadbadddouble(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
274
+ const void *kbuf, int ksiz, double num);
275
+
276
+
277
+ /* Synchronize updated contents of an abstract database object with the file and the device.
278
+ `ulog' specifies the update log object.
279
+ `sid' specifies the origin server ID of the message.
280
+ `mid' specifies the master server ID of the message.
281
+ `adb' specifies the abstract database object.
282
+ If successful, the return value is true, else, it is false. */
283
+ bool tculogadbsync(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb);
284
+
285
+
286
+ /* Optimize the storage of an abstract database object.
287
+ `ulog' specifies the update log object.
288
+ `sid' specifies the origin server ID of the message.
289
+ `mid' specifies the master server ID of the message.
290
+ `adb' specifies the abstract database object.
291
+ `params' specifies the string of the tuning parameters, which works as with the tuning
292
+ of parameters the function `tcadbopen'. If it is `NULL', it is not used.
293
+ If successful, the return value is true, else, it is false. */
294
+ bool tculogadboptimize(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb, const char *params);
295
+
296
+
297
+ /* Remove all records of an abstract database object.
298
+ `ulog' specifies the update log object.
299
+ `sid' specifies the origin server ID of the message.
300
+ `mid' specifies the master server ID of the message.
301
+ `adb' specifies the abstract database object.
302
+ If successful, the return value is true, else, it is false. */
303
+ bool tculogadbvanish(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb);
304
+
305
+
306
+ /* Call a versatile function for miscellaneous operations of an abstract database object.
307
+ `ulog' specifies the update log object.
308
+ `sid' specifies the origin server ID of the message.
309
+ `mid' specifies the master server ID of the message.
310
+ `adb' specifies the abstract database object.
311
+ `name' specifies the name of the function.
312
+ `args' specifies a list object containing arguments.
313
+ If successful, the return value is a list object of the result. `NULL' is returned on failure.
314
+ All databases support "putlist", "outlist", and "getlist". "putdup" is to store records. It
315
+ receives keys and values one after the other, and returns an empty list. "outlist" is to
316
+ remove records. It receives keys, and returns an empty list. "getlist" is to retrieve
317
+ records. It receives keys, and returns values. Because the object of the return value is
318
+ created with the function `tclistnew', it should be deleted with the function `tclistdel' when
319
+ it is no longer in use. */
320
+ TCLIST *tculogadbmisc(TCULOG *ulog, uint32_t sid, uint32_t mid, TCADB *adb,
321
+ const char *name, const TCLIST *args);
322
+
323
+
324
+ /* Restore an abstract database object.
325
+ `adb' specifies the abstract database object.
326
+ `path' specifies the path of the update log directory.
327
+ `ts' specifies the beginning time stamp.
328
+ `con' specifies whether consistency checking is performed.
329
+ `ulog' specifies the update log object.
330
+ If successful, the return value is true, else, it is false. */
331
+ bool tculogadbrestore(TCADB *adb, const char *path, uint64_t ts, bool con, TCULOG *ulog);
332
+
333
+
334
+ /* Redo an update log message.
335
+ `adb' specifies the abstract database object.
336
+ `ptr' specifies the pointer to the region of the message.
337
+ `size' specifies the size of the region.
338
+ `ulog' specifies the update log object.
339
+ `sid' specifies the origin server ID of the message.
340
+ `mid' specifies the master server ID of the message.
341
+ `cp' specifies the pointer to the variable into which the result of consistency checking is
342
+ assigned.
343
+ If successful, the return value is true, else, it is false. */
344
+ bool tculogadbredo(TCADB *adb, const char *ptr, int size, TCULOG *ulog,
345
+ uint32_t sid, uint32_t mid, bool *cp);
346
+
347
+
348
+ /* Create a replication object.
349
+ The return value is the new replicatoin object. */
350
+ TCREPL *tcreplnew(void);
351
+
352
+
353
+ /* Delete a replication object.
354
+ `repl' specifies the replication object. */
355
+ void tcrepldel(TCREPL *repl);
356
+
357
+
358
+ /* Open a replication object.
359
+ `repl' specifies the replication object.
360
+ `host' specifies the name or the address of the server.
361
+ `port' specifies the port number.
362
+ `sid' specifies the server ID of self messages.
363
+ If successful, the return value is true, else, it is false. */
364
+ bool tcreplopen(TCREPL *repl, const char *host, int port, uint64_t ts, uint32_t sid);
365
+
366
+
367
+ /* Close a remote database object.
368
+ `rdb' specifies the remote database object.
369
+ If successful, the return value is true, else, it is false. */
370
+ bool tcreplclose(TCREPL *repl);
371
+
372
+
373
+ /* Read a message from a replication object.
374
+ `repl' specifies the replication object.
375
+ `sp' specifies the pointer to the variable into which the size of the region of the return
376
+ value is assigned.
377
+ `tsp' specifies the pointer to the variable into which the timestamp of the next message is
378
+ assigned.
379
+ `sidp' specifies the pointer to the variable into which the origin server ID of the next
380
+ message is assigned.
381
+ If successful, the return value is the pointer to the region of the value of the next message.
382
+ `NULL' is returned if no record is to be read. Empty string is returned when the no-operation
383
+ command has been received. */
384
+ const char *tcreplread(TCREPL *repl, int *sp, uint64_t *tsp, uint32_t *sidp);
385
+
386
+
387
+
388
+ __TCULOG_CLINKAGEEND
389
+ #endif /* duplication check */
390
+
391
+
392
+ /* END OF FILE */
@@ -0,0 +1,143 @@
1
+ /*************************************************************************************************
2
+ * IDL for bindings of scripting languages
3
+ * Copyright (C) 2006-2009 Mikio Hirabayashi
4
+ * This file is part of Tokyo Tyrant.
5
+ * Tokyo Tyrant is free software; you can redistribute it and/or modify it under the terms of
6
+ * the GNU Lesser General Public License as published by the Free Software Foundation; either
7
+ * version 2.1 of the License or any later version. Tokyo Tyrant is distributed in the hope
8
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10
+ * License for more details.
11
+ * You should have received a copy of the GNU Lesser General Public License along with Tokyo
12
+ * Tyrant; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
13
+ * Boston, MA 02111-1307 USA.
14
+ *************************************************************************************************/
15
+
16
+
17
+ /**
18
+ * namespace of Tokyo Tyrant
19
+ */
20
+ module TokyoTyrant {
21
+ //----------------------------------------------------------------
22
+ // list of strings (substituted for by the native mechanism)
23
+ //----------------------------------------------------------------
24
+ interface List {
25
+ string get(in long index);
26
+ };
27
+ //----------------------------------------------------------------
28
+ // map of strings (substituted for by the native mechanism)
29
+ //----------------------------------------------------------------
30
+ interface Map {
31
+ string get(in string key);
32
+ };
33
+ //----------------------------------------------------------------
34
+ // the error codes
35
+ //----------------------------------------------------------------
36
+ interface ECODE {
37
+ const long ESUCCESS = 0;
38
+ const long EINVALID = 1;
39
+ const long ENOHOST = 2;
40
+ const long EREFUSED = 3;
41
+ const long ESEND = 4;
42
+ const long ERECV = 5;
43
+ const long EKEEP = 6;
44
+ const long ENOREC = 7;
45
+ const long EMISC = 9999;
46
+ long ecode();
47
+ string errmsg(in long ecode);
48
+ };
49
+ //----------------------------------------------------------------
50
+ // the remove database API
51
+ //----------------------------------------------------------------
52
+ interface RDB :ECODE {
53
+ const long XOLCKREC = 1 << 0;
54
+ const long XOLCKGLB = 1 << 1;
55
+ const long MONOULOG = 1 << 0;
56
+ boolean open(in string host, in long port);
57
+ boolean close();
58
+ boolean put(in string key, in string value);
59
+ boolean putkeep(in string key, in string value);
60
+ boolean putcat(in string key, in string value);
61
+ boolean putshl(in string key, in string value, in long width);
62
+ boolean putnr(in string key, in string value);
63
+ boolean out(in string key);
64
+ string get(in string key);
65
+ long mget(inout Map recs);
66
+ long vsiz(in string key);
67
+ boolean iterinit();
68
+ string iternext();
69
+ List fwmkeys(in string prefix, in long max);
70
+ long addint(in string key, in long num);
71
+ double adddouble(in string key, in double num);
72
+ string ext(in string name, in string key, in string value, in long opts);
73
+ boolean sync();
74
+ boolean optimize(in string params);
75
+ boolean vanish();
76
+ boolean copy(in string path);
77
+ long long rnum();
78
+ long long size();
79
+ string stat();
80
+ List misc(in string name, in List args, in long opts);
81
+ };
82
+ //----------------------------------------------------------------
83
+ // the table extension API
84
+ //----------------------------------------------------------------
85
+ interface RDBTBL :RDB {
86
+ const long ITLEXICAL = 0;
87
+ const long ITDECIMAL = 1;
88
+ const long ITTOKEN = 2;
89
+ const long ITQGRAM = 3;
90
+ const long ITOPT = 9998;
91
+ const long ITVOID = 9999;
92
+ const long ITKEEP = 1 << 24;
93
+ boolean put(in string pkey, in Map cols);
94
+ boolean putkeep(in string pkey, in Map cols);
95
+ boolean putcat(in string pkey, in Map cols);
96
+ boolean out(in string pkey);
97
+ Map get(in string pkey);
98
+ boolean setindex(in string name, in long type);
99
+ long long genuid();
100
+ };
101
+ interface RDBQRY {
102
+ const long QCSTREQ = 0;
103
+ const long QCSTRINC = 1;
104
+ const long QCSTRBW = 2;
105
+ const long QCSTREW = 3;
106
+ const long QCSTRAND = 4;
107
+ const long QCSTROR = 5;
108
+ const long QCSTROREQ = 6;
109
+ const long QCSTRRX = 7;
110
+ const long QCNUMEQ = 8;
111
+ const long QCNUMGT = 9;
112
+ const long QCNUMGE = 10;
113
+ const long QCNUMLT = 11;
114
+ const long QCNUMLE = 12;
115
+ const long QCNUMBT = 13;
116
+ const long QCNUMOREQ = 14;
117
+ const long QCFTSPH = 15;
118
+ const long QCFTSAND = 16;
119
+ const long QCFTSOR = 17;
120
+ const long QCFTSEX = 18;
121
+ const long QCNEGATE = 1 << 24;
122
+ const long QCNOIDX = 1 << 25;
123
+ const long QOSTRASC = 0;
124
+ const long QOSTRDESC = 1;
125
+ const long QONUMASC = 2;
126
+ const long QONUMDESC = 3;
127
+ const long MSUNION = 0;
128
+ const long MSISECT = 1;
129
+ const long MSDIFF = 2;
130
+ void addcond(in string name, in long op, in string expr);
131
+ void setorder(in string name, in long type);
132
+ void setlimit(in long max, in long skip);
133
+ List search();
134
+ boolean searchout();
135
+ string hint();
136
+ typedef sequence<RDBQRY> QueryList;
137
+ List metasearch(in QueryList qrys, in long type);
138
+ };
139
+ };
140
+
141
+
142
+
143
+ /* END OF FILE */