rroonga 7.1.1-x64-mingw32 → 9.0.2-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (980) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +3 -3
  3. data/doc/text/news.md +22 -0
  4. data/ext/groonga/extconf.rb +29 -26
  5. data/ext/groonga/rb-grn.h +3 -3
  6. data/lib/2.2/groonga.so +0 -0
  7. data/lib/2.3/groonga.so +0 -0
  8. data/lib/2.4/groonga.so +0 -0
  9. data/lib/2.5/groonga.so +0 -0
  10. data/lib/groonga/expression-builder.rb +1 -1
  11. data/lib/groonga/schema.rb +13 -0
  12. data/rroonga-build.rb +4 -11
  13. data/test/test-expression-builder.rb +8 -0
  14. data/vendor/local/bin/cv2pdb.exe +0 -0
  15. data/vendor/local/bin/generate-pdb.bat +38 -36
  16. data/vendor/local/bin/grndb.exe +0 -0
  17. data/vendor/local/bin/groonga-benchmark.exe +0 -0
  18. data/vendor/local/bin/groonga-suggest-create-dataset.exe +0 -0
  19. data/vendor/local/bin/groonga.exe +0 -0
  20. data/vendor/local/bin/libgroonga-0.dll +0 -0
  21. data/vendor/local/bin/libmecab-2.dll +0 -0
  22. data/vendor/local/bin/libmsgpackc.dll +0 -0
  23. data/vendor/local/bin/libonigmo-6.dll +0 -0
  24. data/vendor/local/bin/libpcre-1.dll +0 -0
  25. data/vendor/local/bin/libpcrecpp-0.dll +0 -0
  26. data/vendor/local/bin/libpcreposix-0.dll +0 -0
  27. data/vendor/local/bin/lz4.exe +0 -0
  28. data/vendor/local/bin/lz4c.exe +0 -0
  29. data/vendor/local/bin/{lz4cat → lz4cat.exe} +0 -0
  30. data/vendor/local/bin/mecab.exe +0 -0
  31. data/vendor/local/bin/pcre-config +1 -1
  32. data/vendor/local/bin/pcregrep.exe +0 -0
  33. data/vendor/local/bin/pcretest.exe +0 -0
  34. data/vendor/local/bin/unlz4.exe +0 -0
  35. data/vendor/local/bin/zlib1.dll +0 -0
  36. data/vendor/local/include/groonga/groonga.h +16 -1
  37. data/vendor/local/include/groonga/groonga/accessor.h +5 -1
  38. data/vendor/local/include/groonga/groonga/column.h +4 -0
  39. data/vendor/local/include/groonga/groonga/db.h +3 -1
  40. data/vendor/local/include/groonga/groonga/expr.h +5 -0
  41. data/vendor/local/include/groonga/groonga/groonga.h +124 -171
  42. data/vendor/local/include/groonga/groonga/highlighter.h +57 -0
  43. data/vendor/local/include/groonga/groonga/ii.h +2 -0
  44. data/vendor/local/include/groonga/groonga/index_column.h +31 -0
  45. data/vendor/local/include/groonga/groonga/memory.h +29 -0
  46. data/vendor/local/include/groonga/groonga/msgpack.h +50 -0
  47. data/vendor/local/include/groonga/groonga/obj.h +22 -1
  48. data/vendor/local/include/groonga/groonga/option.h +61 -0
  49. data/vendor/local/include/groonga/groonga/output.h +57 -2
  50. data/vendor/local/include/groonga/groonga/output_columns.h +38 -0
  51. data/vendor/local/include/groonga/groonga/plugin.h +5 -0
  52. data/vendor/local/include/groonga/groonga/raw_string.h +60 -0
  53. data/vendor/local/include/groonga/groonga/string.h +113 -0
  54. data/vendor/local/include/groonga/groonga/table.h +89 -1
  55. data/vendor/local/include/groonga/groonga/thread.h +15 -0
  56. data/vendor/local/include/groonga/groonga/time.h +1 -0
  57. data/vendor/local/include/groonga/groonga/token.h +60 -10
  58. data/vendor/local/include/groonga/groonga/token_cursor.h +59 -0
  59. data/vendor/local/include/groonga/groonga/token_filter.h +24 -0
  60. data/vendor/local/include/groonga/groonga/token_metadata.h +49 -0
  61. data/vendor/local/include/groonga/groonga/tokenizer.h +99 -25
  62. data/vendor/local/include/groonga/groonga/tokenizer_query_deprecated.h +50 -0
  63. data/vendor/local/include/groonga/groonga/vector.h +80 -0
  64. data/vendor/local/include/groonga/groonga/version.h +32 -0
  65. data/vendor/local/include/groonga/groonga/window_function.h +18 -8
  66. data/vendor/local/include/groonga/groonga/window_function_executor.h +68 -0
  67. data/vendor/local/include/lz4.h +504 -212
  68. data/vendor/local/include/lz4frame.h +433 -153
  69. data/vendor/local/include/lz4frame_static.h +47 -0
  70. data/vendor/local/include/lz4hc.h +281 -108
  71. data/vendor/local/include/msgpack.hpp +4 -0
  72. data/vendor/local/include/msgpack/adaptor/adaptor_base.hpp +1 -0
  73. data/vendor/local/include/msgpack/adaptor/adaptor_base_decl.hpp +1 -0
  74. data/vendor/local/include/msgpack/adaptor/array_ref_decl.hpp +1 -0
  75. data/vendor/local/include/msgpack/adaptor/boost/msgpack_variant_decl.hpp +1 -0
  76. data/vendor/local/include/msgpack/adaptor/boost/string_view.hpp +15 -0
  77. data/vendor/local/include/msgpack/adaptor/check_container_size_decl.hpp +1 -0
  78. data/vendor/local/include/msgpack/adaptor/cpp17/optional.hpp +16 -0
  79. data/vendor/local/include/msgpack/adaptor/cpp17/string_view.hpp +16 -0
  80. data/vendor/local/include/msgpack/adaptor/define_decl.hpp +2 -0
  81. data/vendor/local/include/msgpack/adaptor/ext_decl.hpp +1 -0
  82. data/vendor/local/include/msgpack/adaptor/fixint_decl.hpp +1 -0
  83. data/vendor/local/include/msgpack/adaptor/int_decl.hpp +1 -0
  84. data/vendor/local/include/msgpack/adaptor/map_decl.hpp +1 -0
  85. data/vendor/local/include/msgpack/adaptor/msgpack_tuple_decl.hpp +1 -0
  86. data/vendor/local/include/msgpack/adaptor/nil_decl.hpp +1 -0
  87. data/vendor/local/include/msgpack/adaptor/raw_decl.hpp +1 -0
  88. data/vendor/local/include/msgpack/adaptor/size_equal_only_decl.hpp +1 -0
  89. data/vendor/local/include/msgpack/adaptor/tr1/unordered_map.hpp +2 -2
  90. data/vendor/local/include/msgpack/adaptor/tr1/unordered_set.hpp +2 -2
  91. data/vendor/local/include/msgpack/adaptor/v4raw_decl.hpp +1 -0
  92. data/vendor/local/include/msgpack/cpp_config_decl.hpp +1 -0
  93. data/vendor/local/include/msgpack/create_object_visitor.hpp +17 -0
  94. data/vendor/local/include/msgpack/create_object_visitor_decl.hpp +16 -0
  95. data/vendor/local/include/msgpack/fbuffer.h +1 -1
  96. data/vendor/local/include/msgpack/fbuffer_decl.hpp +1 -0
  97. data/vendor/local/include/msgpack/gcc_atomic.hpp +0 -2
  98. data/vendor/local/include/msgpack/iterator_decl.hpp +2 -1
  99. data/vendor/local/include/msgpack/meta_decl.hpp +1 -0
  100. data/vendor/local/include/msgpack/null_visitor.hpp +17 -0
  101. data/vendor/local/include/msgpack/null_visitor_decl.hpp +16 -0
  102. data/vendor/local/include/msgpack/object.h +5 -0
  103. data/vendor/local/include/msgpack/object_decl.hpp +1 -0
  104. data/vendor/local/include/msgpack/object_fwd.hpp +1 -0
  105. data/vendor/local/include/msgpack/object_fwd_decl.hpp +1 -0
  106. data/vendor/local/include/msgpack/pack.h +1 -0
  107. data/vendor/local/include/msgpack/pack_decl.hpp +1 -0
  108. data/vendor/local/include/msgpack/parse.hpp +18 -0
  109. data/vendor/local/include/msgpack/parse_decl.hpp +16 -0
  110. data/vendor/local/include/msgpack/parse_return.hpp +17 -0
  111. data/vendor/local/include/msgpack/sbuffer_decl.hpp +1 -0
  112. data/vendor/local/include/msgpack/sysdep.h +34 -26
  113. data/vendor/local/include/msgpack/type.hpp +9 -0
  114. data/vendor/local/include/msgpack/unpack.h +12 -1
  115. data/vendor/local/include/msgpack/unpack.hpp +1 -0
  116. data/vendor/local/include/msgpack/unpack_decl.hpp +1 -0
  117. data/vendor/local/include/msgpack/unpack_exception.hpp +15 -0
  118. data/vendor/local/include/msgpack/unpack_template.h +22 -30
  119. data/vendor/local/include/msgpack/v1/adaptor/array_ref.hpp +6 -6
  120. data/vendor/local/include/msgpack/v1/adaptor/boost/fusion.hpp +49 -6
  121. data/vendor/local/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp +6 -4
  122. data/vendor/local/include/msgpack/v1/adaptor/boost/string_view.hpp +87 -0
  123. data/vendor/local/include/msgpack/v1/adaptor/carray.hpp +11 -11
  124. data/vendor/local/include/msgpack/v1/adaptor/char_ptr.hpp +1 -1
  125. data/vendor/local/include/msgpack/v1/adaptor/cpp11/array.hpp +1 -1
  126. data/vendor/local/include/msgpack/v1/adaptor/cpp11/array_char.hpp +8 -1
  127. data/vendor/local/include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp +8 -1
  128. data/vendor/local/include/msgpack/v1/adaptor/cpp11/forward_list.hpp +1 -1
  129. data/vendor/local/include/msgpack/v1/adaptor/cpp11/tuple.hpp +2 -2
  130. data/vendor/local/include/msgpack/v1/adaptor/cpp11/unordered_map.hpp +4 -4
  131. data/vendor/local/include/msgpack/v1/adaptor/cpp11/unordered_set.hpp +2 -2
  132. data/vendor/local/include/msgpack/v1/adaptor/cpp17/optional.hpp +90 -0
  133. data/vendor/local/include/msgpack/v1/adaptor/cpp17/string_view.hpp +86 -0
  134. data/vendor/local/include/msgpack/v1/adaptor/deque.hpp +1 -1
  135. data/vendor/local/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp +1088 -32
  136. data/vendor/local/include/msgpack/v1/adaptor/detail/cpp03_define_map.hpp +32 -16
  137. data/vendor/local/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +32 -32
  138. data/vendor/local/include/msgpack/v1/adaptor/detail/cpp11_convert_helper.hpp +45 -0
  139. data/vendor/local/include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp +4 -3
  140. data/vendor/local/include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp +4 -2
  141. data/vendor/local/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +2 -2
  142. data/vendor/local/include/msgpack/v1/adaptor/ext.hpp +1 -1
  143. data/vendor/local/include/msgpack/v1/adaptor/fixint.hpp +40 -24
  144. data/vendor/local/include/msgpack/v1/adaptor/float.hpp +4 -4
  145. data/vendor/local/include/msgpack/v1/adaptor/int.hpp +55 -33
  146. data/vendor/local/include/msgpack/v1/adaptor/list.hpp +1 -1
  147. data/vendor/local/include/msgpack/v1/adaptor/map.hpp +10 -10
  148. data/vendor/local/include/msgpack/v1/adaptor/pair.hpp +2 -2
  149. data/vendor/local/include/msgpack/v1/adaptor/set.hpp +2 -2
  150. data/vendor/local/include/msgpack/v1/adaptor/string.hpp +1 -1
  151. data/vendor/local/include/msgpack/v1/adaptor/tr1/unordered_map.hpp +2 -2
  152. data/vendor/local/include/msgpack/v1/adaptor/tr1/unordered_set.hpp +2 -2
  153. data/vendor/local/include/msgpack/v1/adaptor/vector.hpp +5 -5
  154. data/vendor/local/include/msgpack/v1/adaptor/vector_bool.hpp +1 -1
  155. data/vendor/local/include/msgpack/v1/adaptor/vector_char.hpp +9 -9
  156. data/vendor/local/include/msgpack/v1/adaptor/vector_unsigned_char.hpp +9 -9
  157. data/vendor/local/include/msgpack/v1/cpp_config.hpp +6 -0
  158. data/vendor/local/include/msgpack/v1/cpp_config_decl.hpp +6 -0
  159. data/vendor/local/include/msgpack/v1/detail/cpp03_zone.hpp +41 -34
  160. data/vendor/local/include/msgpack/v1/detail/cpp03_zone_decl.hpp +8 -0
  161. data/vendor/local/include/msgpack/v1/detail/cpp11_zone.hpp +25 -19
  162. data/vendor/local/include/msgpack/v1/detail/cpp11_zone_decl.hpp +8 -0
  163. data/vendor/local/include/msgpack/v1/meta.hpp +6 -0
  164. data/vendor/local/include/msgpack/v1/meta_decl.hpp +5 -0
  165. data/vendor/local/include/msgpack/v1/object.hpp +768 -393
  166. data/vendor/local/include/msgpack/v1/object_decl.hpp +11 -1
  167. data/vendor/local/include/msgpack/v1/object_fwd.hpp +4 -1
  168. data/vendor/local/include/msgpack/v1/object_fwd_decl.hpp +3 -1
  169. data/vendor/local/include/msgpack/v1/parse_return.hpp +36 -0
  170. data/vendor/local/include/msgpack/v1/unpack.hpp +39 -120
  171. data/vendor/local/include/msgpack/v1/unpack_decl.hpp +2 -9
  172. data/vendor/local/include/msgpack/v1/unpack_exception.hpp +122 -0
  173. data/vendor/local/include/msgpack/v1/vrefbuffer.hpp +2 -2
  174. data/vendor/local/include/msgpack/v2/create_object_visitor.hpp +250 -0
  175. data/vendor/local/include/msgpack/v2/create_object_visitor_decl.hpp +33 -0
  176. data/vendor/local/include/msgpack/v2/meta_decl.hpp +4 -0
  177. data/vendor/local/include/msgpack/v2/null_visitor.hpp +96 -0
  178. data/vendor/local/include/msgpack/v2/null_visitor_decl.hpp +29 -0
  179. data/vendor/local/include/msgpack/v2/object_decl.hpp +4 -0
  180. data/vendor/local/include/msgpack/v2/object_fwd.hpp +1 -1
  181. data/vendor/local/include/msgpack/v2/object_fwd_decl.hpp +2 -0
  182. data/vendor/local/include/msgpack/v2/pack_decl.hpp +1 -0
  183. data/vendor/local/include/msgpack/v2/parse.hpp +1072 -0
  184. data/vendor/local/include/msgpack/v2/parse_decl.hpp +79 -0
  185. data/vendor/local/include/msgpack/v2/parse_return.hpp +37 -0
  186. data/vendor/local/include/msgpack/v2/unpack.hpp +21 -1298
  187. data/vendor/local/include/msgpack/v2/unpack_decl.hpp +9 -45
  188. data/vendor/local/include/msgpack/v2/x3_parse.hpp +875 -0
  189. data/vendor/local/include/msgpack/v2/x3_parse_decl.hpp +36 -0
  190. data/vendor/local/include/msgpack/v2/x3_unpack.hpp +120 -0
  191. data/vendor/local/include/msgpack/v2/x3_unpack_decl.hpp +71 -0
  192. data/vendor/local/include/msgpack/v3/adaptor/adaptor_base.hpp +58 -0
  193. data/vendor/local/include/msgpack/v3/adaptor/adaptor_base_decl.hpp +52 -0
  194. data/vendor/local/include/msgpack/v3/adaptor/array_ref_decl.hpp +36 -0
  195. data/vendor/local/include/msgpack/v3/adaptor/boost/msgpack_variant_decl.hpp +42 -0
  196. data/vendor/local/include/msgpack/v3/adaptor/check_container_size_decl.hpp +39 -0
  197. data/vendor/local/include/msgpack/v3/adaptor/define_decl.hpp +23 -0
  198. data/vendor/local/include/msgpack/v3/adaptor/detail/cpp03_define_array_decl.hpp +31 -0
  199. data/vendor/local/include/msgpack/v3/adaptor/detail/cpp03_define_map_decl.hpp +31 -0
  200. data/vendor/local/include/msgpack/v3/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +43 -0
  201. data/vendor/local/include/msgpack/v3/adaptor/detail/cpp11_define_array_decl.hpp +32 -0
  202. data/vendor/local/include/msgpack/v3/adaptor/detail/cpp11_define_map_decl.hpp +31 -0
  203. data/vendor/local/include/msgpack/v3/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +59 -0
  204. data/vendor/local/include/msgpack/v3/adaptor/ext_decl.hpp +34 -0
  205. data/vendor/local/include/msgpack/v3/adaptor/fixint_decl.hpp +43 -0
  206. data/vendor/local/include/msgpack/v3/adaptor/int_decl.hpp +54 -0
  207. data/vendor/local/include/msgpack/v3/adaptor/map_decl.hpp +33 -0
  208. data/vendor/local/include/msgpack/v3/adaptor/msgpack_tuple_decl.hpp +21 -0
  209. data/vendor/local/include/msgpack/v3/adaptor/nil_decl.hpp +42 -0
  210. data/vendor/local/include/msgpack/v3/adaptor/raw_decl.hpp +33 -0
  211. data/vendor/local/include/msgpack/v3/adaptor/size_equal_only_decl.hpp +35 -0
  212. data/vendor/local/include/msgpack/v3/adaptor/v4raw_decl.hpp +34 -0
  213. data/vendor/local/include/msgpack/v3/cpp_config_decl.hpp +84 -0
  214. data/vendor/local/include/msgpack/v3/create_object_visitor_decl.hpp +33 -0
  215. data/vendor/local/include/msgpack/v3/detail/cpp03_zone_decl.hpp +31 -0
  216. data/vendor/local/include/msgpack/v3/detail/cpp11_zone_decl.hpp +31 -0
  217. data/vendor/local/include/msgpack/v3/fbuffer_decl.hpp +32 -0
  218. data/vendor/local/include/msgpack/v3/iterator_decl.hpp +33 -0
  219. data/vendor/local/include/msgpack/v3/meta_decl.hpp +50 -0
  220. data/vendor/local/include/msgpack/v3/null_visitor_decl.hpp +29 -0
  221. data/vendor/local/include/msgpack/v3/object_decl.hpp +53 -0
  222. data/vendor/local/include/msgpack/v3/object_fwd.hpp +70 -0
  223. data/vendor/local/include/msgpack/v3/object_fwd_decl.hpp +75 -0
  224. data/vendor/local/include/msgpack/v3/pack_decl.hpp +55 -0
  225. data/vendor/local/include/msgpack/v3/parse.hpp +677 -0
  226. data/vendor/local/include/msgpack/v3/parse_decl.hpp +49 -0
  227. data/vendor/local/include/msgpack/v3/parse_return.hpp +35 -0
  228. data/vendor/local/include/msgpack/v3/sbuffer_decl.hpp +33 -0
  229. data/vendor/local/include/msgpack/v3/unpack.hpp +192 -0
  230. data/vendor/local/include/msgpack/v3/unpack_decl.hpp +304 -0
  231. data/vendor/local/include/msgpack/v3/vrefbuffer_decl.hpp +29 -0
  232. data/vendor/local/include/msgpack/v3/x3_parse_decl.hpp +34 -0
  233. data/vendor/local/include/msgpack/v3/x3_unpack.hpp +97 -0
  234. data/vendor/local/include/msgpack/v3/x3_unpack_decl.hpp +65 -0
  235. data/vendor/local/include/msgpack/v3/zbuffer_decl.hpp +29 -0
  236. data/vendor/local/include/msgpack/v3/zone_decl.hpp +21 -0
  237. data/vendor/local/include/msgpack/version_master.h +2 -2
  238. data/vendor/local/include/msgpack/versioning.hpp +5 -3
  239. data/vendor/local/include/msgpack/vrefbuffer.h +1 -2
  240. data/vendor/local/include/msgpack/vrefbuffer_decl.hpp +1 -0
  241. data/vendor/local/include/msgpack/x3_parse.hpp +15 -0
  242. data/vendor/local/include/msgpack/x3_parse_decl.hpp +16 -0
  243. data/vendor/local/include/msgpack/x3_unpack.hpp +16 -0
  244. data/vendor/local/include/msgpack/x3_unpack_decl.hpp +16 -0
  245. data/vendor/local/include/msgpack/zbuffer_decl.hpp +1 -0
  246. data/vendor/local/include/msgpack/zone_decl.hpp +1 -0
  247. data/vendor/local/include/pcre.h +6 -6
  248. data/vendor/local/lib/cmake/msgpack/msgpack-config-version.cmake +46 -0
  249. data/vendor/local/lib/cmake/msgpack/msgpack-config.cmake +47 -0
  250. data/vendor/local/lib/cmake/msgpack/msgpack-targets-noconfig.cmake +29 -0
  251. data/vendor/local/lib/cmake/msgpack/msgpack-targets.cmake +101 -0
  252. data/vendor/local/lib/groonga/plugins/functions/index_column.a +0 -0
  253. data/vendor/local/lib/groonga/plugins/functions/index_column.dll +0 -0
  254. data/vendor/local/lib/groonga/plugins/functions/index_column.dll.a +0 -0
  255. data/vendor/local/lib/groonga/plugins/functions/index_column.la +1 -1
  256. data/vendor/local/lib/groonga/plugins/functions/math.a +0 -0
  257. data/vendor/local/lib/groonga/plugins/functions/math.dll +0 -0
  258. data/vendor/local/lib/groonga/plugins/functions/math.dll.a +0 -0
  259. data/vendor/local/lib/groonga/plugins/functions/math.la +1 -1
  260. data/vendor/local/lib/groonga/plugins/functions/number.a +0 -0
  261. data/vendor/local/lib/groonga/plugins/functions/number.dll +0 -0
  262. data/vendor/local/lib/groonga/plugins/functions/number.dll.a +0 -0
  263. data/vendor/local/lib/groonga/plugins/functions/number.la +1 -1
  264. data/vendor/local/lib/groonga/plugins/functions/string.a +0 -0
  265. data/vendor/local/lib/groonga/plugins/functions/string.dll +0 -0
  266. data/vendor/local/lib/groonga/plugins/functions/string.dll.a +0 -0
  267. data/vendor/local/lib/groonga/plugins/functions/string.la +1 -1
  268. data/vendor/local/lib/groonga/plugins/functions/time.a +0 -0
  269. data/vendor/local/lib/groonga/plugins/functions/time.dll +0 -0
  270. data/vendor/local/lib/groonga/plugins/functions/time.dll.a +0 -0
  271. data/vendor/local/lib/groonga/plugins/functions/time.la +1 -1
  272. data/vendor/local/lib/groonga/plugins/functions/vector.a +0 -0
  273. data/vendor/local/lib/groonga/plugins/functions/vector.dll +0 -0
  274. data/vendor/local/lib/groonga/plugins/functions/vector.dll.a +0 -0
  275. data/vendor/local/lib/groonga/plugins/functions/vector.la +1 -1
  276. data/vendor/local/lib/groonga/plugins/normalizers/mysql.a +0 -0
  277. data/vendor/local/lib/groonga/plugins/normalizers/mysql.dll +0 -0
  278. data/vendor/local/lib/groonga/plugins/normalizers/mysql.dll.a +0 -0
  279. data/vendor/local/lib/groonga/plugins/normalizers/mysql.la +2 -2
  280. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
  281. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
  282. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
  283. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.la +1 -1
  284. data/vendor/local/lib/groonga/plugins/sharding/dynamic_columns.rb +150 -19
  285. data/vendor/local/lib/groonga/plugins/sharding/logical_count.rb +123 -65
  286. data/vendor/local/lib/groonga/plugins/sharding/logical_range_filter.rb +528 -113
  287. data/vendor/local/lib/groonga/plugins/sharding/logical_select.rb +142 -40
  288. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  289. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  290. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  291. data/vendor/local/lib/groonga/plugins/suggest/suggest.la +1 -1
  292. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.a +0 -0
  293. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll +0 -0
  294. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll.a +0 -0
  295. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.la +1 -1
  296. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  297. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  298. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  299. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +1 -1
  300. data/vendor/local/lib/groonga/scripts/ruby/backtrace_entry.rb +1 -1
  301. data/vendor/local/lib/groonga/scripts/ruby/command_line/grndb.rb +64 -35
  302. data/vendor/local/lib/groonga/scripts/ruby/expression.rb +3 -1
  303. data/vendor/local/lib/groonga/scripts/ruby/expression_rewriters.rb +15 -21
  304. data/vendor/local/lib/groonga/scripts/ruby/expression_rewriters/optimizer.rb +274 -0
  305. data/vendor/local/lib/groonga/scripts/ruby/expression_tree.rb +8 -2
  306. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/assign.rb +22 -0
  307. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/assign_binary_operation.rb +24 -0
  308. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/binary_operation.rb +206 -8
  309. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/constant.rb +16 -1
  310. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/function_call.rb +30 -1
  311. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/logical_operation.rb +6 -0
  312. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/member.rb +18 -0
  313. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/null.rb +17 -0
  314. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/reference.rb +18 -0
  315. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/table.rb +14 -0
  316. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/unary_operation.rb +26 -0
  317. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/variable.rb +4 -0
  318. data/vendor/local/lib/groonga/scripts/ruby/expression_tree_builder.rb +78 -8
  319. data/vendor/local/lib/groonga/scripts/ruby/index_column.rb +10 -0
  320. data/vendor/local/lib/groonga/scripts/ruby/initialize/post.rb +2 -0
  321. data/vendor/local/lib/groonga/scripts/ruby/locale_output.rb +28 -0
  322. data/vendor/local/lib/groonga/scripts/ruby/logger.rb +36 -4
  323. data/vendor/local/lib/groonga/scripts/ruby/record.rb +1 -1
  324. data/vendor/local/lib/groonga/scripts/ruby/scan_info_builder.rb +0 -3
  325. data/vendor/local/lib/groonga/scripts/ruby/scan_info_data.rb +46 -5
  326. data/vendor/local/lib/groonga/scripts/ruby/scan_info_data_size_estimator.rb +5 -136
  327. data/vendor/local/lib/groonga/scripts/ruby/table.rb +2 -2
  328. data/vendor/local/lib/libgroonga.a +0 -0
  329. data/vendor/local/lib/libgroonga.dll.a +0 -0
  330. data/vendor/local/lib/libgroonga.la +1 -1
  331. data/vendor/local/lib/liblz4.a +0 -0
  332. data/vendor/local/lib/liblz4.dll +0 -0
  333. data/vendor/local/lib/liblz4.dll.1 +0 -0
  334. data/vendor/local/lib/{liblz4.dll.1.5.0 → liblz4.dll.1.8.2} +0 -0
  335. data/vendor/local/lib/libmecab.dll.a +0 -0
  336. data/vendor/local/lib/libmsgpackc.a +0 -0
  337. data/vendor/local/lib/libmsgpackc.dll.a +0 -0
  338. data/vendor/local/lib/libonigmo.a +0 -0
  339. data/vendor/local/lib/libonigmo.dll.a +0 -0
  340. data/vendor/local/lib/libpcre.a +0 -0
  341. data/vendor/local/lib/libpcre.dll.a +0 -0
  342. data/vendor/local/lib/libpcre.la +2 -2
  343. data/vendor/local/lib/libpcrecpp.dll.a +0 -0
  344. data/vendor/local/lib/libpcrecpp.la +1 -1
  345. data/vendor/local/lib/libpcreposix.a +0 -0
  346. data/vendor/local/lib/libpcreposix.dll.a +0 -0
  347. data/vendor/local/lib/libpcreposix.la +2 -2
  348. data/vendor/local/lib/libz.dll.a +0 -0
  349. data/vendor/local/lib/pkgconfig/groonga-normalizer-mysql.pc +1 -1
  350. data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
  351. data/vendor/local/lib/pkgconfig/liblz4.pc +3 -3
  352. data/vendor/local/lib/pkgconfig/libpcre.pc +1 -1
  353. data/vendor/local/lib/pkgconfig/libpcrecpp.pc +1 -1
  354. data/vendor/local/lib/pkgconfig/libpcreposix.pc +1 -1
  355. data/vendor/local/lib/pkgconfig/msgpack.pc +1 -1
  356. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  357. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  358. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  359. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  360. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  361. data/vendor/local/share/doc/groonga-normalizer-mysql/README.md +14 -22
  362. data/vendor/local/share/doc/groonga-normalizer-mysql/news.md +22 -2
  363. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  364. data/vendor/local/share/doc/groonga/en/html/_static/basic.css +113 -4
  365. data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +46 -19
  366. data/vendor/local/share/doc/groonga/en/html/_static/documentation_options.js +10 -0
  367. data/vendor/local/share/doc/groonga/en/html/_static/{jquery-3.1.0.js → jquery-3.2.1.js} +474 -295
  368. data/vendor/local/share/doc/groonga/en/html/_static/jquery.js +4 -4
  369. data/vendor/local/share/doc/groonga/en/html/_static/language_data.js +297 -0
  370. data/vendor/local/share/doc/groonga/en/html/_static/pygments.css +4 -0
  371. data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +69 -322
  372. data/vendor/local/share/doc/groonga/en/html/characteristic.html +16 -24
  373. data/vendor/local/share/doc/groonga/en/html/client.html +15 -23
  374. data/vendor/local/share/doc/groonga/en/html/community.html +30 -38
  375. data/vendor/local/share/doc/groonga/en/html/contribution.html +23 -31
  376. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +15 -23
  377. data/vendor/local/share/doc/groonga/en/html/contribution/development/build.html +15 -23
  378. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_autotools.html +58 -66
  379. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_cmake.html +51 -56
  380. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/windows_cmake.html +52 -56
  381. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +27 -35
  382. data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +19 -27
  383. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +26 -34
  384. data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +167 -167
  385. data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +16 -24
  386. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +28 -36
  387. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +15 -23
  388. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +15 -23
  389. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +59 -67
  390. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +31 -39
  391. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +18 -26
  392. data/vendor/local/share/doc/groonga/en/html/development.html +15 -23
  393. data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +38 -43
  394. data/vendor/local/share/doc/groonga/en/html/genindex.html +50 -28
  395. data/vendor/local/share/doc/groonga/en/html/index.html +248 -234
  396. data/vendor/local/share/doc/groonga/en/html/install.html +43 -47
  397. data/vendor/local/share/doc/groonga/en/html/install/centos.html +43 -51
  398. data/vendor/local/share/doc/groonga/en/html/install/debian.html +52 -131
  399. data/vendor/local/share/doc/groonga/en/html/install/docker.html +155 -0
  400. data/vendor/local/share/doc/groonga/en/html/install/fedora.html +41 -49
  401. data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +29 -37
  402. data/vendor/local/share/doc/groonga/en/html/install/others.html +142 -150
  403. data/vendor/local/share/doc/groonga/en/html/install/solaris.html +30 -38
  404. data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +43 -51
  405. data/vendor/local/share/doc/groonga/en/html/install/windows.html +33 -41
  406. data/vendor/local/share/doc/groonga/en/html/limitations.html +36 -42
  407. data/vendor/local/share/doc/groonga/en/html/news.html +1586 -598
  408. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +83 -83
  409. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +147 -155
  410. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +26 -34
  411. data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +225 -233
  412. data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +48 -56
  413. data/vendor/local/share/doc/groonga/en/html/news/2.x.html +378 -386
  414. data/vendor/local/share/doc/groonga/en/html/news/3.x.html +320 -328
  415. data/vendor/local/share/doc/groonga/en/html/news/4.x.html +442 -448
  416. data/vendor/local/share/doc/groonga/en/html/news/5.x.html +742 -860
  417. data/vendor/local/share/doc/groonga/en/html/news/6.x.html +544 -621
  418. data/vendor/local/share/doc/groonga/en/html/news/senna.html +32 -40
  419. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  420. data/vendor/local/share/doc/groonga/en/html/reference.html +208 -198
  421. data/vendor/local/share/doc/groonga/en/html/reference/alias.html +85 -93
  422. data/vendor/local/share/doc/groonga/en/html/reference/api.html +50 -57
  423. data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +62 -77
  424. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +117 -149
  425. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +140 -176
  426. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +43 -55
  427. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +48 -56
  428. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +194 -254
  429. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +106 -138
  430. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +62 -82
  431. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +117 -137
  432. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +74 -98
  433. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +79 -103
  434. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +40 -48
  435. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +57 -73
  436. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +75 -99
  437. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_inspect.html +495 -0
  438. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +52 -68
  439. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +291 -357
  440. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +69 -89
  441. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +47 -59
  442. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +226 -306
  443. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +120 -160
  444. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_thread.html +80 -103
  445. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +46 -58
  446. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +40 -52
  447. data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +52 -66
  448. data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +98 -122
  449. data/vendor/local/share/doc/groonga/en/html/reference/cast.html +40 -26
  450. data/vendor/local/share/doc/groonga/en/html/reference/column.html +16 -24
  451. data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +16 -24
  452. data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +30 -34
  453. data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +16 -24
  454. data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +92 -100
  455. data/vendor/local/share/doc/groonga/en/html/reference/command.html +76 -84
  456. data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +26 -34
  457. data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +64 -72
  458. data/vendor/local/share/doc/groonga/en/html/reference/command/pretty_print.html +21 -29
  459. data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +25 -33
  460. data/vendor/local/share/doc/groonga/en/html/reference/command/request_timeout.html +32 -40
  461. data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +105 -113
  462. data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +44 -50
  463. data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +85 -73
  464. data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +31 -37
  465. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_copy.html +131 -139
  466. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +370 -326
  467. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +115 -117
  468. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +38 -44
  469. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +47 -53
  470. data/vendor/local/share/doc/groonga/en/html/reference/commands/config_delete.html +40 -48
  471. data/vendor/local/share/doc/groonga/en/html/reference/commands/config_get.html +42 -50
  472. data/vendor/local/share/doc/groonga/en/html/reference/commands/config_set.html +41 -49
  473. data/vendor/local/share/doc/groonga/en/html/reference/commands/database_unmap.html +37 -45
  474. data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +71 -63
  475. data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +31 -37
  476. data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +49 -51
  477. data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +64 -71
  478. data/vendor/local/share/doc/groonga/en/html/reference/commands/io_flush.html +335 -138
  479. data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +233 -87
  480. data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_acquire.html +45 -53
  481. data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +42 -48
  482. data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_release.html +43 -51
  483. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +58 -64
  484. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +33 -38
  485. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +31 -38
  486. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +295 -218
  487. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_parameters.html +56 -64
  488. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +532 -214
  489. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_select.html +797 -388
  490. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_shard_list.html +35 -43
  491. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_table_remove.html +188 -196
  492. data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +83 -90
  493. data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +41 -48
  494. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_exist.html +41 -49
  495. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_inspect.html +401 -403
  496. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_list.html +253 -261
  497. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_remove.html +60 -68
  498. data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +36 -44
  499. data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +35 -43
  500. data/vendor/local/share/doc/groonga/en/html/reference/commands/query_expand.html +21 -29
  501. data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +22 -30
  502. data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +21 -29
  503. data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +39 -47
  504. data/vendor/local/share/doc/groonga/en/html/reference/commands/reindex.html +47 -53
  505. data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +72 -74
  506. data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +38 -45
  507. data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +38 -45
  508. data/vendor/local/share/doc/groonga/en/html/reference/commands/schema.html +330 -338
  509. data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +1545 -1194
  510. data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +57 -65
  511. data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +83 -91
  512. data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +119 -133
  513. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_copy.html +30 -38
  514. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +165 -174
  515. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +50 -50
  516. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +104 -112
  517. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_rename.html +42 -50
  518. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +49 -57
  519. data/vendor/local/share/doc/groonga/en/html/reference/commands/thread_limit.html +46 -54
  520. data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +110 -117
  521. data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +41 -48
  522. data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +40 -46
  523. data/vendor/local/share/doc/groonga/en/html/reference/configuration.html +37 -45
  524. data/vendor/local/share/doc/groonga/en/html/reference/executables.html +19 -27
  525. data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +134 -114
  526. data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +25 -31
  527. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +66 -66
  528. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +174 -182
  529. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +25 -33
  530. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +27 -35
  531. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +191 -199
  532. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +32 -40
  533. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +189 -163
  534. data/vendor/local/share/doc/groonga/en/html/reference/function.html +59 -64
  535. data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +71 -79
  536. data/vendor/local/share/doc/groonga/en/html/reference/functions/cast_loose.html +210 -0
  537. data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +49 -55
  538. data/vendor/local/share/doc/groonga/en/html/reference/functions/fuzzy_search.html +38 -46
  539. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +133 -142
  540. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +67 -73
  541. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +56 -62
  542. data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +80 -88
  543. data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +70 -78
  544. data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +56 -64
  545. data/vendor/local/share/doc/groonga/en/html/reference/functions/in_records.html +87 -94
  546. data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +54 -62
  547. data/vendor/local/share/doc/groonga/en/html/reference/functions/math_abs.html +55 -63
  548. data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +40 -48
  549. data/vendor/local/share/doc/groonga/en/html/reference/functions/number_classify.html +36 -44
  550. data/vendor/local/share/doc/groonga/en/html/reference/functions/prefix_rk_search.html +74 -82
  551. data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +152 -160
  552. data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +45 -52
  553. data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +76 -84
  554. data/vendor/local/share/doc/groonga/en/html/reference/functions/string_length.html +37 -45
  555. data/vendor/local/share/doc/groonga/en/html/reference/functions/string_substring.html +39 -47
  556. data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +76 -84
  557. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_day.html +37 -45
  558. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_day_of_week.html +278 -0
  559. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_hour.html +37 -45
  560. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_minute.html +36 -44
  561. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_month.html +36 -44
  562. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_second.html +36 -44
  563. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_week.html +36 -44
  564. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_year.html +37 -45
  565. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_find.html +368 -0
  566. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_new.html +40 -48
  567. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +54 -62
  568. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_slice.html +40 -47
  569. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +44 -52
  570. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +307 -316
  571. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +486 -492
  572. data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +44 -52
  573. data/vendor/local/share/doc/groonga/en/html/reference/log.html +128 -147
  574. data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +43 -92
  575. data/vendor/local/share/doc/groonga/en/html/reference/normalizers/normalizer_auto.html +179 -0
  576. data/vendor/local/share/doc/groonga/en/html/reference/normalizers/normalizer_nfkc100.html +897 -0
  577. data/vendor/local/share/doc/groonga/en/html/reference/normalizers/normalizer_nfkc51.html +162 -0
  578. data/vendor/local/share/doc/groonga/en/html/reference/operations.html +26 -34
  579. data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +48 -56
  580. data/vendor/local/share/doc/groonga/en/html/reference/operations/prefix_rk_search.html +47 -55
  581. data/vendor/local/share/doc/groonga/en/html/reference/output.html +47 -55
  582. data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +20 -28
  583. data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +93 -101
  584. data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +228 -225
  585. data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +59 -67
  586. data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +50 -58
  587. data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +57 -65
  588. data/vendor/local/share/doc/groonga/en/html/reference/sharding.html +76 -86
  589. data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +43 -51
  590. data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +159 -167
  591. data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +93 -101
  592. data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +85 -93
  593. data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +88 -96
  594. data/vendor/local/share/doc/groonga/en/html/reference/tables.html +142 -150
  595. data/vendor/local/share/doc/groonga/en/html/reference/token_filter/summary.html +147 -0
  596. data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +31 -223
  597. data/vendor/local/share/doc/groonga/en/html/reference/token_filters/token_filter_nfkc100.html +626 -0
  598. data/vendor/local/share/doc/groonga/en/html/reference/token_filters/token_filter_stem.html +291 -0
  599. data/vendor/local/share/doc/groonga/en/html/reference/token_filters/token_filter_stop_word.html +287 -0
  600. data/vendor/local/share/doc/groonga/en/html/reference/tokenizer/summary.html +259 -0
  601. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +42 -1455
  602. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram.html +368 -0
  603. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_ignore_blank.html +221 -0
  604. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol.html +240 -0
  605. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol_alpha.html +270 -0
  606. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol_alpha_digit.html +292 -0
  607. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_split_symbol.html +179 -0
  608. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_split_symbol_alpha.html +200 -0
  609. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_split_symbol_alpha_digit.html +212 -0
  610. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_delimit.html +357 -0
  611. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_delimit_null.html +162 -0
  612. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_mecab.html +783 -0
  613. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_regexp.html +289 -0
  614. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_trigram.html +194 -0
  615. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_unigram.html +194 -0
  616. data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +71 -79
  617. data/vendor/local/share/doc/groonga/en/html/reference/types.html +64 -72
  618. data/vendor/local/share/doc/groonga/en/html/reference/window_function.html +29 -37
  619. data/vendor/local/share/doc/groonga/en/html/reference/window_functions/record_number.html +38 -46
  620. data/vendor/local/share/doc/groonga/en/html/reference/window_functions/window_count.html +38 -46
  621. data/vendor/local/share/doc/groonga/en/html/reference/window_functions/window_record_number.html +38 -46
  622. data/vendor/local/share/doc/groonga/en/html/reference/window_functions/window_sum.html +38 -46
  623. data/vendor/local/share/doc/groonga/en/html/search.html +13 -24
  624. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  625. data/vendor/local/share/doc/groonga/en/html/server.html +15 -23
  626. data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +27 -35
  627. data/vendor/local/share/doc/groonga/en/html/server/http.html +18 -26
  628. data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +94 -102
  629. data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +15 -23
  630. data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +15 -23
  631. data/vendor/local/share/doc/groonga/en/html/server/memcached.html +18 -26
  632. data/vendor/local/share/doc/groonga/en/html/server/package.html +101 -109
  633. data/vendor/local/share/doc/groonga/en/html/spec.html +19 -27
  634. data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +207 -215
  635. data/vendor/local/share/doc/groonga/en/html/spec/search.html +39 -39
  636. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +15 -23
  637. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +46 -50
  638. data/vendor/local/share/doc/groonga/en/html/troubleshooting/how_to_analyze_error_message.html +27 -35
  639. data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +26 -31
  640. data/vendor/local/share/doc/groonga/en/html/tutorial.html +17 -25
  641. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +46 -54
  642. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +63 -71
  643. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +30 -38
  644. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +88 -97
  645. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +19 -27
  646. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +61 -69
  647. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +108 -116
  648. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +24 -32
  649. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +19 -27
  650. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +32 -40
  651. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +52 -60
  652. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  653. data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +113 -4
  654. data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +46 -19
  655. data/vendor/local/share/doc/groonga/ja/html/_static/documentation_options.js +10 -0
  656. data/vendor/local/share/doc/groonga/ja/html/_static/{jquery-3.1.0.js → jquery-3.2.1.js} +474 -295
  657. data/vendor/local/share/doc/groonga/ja/html/_static/jquery.js +4 -4
  658. data/vendor/local/share/doc/groonga/ja/html/_static/language_data.js +124 -0
  659. data/vendor/local/share/doc/groonga/ja/html/_static/pygments.css +4 -0
  660. data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +70 -150
  661. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +15 -23
  662. data/vendor/local/share/doc/groonga/ja/html/client.html +15 -23
  663. data/vendor/local/share/doc/groonga/ja/html/community.html +29 -37
  664. data/vendor/local/share/doc/groonga/ja/html/contribution.html +23 -31
  665. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +15 -23
  666. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build.html +15 -23
  667. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_autotools.html +50 -58
  668. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_cmake.html +43 -48
  669. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/windows_cmake.html +47 -51
  670. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +26 -34
  671. data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +18 -26
  672. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +23 -31
  673. data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +162 -162
  674. data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +16 -24
  675. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +26 -34
  676. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +15 -23
  677. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +15 -23
  678. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +50 -58
  679. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +28 -36
  680. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +17 -25
  681. data/vendor/local/share/doc/groonga/ja/html/development.html +15 -23
  682. data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +32 -37
  683. data/vendor/local/share/doc/groonga/ja/html/genindex.html +50 -28
  684. data/vendor/local/share/doc/groonga/ja/html/index.html +247 -233
  685. data/vendor/local/share/doc/groonga/ja/html/install.html +41 -45
  686. data/vendor/local/share/doc/groonga/ja/html/install/centos.html +44 -52
  687. data/vendor/local/share/doc/groonga/ja/html/install/debian.html +52 -121
  688. data/vendor/local/share/doc/groonga/ja/html/install/docker.html +155 -0
  689. data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +40 -48
  690. data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +28 -36
  691. data/vendor/local/share/doc/groonga/ja/html/install/others.html +116 -124
  692. data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +28 -36
  693. data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +43 -51
  694. data/vendor/local/share/doc/groonga/ja/html/install/windows.html +29 -37
  695. data/vendor/local/share/doc/groonga/ja/html/limitations.html +30 -36
  696. data/vendor/local/share/doc/groonga/ja/html/news.html +1234 -384
  697. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +82 -82
  698. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +146 -154
  699. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +25 -33
  700. data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +191 -199
  701. data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +41 -49
  702. data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +283 -291
  703. data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +229 -237
  704. data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +274 -280
  705. data/vendor/local/share/doc/groonga/ja/html/news/5.x.html +475 -593
  706. data/vendor/local/share/doc/groonga/ja/html/news/6.x.html +313 -390
  707. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +31 -39
  708. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  709. data/vendor/local/share/doc/groonga/ja/html/reference.html +208 -198
  710. data/vendor/local/share/doc/groonga/ja/html/reference/alias.html +70 -78
  711. data/vendor/local/share/doc/groonga/ja/html/reference/api.html +50 -57
  712. data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +57 -72
  713. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +107 -139
  714. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +137 -173
  715. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +40 -52
  716. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +46 -54
  717. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +184 -244
  718. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +99 -131
  719. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +57 -77
  720. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +100 -120
  721. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +71 -95
  722. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +75 -99
  723. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +37 -45
  724. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +54 -70
  725. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +71 -95
  726. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_inspect.html +487 -0
  727. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +49 -65
  728. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +286 -352
  729. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +64 -84
  730. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +44 -56
  731. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +219 -299
  732. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +116 -156
  733. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_thread.html +70 -93
  734. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +42 -54
  735. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +36 -48
  736. data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +48 -62
  737. data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +94 -118
  738. data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +39 -25
  739. data/vendor/local/share/doc/groonga/ja/html/reference/column.html +15 -23
  740. data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +15 -23
  741. data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +28 -32
  742. data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +15 -23
  743. data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +76 -84
  744. data/vendor/local/share/doc/groonga/ja/html/reference/command.html +76 -84
  745. data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +25 -33
  746. data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +51 -59
  747. data/vendor/local/share/doc/groonga/ja/html/reference/command/pretty_print.html +20 -28
  748. data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +21 -29
  749. data/vendor/local/share/doc/groonga/ja/html/reference/command/request_timeout.html +27 -35
  750. data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +101 -109
  751. data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +39 -45
  752. data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +84 -72
  753. data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +30 -36
  754. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_copy.html +104 -112
  755. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +271 -237
  756. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +100 -102
  757. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +37 -43
  758. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +41 -47
  759. data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_delete.html +38 -46
  760. data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_get.html +39 -47
  761. data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_set.html +39 -47
  762. data/vendor/local/share/doc/groonga/ja/html/reference/commands/database_unmap.html +34 -42
  763. data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +70 -62
  764. data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +30 -36
  765. data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +42 -44
  766. data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +59 -68
  767. data/vendor/local/share/doc/groonga/ja/html/reference/commands/io_flush.html +300 -126
  768. data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +212 -80
  769. data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_acquire.html +42 -50
  770. data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +40 -46
  771. data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_release.html +41 -49
  772. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +57 -63
  773. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +32 -37
  774. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +30 -37
  775. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +246 -178
  776. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_parameters.html +51 -59
  777. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +479 -175
  778. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_select.html +718 -326
  779. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_shard_list.html +34 -42
  780. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_table_remove.html +145 -153
  781. data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +78 -85
  782. data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +40 -47
  783. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_exist.html +36 -44
  784. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_inspect.html +360 -362
  785. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_list.html +221 -229
  786. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_remove.html +47 -55
  787. data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +32 -40
  788. data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +33 -41
  789. data/vendor/local/share/doc/groonga/ja/html/reference/commands/query_expand.html +20 -28
  790. data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +21 -29
  791. data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +20 -28
  792. data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +35 -43
  793. data/vendor/local/share/doc/groonga/ja/html/reference/commands/reindex.html +42 -48
  794. data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +57 -57
  795. data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +36 -43
  796. data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +36 -43
  797. data/vendor/local/share/doc/groonga/ja/html/reference/commands/schema.html +317 -325
  798. data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +1246 -917
  799. data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +50 -58
  800. data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +77 -85
  801. data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +109 -123
  802. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_copy.html +29 -37
  803. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +131 -140
  804. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +49 -49
  805. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +87 -95
  806. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_rename.html +36 -44
  807. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +44 -52
  808. data/vendor/local/share/doc/groonga/ja/html/reference/commands/thread_limit.html +38 -46
  809. data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +93 -100
  810. data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +40 -47
  811. data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +39 -45
  812. data/vendor/local/share/doc/groonga/ja/html/reference/configuration.html +36 -44
  813. data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +19 -27
  814. data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +125 -107
  815. data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +23 -29
  816. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +62 -62
  817. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +132 -140
  818. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +23 -31
  819. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +25 -33
  820. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +166 -174
  821. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +31 -39
  822. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +189 -165
  823. data/vendor/local/share/doc/groonga/ja/html/reference/function.html +59 -64
  824. data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +69 -77
  825. data/vendor/local/share/doc/groonga/ja/html/reference/functions/cast_loose.html +208 -0
  826. data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +48 -54
  827. data/vendor/local/share/doc/groonga/ja/html/reference/functions/fuzzy_search.html +37 -45
  828. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +115 -124
  829. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +66 -72
  830. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +55 -61
  831. data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +69 -77
  832. data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +60 -68
  833. data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +54 -62
  834. data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_records.html +85 -93
  835. data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +54 -62
  836. data/vendor/local/share/doc/groonga/ja/html/reference/functions/math_abs.html +54 -62
  837. data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +39 -47
  838. data/vendor/local/share/doc/groonga/ja/html/reference/functions/number_classify.html +35 -43
  839. data/vendor/local/share/doc/groonga/ja/html/reference/functions/prefix_rk_search.html +67 -75
  840. data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +130 -138
  841. data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +44 -51
  842. data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +61 -69
  843. data/vendor/local/share/doc/groonga/ja/html/reference/functions/string_length.html +36 -44
  844. data/vendor/local/share/doc/groonga/ja/html/reference/functions/string_substring.html +38 -46
  845. data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +63 -71
  846. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_day.html +36 -44
  847. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_day_of_week.html +276 -0
  848. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_hour.html +36 -44
  849. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_minute.html +35 -43
  850. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_month.html +35 -43
  851. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_second.html +35 -43
  852. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_week.html +35 -43
  853. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_year.html +36 -44
  854. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_find.html +353 -0
  855. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_new.html +39 -47
  856. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +52 -61
  857. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_slice.html +38 -46
  858. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +38 -46
  859. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +200 -208
  860. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +375 -382
  861. data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +39 -47
  862. data/vendor/local/share/doc/groonga/ja/html/reference/log.html +125 -144
  863. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +36 -70
  864. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers/normalizer_auto.html +168 -0
  865. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers/normalizer_nfkc100.html +887 -0
  866. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers/normalizer_nfkc51.html +160 -0
  867. data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +26 -34
  868. data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +38 -46
  869. data/vendor/local/share/doc/groonga/ja/html/reference/operations/prefix_rk_search.html +41 -49
  870. data/vendor/local/share/doc/groonga/ja/html/reference/output.html +42 -50
  871. data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +20 -28
  872. data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +68 -76
  873. data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +178 -184
  874. data/vendor/local/share/doc/groonga/ja/html/reference/scorer.html +38 -46
  875. data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_at_most.html +38 -46
  876. data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +39 -47
  877. data/vendor/local/share/doc/groonga/ja/html/reference/sharding.html +63 -73
  878. data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +43 -51
  879. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +130 -138
  880. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +72 -80
  881. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +68 -76
  882. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +76 -86
  883. data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +129 -137
  884. data/vendor/local/share/doc/groonga/ja/html/reference/token_filter/summary.html +145 -0
  885. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +31 -215
  886. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters/token_filter_nfkc100.html +617 -0
  887. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters/token_filter_stem.html +289 -0
  888. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters/token_filter_stop_word.html +284 -0
  889. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizer/summary.html +233 -0
  890. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +42 -1349
  891. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram.html +344 -0
  892. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_ignore_blank.html +219 -0
  893. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol.html +237 -0
  894. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol_alpha.html +267 -0
  895. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol_alpha_digit.html +287 -0
  896. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_split_symbol.html +179 -0
  897. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_split_symbol_alpha.html +199 -0
  898. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_split_symbol_alpha_digit.html +209 -0
  899. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_delimit.html +344 -0
  900. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_delimit_null.html +160 -0
  901. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_mecab.html +764 -0
  902. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_regexp.html +284 -0
  903. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_trigram.html +191 -0
  904. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_unigram.html +191 -0
  905. data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +65 -73
  906. data/vendor/local/share/doc/groonga/ja/html/reference/types.html +48 -56
  907. data/vendor/local/share/doc/groonga/ja/html/reference/window_function.html +29 -37
  908. data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/record_number.html +37 -45
  909. data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/window_count.html +37 -45
  910. data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/window_record_number.html +37 -45
  911. data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/window_sum.html +37 -45
  912. data/vendor/local/share/doc/groonga/ja/html/search.html +13 -24
  913. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  914. data/vendor/local/share/doc/groonga/ja/html/server.html +15 -23
  915. data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +22 -30
  916. data/vendor/local/share/doc/groonga/ja/html/server/http.html +17 -25
  917. data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +82 -90
  918. data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +15 -23
  919. data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +15 -23
  920. data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +16 -24
  921. data/vendor/local/share/doc/groonga/ja/html/server/package.html +99 -107
  922. data/vendor/local/share/doc/groonga/ja/html/spec.html +19 -27
  923. data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +201 -209
  924. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +36 -36
  925. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +15 -23
  926. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +44 -48
  927. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/how_to_analyze_error_message.html +21 -29
  928. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +24 -29
  929. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +16 -24
  930. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +32 -40
  931. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +62 -70
  932. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +22 -30
  933. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +77 -86
  934. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +15 -23
  935. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +56 -64
  936. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +84 -92
  937. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +20 -28
  938. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +18 -26
  939. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +21 -29
  940. data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +43 -51
  941. data/vendor/local/share/doc/pcre/AUTHORS +3 -3
  942. data/vendor/local/share/doc/pcre/ChangeLog +53 -0
  943. data/vendor/local/share/doc/pcre/LICENCE +3 -3
  944. data/vendor/local/share/doc/pcre/NEWS +6 -0
  945. data/vendor/local/share/doc/pcre/html/NON-AUTOTOOLS-BUILD.txt +8 -7
  946. data/vendor/local/share/groonga/mruby/LEGAL +35 -35
  947. data/vendor/local/share/license/cv2pdb/{README → README.MD} +28 -10
  948. data/vendor/local/share/license/groonga-normalizer-mysql/README.md +14 -22
  949. data/vendor/local/share/license/lz4/LICENSE +2 -2
  950. data/vendor/local/share/license/mruby/AUTHORS +3 -0
  951. data/vendor/local/share/license/mruby/MITL +1 -1
  952. data/vendor/local/share/license/mruby/README.md +1 -1
  953. data/vendor/local/share/license/msgpack/README.md +5 -34
  954. data/vendor/local/share/license/pcre/LICENCE +3 -3
  955. data/vendor/local/share/man/man1/lz4.1 +221 -86
  956. data/vendor/local/share/man/man1/lz4c.1 +222 -32
  957. data/vendor/local/share/man/man1/lz4cat.1 +221 -30
  958. data/vendor/local/share/man/man1/unlz4.1 +223 -0
  959. metadata +231 -87
  960. data/lib/2.1/groonga.so +0 -0
  961. data/vendor/local/lib/groonga/plugins/expression_rewriters/optimizer.rb +0 -147
  962. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/options.rb +0 -14
  963. data/vendor/local/share/doc/groonga/en/html/_static/ajax-loader.gif +0 -0
  964. data/vendor/local/share/doc/groonga/en/html/_static/comment-bright.png +0 -0
  965. data/vendor/local/share/doc/groonga/en/html/_static/comment-close.png +0 -0
  966. data/vendor/local/share/doc/groonga/en/html/_static/comment.png +0 -0
  967. data/vendor/local/share/doc/groonga/en/html/_static/down-pressed.png +0 -0
  968. data/vendor/local/share/doc/groonga/en/html/_static/down.png +0 -0
  969. data/vendor/local/share/doc/groonga/en/html/_static/up-pressed.png +0 -0
  970. data/vendor/local/share/doc/groonga/en/html/_static/up.png +0 -0
  971. data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +0 -808
  972. data/vendor/local/share/doc/groonga/ja/html/_static/ajax-loader.gif +0 -0
  973. data/vendor/local/share/doc/groonga/ja/html/_static/comment-bright.png +0 -0
  974. data/vendor/local/share/doc/groonga/ja/html/_static/comment-close.png +0 -0
  975. data/vendor/local/share/doc/groonga/ja/html/_static/comment.png +0 -0
  976. data/vendor/local/share/doc/groonga/ja/html/_static/down-pressed.png +0 -0
  977. data/vendor/local/share/doc/groonga/ja/html/_static/down.png +0 -0
  978. data/vendor/local/share/doc/groonga/ja/html/_static/up-pressed.png +0 -0
  979. data/vendor/local/share/doc/groonga/ja/html/_static/up.png +0 -0
  980. data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +0 -808
@@ -24,6 +24,14 @@
24
24
  #define MSGPACK_ZONE_ALIGN sizeof(void*)
25
25
  #endif
26
26
 
27
+ #if defined(_MSC_VER)
28
+ #define MSGPACK_ZONE_ALIGNOF(type) __alignof(type)
29
+ #else
30
+ #define MSGPACK_ZONE_ALIGNOF(type) __alignof__(type)
31
+ #endif
32
+ // For a compiler that doesn't support __alignof__:
33
+ // #define MSGPACK_ZONE_ALIGNOF(type) MSGPACK_ZONE_ALIGN
34
+
27
35
 
28
36
  namespace msgpack {
29
37
 
@@ -184,7 +184,6 @@ public:
184
184
 
185
185
  void swap(zone& o);
186
186
 
187
-
188
187
  static void* operator new(std::size_t size)
189
188
  {
190
189
  void* p = ::malloc(size);
@@ -220,44 +219,51 @@ private:
220
219
  template <typename T>
221
220
  static void object_delete(void* obj);
222
221
 
223
- void* allocate_expand(size_t size);
222
+ static char* get_aligned(char* ptr, size_t align);
223
+
224
+ char* allocate_expand(size_t size);
224
225
  };
225
226
 
226
227
  inline zone::zone(size_t chunk_size) noexcept:m_chunk_size(chunk_size), m_chunk_list(m_chunk_size)
227
228
  {
228
229
  }
229
230
 
230
- inline void* zone::allocate_align(size_t size, size_t align)
231
+ inline char* zone::get_aligned(char* ptr, size_t align)
231
232
  {
232
- char* aligned =
233
+ return
233
234
  reinterpret_cast<char*>(
234
235
  reinterpret_cast<size_t>(
235
- (m_chunk_list.m_ptr + (align - 1))) / align * align);
236
+ (ptr + (align - 1))) / align * align);
237
+ }
238
+
239
+ inline void* zone::allocate_align(size_t size, size_t align)
240
+ {
241
+ char* aligned = get_aligned(m_chunk_list.m_ptr, align);
236
242
  size_t adjusted_size = size + (aligned - m_chunk_list.m_ptr);
237
- if(m_chunk_list.m_free >= adjusted_size) {
238
- m_chunk_list.m_free -= adjusted_size;
239
- m_chunk_list.m_ptr += adjusted_size;
240
- return aligned;
243
+ if (m_chunk_list.m_free < adjusted_size) {
244
+ size_t enough_size = size + align - 1;
245
+ char* ptr = allocate_expand(enough_size);
246
+ aligned = get_aligned(ptr, align);
247
+ adjusted_size = size + (aligned - m_chunk_list.m_ptr);
241
248
  }
242
- return reinterpret_cast<char*>(
243
- reinterpret_cast<size_t>(
244
- allocate_expand(size + (align - 1))) / align * align);
249
+ m_chunk_list.m_free -= adjusted_size;
250
+ m_chunk_list.m_ptr += adjusted_size;
251
+ return aligned;
245
252
  }
246
253
 
247
254
  inline void* zone::allocate_no_align(size_t size)
248
255
  {
256
+ char* ptr = m_chunk_list.m_ptr;
249
257
  if(m_chunk_list.m_free < size) {
250
- return allocate_expand(size);
258
+ ptr = allocate_expand(size);
251
259
  }
252
-
253
- char* ptr = m_chunk_list.m_ptr;
254
260
  m_chunk_list.m_free -= size;
255
261
  m_chunk_list.m_ptr += size;
256
262
 
257
263
  return ptr;
258
264
  }
259
265
 
260
- inline void* zone::allocate_expand(size_t size)
266
+ inline char* zone::allocate_expand(size_t size)
261
267
  {
262
268
  chunk_list* const cl = &m_chunk_list;
263
269
 
@@ -279,8 +285,8 @@ inline void* zone::allocate_expand(size_t size)
279
285
 
280
286
  c->m_next = cl->m_head;
281
287
  cl->m_head = c;
282
- cl->m_free = sz - size;
283
- cl->m_ptr = ptr + size;
288
+ cl->m_free = sz;
289
+ cl->m_ptr = ptr;
284
290
 
285
291
  return ptr;
286
292
  }
@@ -329,7 +335,7 @@ inline void zone::undo_allocate(size_t size)
329
335
  template <typename T, typename... Args>
330
336
  T* zone::allocate(Args... args)
331
337
  {
332
- void* x = allocate_align(sizeof(T));
338
+ void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T));
333
339
  try {
334
340
  m_finalizer_array.push(&zone::object_destruct<T>, x);
335
341
  } catch (...) {
@@ -26,6 +26,14 @@
26
26
  #define MSGPACK_ZONE_ALIGN sizeof(void*)
27
27
  #endif
28
28
 
29
+ #if defined(_MSC_VER)
30
+ #define MSGPACK_ZONE_ALIGNOF(type) __alignof(type)
31
+ #else
32
+ #define MSGPACK_ZONE_ALIGNOF(type) __alignof__(type)
33
+ #endif
34
+ // For a compiler that doesn't support __alignof__:
35
+ // #define MSGPACK_ZONE_ALIGNOF(type) MSGPACK_ZONE_ALIGN
36
+
29
37
  namespace msgpack {
30
38
 
31
39
  /// @cond
@@ -21,11 +21,17 @@ namespace msgpack {
21
21
  MSGPACK_API_VERSION_NAMESPACE(v1) {
22
22
  /// @endcond
23
23
 
24
+
25
+
24
26
  namespace detail {
25
27
 
26
28
  template<bool...values> struct all_of_imp
27
29
  : std::is_same<bool_pack<values..., true>, bool_pack<true, values...>>{};
28
30
 
31
+ template<bool...values> struct any_of_imp {
32
+ static const bool value = !std::is_same<bool_pack<values..., false>, bool_pack<false, values...>>::value;
33
+ };
34
+
29
35
  } // namespace detail
30
36
 
31
37
  template<std::size_t... Is> struct seq {};
@@ -28,11 +28,16 @@ template<bool...> struct bool_pack;
28
28
 
29
29
  template<bool...values> struct all_of_imp;
30
30
 
31
+ template<bool...values> struct any_of_imp;
32
+
31
33
  } // namespace detail
32
34
 
33
35
  template<template <class> class T, class... U>
34
36
  using all_of = detail::all_of_imp<T<U>::value...>;
35
37
 
38
+ template<template <class> class T, class... U>
39
+ using any_of = detail::any_of_imp<(T<U>::value)...>;
40
+
36
41
  template<std::size_t... Is> struct seq;
37
42
 
38
43
  template<std::size_t N, std::size_t... Is>
@@ -11,6 +11,7 @@
11
11
  #define MSGPACK_V1_OBJECT_HPP
12
12
 
13
13
  #include "msgpack/object_decl.hpp"
14
+ #include "msgpack/adaptor/check_container_size.hpp"
14
15
 
15
16
  #include <cstring>
16
17
  #include <stdexcept>
@@ -60,7 +61,6 @@ public:
60
61
  ) :
61
62
  m_obj(obj), m_zone(msgpack::move(z)) { }
62
63
 
63
- // obsolete
64
64
  void set(msgpack::object const& obj)
65
65
  { m_obj = obj; }
66
66
 
@@ -71,6 +71,18 @@ public:
71
71
  const msgpack::object& get() const
72
72
  { return m_obj; }
73
73
 
74
+ /**
75
+ * @return object (to mimic smart pointers).
76
+ */
77
+ const msgpack::object& operator*() const
78
+ { return get(); }
79
+
80
+ /**
81
+ * @return the address of the object (to mimic smart pointers).
82
+ */
83
+ const msgpack::object* operator->() const
84
+ { return &get(); }
85
+
74
86
  /// Get unique_ptr reference of zone.
75
87
  /**
76
88
  * @return unique_ptr reference of zone
@@ -136,36 +148,461 @@ inline std::size_t add_ext_type_size<4>(std::size_t size) {
136
148
  }
137
149
 
138
150
  } // namespace detail
151
+ class object_parser {
152
+ private:
153
+ enum next_ret {
154
+ cont,
155
+ finish,
156
+ abort
157
+ };
158
+ struct elem {
159
+ elem(msgpack::object const* p, std::size_t r)
160
+ : rest(r), is_map(false), is_key(false) {
161
+ as.obj_ptr = p;
162
+ }
163
+
164
+ elem(msgpack::object_kv const* p, std::size_t r)
165
+ : rest(r), is_map(true), is_key(true) {
166
+ as.kv_ptr = p;
167
+ }
168
+
169
+ msgpack::object const& get() const {
170
+ if (is_map) {
171
+ if (is_key) {
172
+ return as.kv_ptr->key;
173
+ }
174
+ else {
175
+ return as.kv_ptr->val;
176
+ }
177
+ }
178
+ else {
179
+ return *as.obj_ptr;
180
+ }
181
+ }
182
+
183
+ template <typename Visitor>
184
+ next_ret next(Visitor& v) {
185
+ if (rest == 0) {
186
+ if (is_map) {
187
+ if (!v.end_map()) return abort;
188
+ }
189
+ else {
190
+ if (!v.end_array()) return abort;
191
+ }
192
+ return finish;
193
+ }
194
+ else {
195
+ if (is_map) {
196
+ if (is_key) {
197
+ if (!v.end_map_key()) return abort;
198
+ if (!v.start_map_value()) return abort;
199
+ is_key = false;
200
+ }
201
+ else {
202
+ if (!v.end_map_value()) return abort;
203
+ --rest;
204
+ if (rest == 0) {
205
+ if (!v.end_map()) return abort;
206
+ return finish;
207
+ }
208
+ if (!v.start_map_key()) return abort;
209
+ ++as.kv_ptr;
210
+ is_key = true;
211
+ }
212
+ }
213
+ else {
214
+ if (!v.end_array_item()) return abort;
215
+ --rest;
216
+ if (rest == 0) {
217
+ if (!v.end_array()) return abort;
218
+ return finish;
219
+ }
220
+ if (!v.start_array_item()) return abort;
221
+ ++as.obj_ptr;
222
+ }
223
+ return cont;
224
+ }
225
+ }
226
+
227
+ union {
228
+ msgpack::object const* obj_ptr;
229
+ msgpack::object_kv const* kv_ptr;
230
+ } as;
231
+ std::size_t rest;
232
+ bool is_map;
233
+ bool is_key;
234
+ };
235
+ public:
236
+ explicit object_parser(msgpack::object const& obj):m_current(&obj) {}
237
+ template <typename Visitor>
238
+ void parse(Visitor& v) {
239
+ while (true) {
240
+ bool start_collection = false;
241
+ switch(m_current->type) {
242
+ case msgpack::type::NIL:
243
+ if (!v.visit_nil()) return;
244
+ break;
245
+ case msgpack::type::BOOLEAN:
246
+ if (!v.visit_boolean(m_current->via.boolean)) return;
247
+ break;
248
+ case msgpack::type::POSITIVE_INTEGER:
249
+ if (!v.visit_positive_integer(m_current->via.u64)) return;
250
+ break;
251
+ case msgpack::type::NEGATIVE_INTEGER:
252
+ if (!v.visit_negative_integer(m_current->via.i64)) return;
253
+ break;
254
+ case msgpack::type::FLOAT32:
255
+ if (!v.visit_float32(static_cast<float>(m_current->via.f64))) return;
256
+ break;
257
+ case msgpack::type::FLOAT64:
258
+ if (!v.visit_float64(m_current->via.f64)) return;
259
+ break;
260
+ case msgpack::type::STR:
261
+ if (!v.visit_str(m_current->via.str.ptr, m_current->via.str.size)) return;
262
+ break;
263
+ case msgpack::type::BIN:
264
+ if (!v.visit_bin(m_current->via.bin.ptr, m_current->via.bin.size)) return;
265
+ break;
266
+ case msgpack::type::EXT:
267
+ msgpack::detail::check_container_size<sizeof(std::size_t)>(m_current->via.ext.size);
268
+ if (!v.visit_ext(m_current->via.ext.ptr, m_current->via.ext.size + 1)) return;
269
+ break;
270
+ case msgpack::type::ARRAY:
271
+ if (!v.start_array(m_current->via.array.size)) return;
272
+ m_ctx.push_back(elem(m_current->via.array.ptr, m_current->via.array.size));
273
+ start_collection = m_current->via.array.size != 0;
274
+ if (start_collection) {
275
+ if (!v.start_array_item()) return;
276
+ }
277
+ break;
278
+ case msgpack::type::MAP:
279
+ if (!v.start_map(m_current->via.map.size)) return;
280
+ m_ctx.push_back(elem(m_current->via.map.ptr, m_current->via.map.size));
281
+ start_collection = m_current->via.map.size != 0;
282
+ if (start_collection) {
283
+ if (!v.start_map_key()) return;
284
+ }
285
+ break;
286
+ default:
287
+ throw msgpack::type_error();
288
+ break;
289
+ }
290
+ if (m_ctx.empty()) return;
291
+ if (!start_collection) {
292
+ while (true) {
293
+ next_ret r = m_ctx.back().next(v);
294
+ if (r == finish) {
295
+ m_ctx.pop_back();
296
+ if (m_ctx.empty()) return;
297
+ }
298
+ else if (r == cont) {
299
+ break;
300
+ }
301
+ else {
302
+ // abort
303
+ return;
304
+ }
305
+ }
306
+ }
307
+ m_current = &m_ctx.back().get();
308
+ }
309
+ }
310
+ private:
311
+ msgpack::object const* m_current;
312
+ std::vector<elem> m_ctx;
313
+ };
314
+
315
+ template <typename Stream>
316
+ struct object_pack_visitor {
317
+ explicit object_pack_visitor(msgpack::packer<Stream>& pk)
318
+ :m_packer(pk) {}
319
+ bool visit_nil() {
320
+ m_packer.pack_nil();
321
+ return true;
322
+ }
323
+ bool visit_boolean(bool v) {
324
+ if (v) m_packer.pack_true();
325
+ else m_packer.pack_false();
326
+ return true;
327
+ }
328
+ bool visit_positive_integer(uint64_t v) {
329
+ m_packer.pack_uint64(v);
330
+ return true;
331
+ }
332
+ bool visit_negative_integer(int64_t v) {
333
+ m_packer.pack_int64(v);
334
+ return true;
335
+ }
336
+ bool visit_float32(float v) {
337
+ m_packer.pack_float(v);
338
+ return true;
339
+ }
340
+ bool visit_float64(double v) {
341
+ m_packer.pack_double(v);
342
+ return true;
343
+ }
344
+ bool visit_str(const char* v, uint32_t size) {
345
+ m_packer.pack_str(size);
346
+ m_packer.pack_str_body(v, size);
347
+ return true;
348
+ }
349
+ bool visit_bin(const char* v, uint32_t size) {
350
+ m_packer.pack_bin(size);
351
+ m_packer.pack_bin_body(v, size);
352
+ return true;
353
+ }
354
+ bool visit_ext(const char* v, uint32_t size) {
355
+ m_packer.pack_ext(size, *v);
356
+ m_packer.pack_ext_body(v, size);
357
+ return true;
358
+ }
359
+ bool start_array(uint32_t num_elements) {
360
+ m_packer.pack_array(num_elements);
361
+ return true;
362
+ }
363
+ bool start_array_item() {
364
+ return true;
365
+ }
366
+ bool end_array_item() {
367
+ return true;
368
+ }
369
+ bool end_array() {
370
+ return true;
371
+ }
372
+ bool start_map(uint32_t num_kv_pairs) {
373
+ m_packer.pack_array(num_kv_pairs);
374
+ return true;
375
+ }
376
+ bool start_map_key() {
377
+ return true;
378
+ }
379
+ bool end_map_key() {
380
+ return true;
381
+ }
382
+ bool start_map_value() {
383
+ return true;
384
+ }
385
+ bool end_map_value() {
386
+ return true;
387
+ }
388
+ bool end_map() {
389
+ return true;
390
+ }
391
+ private:
392
+ msgpack::packer<Stream>& m_packer;
393
+ };
394
+
395
+
396
+ struct object_stringize_visitor {
397
+ explicit object_stringize_visitor(std::ostream& os)
398
+ :m_os(os) {}
399
+ bool visit_nil() {
400
+ m_os << "null";
401
+ return true;
402
+ }
403
+ bool visit_boolean(bool v) {
404
+ if (v) m_os << "true";
405
+ else m_os << "false";
406
+ return true;
407
+ }
408
+ bool visit_positive_integer(uint64_t v) {
409
+ m_os << v;
410
+ return true;
411
+ }
412
+ bool visit_negative_integer(int64_t v) {
413
+ m_os << v;
414
+ return true;
415
+ }
416
+ bool visit_float32(float v) {
417
+ m_os << v;
418
+ return true;
419
+ }
420
+ bool visit_float64(double v) {
421
+ m_os << v;
422
+ return true;
423
+ }
424
+ bool visit_str(const char* v, uint32_t size) {
425
+ m_os << '"';
426
+ for (uint32_t i = 0; i < size; ++i) {
427
+ char c = v[i];
428
+ switch (c) {
429
+ case '\\':
430
+ m_os << "\\\\";
431
+ break;
432
+ case '"':
433
+ m_os << "\\\"";
434
+ break;
435
+ case '/':
436
+ m_os << "\\/";
437
+ break;
438
+ case '\b':
439
+ m_os << "\\b";
440
+ break;
441
+ case '\f':
442
+ m_os << "\\f";
443
+ break;
444
+ case '\n':
445
+ m_os << "\\n";
446
+ break;
447
+ case '\r':
448
+ m_os << "\\r";
449
+ break;
450
+ case '\t':
451
+ m_os << "\\t";
452
+ break;
453
+ default: {
454
+ unsigned int code = static_cast<unsigned int>(c);
455
+ if (code < 0x20 || code == 0x7f) {
456
+ std::ios::fmtflags flags(m_os.flags());
457
+ m_os << "\\u" << std::hex << std::setw(4) << std::setfill('0') << (code & 0xff);
458
+ m_os.flags(flags);
459
+ }
460
+ else {
461
+ m_os << c;
462
+ }
463
+ } break;
464
+ }
465
+ }
466
+ m_os << '"';
467
+ return true;
468
+ }
469
+ bool visit_bin(const char* v, uint32_t size) {
470
+ (m_os << '"').write(v, size) << '"';
471
+ return true;
472
+ }
473
+ bool visit_ext(const char* /*v*/, uint32_t /*size*/) {
474
+ m_os << "EXT";
475
+ return true;
476
+ }
477
+ bool start_array(uint32_t num_elements) {
478
+ m_current_size.push_back(num_elements);
479
+ m_os << "[";
480
+ return true;
481
+ }
482
+ bool start_array_item() {
483
+ return true;
484
+ }
485
+ bool end_array_item() {
486
+ --m_current_size.back();
487
+ if (m_current_size.back() != 0) {
488
+ m_os << ",";
489
+ }
490
+ return true;
491
+ }
492
+ bool end_array() {
493
+ m_current_size.pop_back();
494
+ m_os << "]";
495
+ return true;
496
+ }
497
+ bool start_map(uint32_t num_kv_pairs) {
498
+ m_current_size.push_back(num_kv_pairs);
499
+ m_os << "{";
500
+ return true;
501
+ }
502
+ bool start_map_key() {
503
+ return true;
504
+ }
505
+ bool end_map_key() {
506
+ m_os << ":";
507
+ return true;
508
+ }
509
+ bool start_map_value() {
510
+ return true;
511
+ }
512
+ bool end_map_value() {
513
+ --m_current_size.back();
514
+ if (m_current_size.back() != 0) {
515
+ m_os << ",";
516
+ }
517
+ return true;
518
+ }
519
+ bool end_map() {
520
+ m_current_size.pop_back();
521
+ m_os << "}";
522
+ return true;
523
+ }
524
+ private:
525
+ std::ostream& m_os;
526
+ std::vector<uint32_t> m_current_size;
527
+ };
528
+
529
+ struct aligned_zone_size_visitor {
530
+ explicit aligned_zone_size_visitor(std::size_t s)
531
+ :m_size(s) {}
532
+ bool visit_nil() {
533
+ return true;
534
+ }
535
+ bool visit_boolean(bool) {
536
+ return true;
537
+ }
538
+ bool visit_positive_integer(uint64_t) {
539
+ return true;
540
+ }
541
+ bool visit_negative_integer(int64_t) {
542
+ return true;
543
+ }
544
+ bool visit_float32(float) {
545
+ return true;
546
+ }
547
+ bool visit_float64(double) {
548
+ return true;
549
+ }
550
+ bool visit_str(const char*, uint32_t size) {
551
+ m_size += msgpack::aligned_size(size, MSGPACK_ZONE_ALIGNOF(char));
552
+ return true;
553
+ }
554
+ bool visit_bin(const char*, uint32_t size) {
555
+ m_size += msgpack::aligned_size(size, MSGPACK_ZONE_ALIGNOF(char));
556
+ return true;
557
+ }
558
+ bool visit_ext(const char*, uint32_t size) {
559
+ m_size += msgpack::aligned_size(size, MSGPACK_ZONE_ALIGNOF(char));
560
+ return true;
561
+ }
562
+ bool start_array(uint32_t num_elements) {
563
+ m_size += msgpack::aligned_size(
564
+ sizeof(msgpack::object) * num_elements,
565
+ MSGPACK_ZONE_ALIGNOF(msgpack::object));
566
+ return true;
567
+ }
568
+ bool start_array_item() {
569
+ return true;
570
+ }
571
+ bool end_array_item() {
572
+ return true;
573
+ }
574
+ bool end_array() {
575
+ return true;
576
+ }
577
+ bool start_map(uint32_t num_kv_pairs) {
578
+ m_size += msgpack::aligned_size(
579
+ sizeof(msgpack::object_kv) * num_kv_pairs,
580
+ MSGPACK_ZONE_ALIGNOF(msgpack::object_kv));
581
+ return true;
582
+ }
583
+ bool start_map_key() {
584
+ return true;
585
+ }
586
+ bool end_map_key() {
587
+ return true;
588
+ }
589
+ bool start_map_value() {
590
+ return true;
591
+ }
592
+ bool end_map_value() {
593
+ return true;
594
+ }
595
+ bool end_map() {
596
+ return true;
597
+ }
598
+ private:
599
+ std::size_t m_size;
600
+ };
139
601
 
140
602
  inline std::size_t aligned_zone_size(msgpack::object const& obj) {
141
603
  std::size_t s = 0;
142
- switch (obj.type) {
143
- case msgpack::type::ARRAY:
144
- s += sizeof(msgpack::object) * obj.via.array.size;
145
- for (uint32_t i = 0; i < obj.via.array.size; ++i) {
146
- s += msgpack::aligned_zone_size(obj.via.array.ptr[i]);
147
- }
148
- break;
149
- case msgpack::type::MAP:
150
- s += sizeof(msgpack::object_kv) * obj.via.map.size;
151
- for (uint32_t i = 0; i < obj.via.map.size; ++i) {
152
- s += msgpack::aligned_zone_size(obj.via.map.ptr[i].key);
153
- s += msgpack::aligned_zone_size(obj.via.map.ptr[i].val);
154
- }
155
- break;
156
- case msgpack::type::EXT:
157
- s += msgpack::aligned_size(
158
- detail::add_ext_type_size<sizeof(std::size_t)>(obj.via.ext.size));
159
- break;
160
- case msgpack::type::STR:
161
- s += msgpack::aligned_size(obj.via.str.size);
162
- break;
163
- case msgpack::type::BIN:
164
- s += msgpack::aligned_size(obj.via.bin.size);
165
- break;
166
- default:
167
- break;
168
- }
604
+ aligned_zone_size_visitor vis(s);
605
+ msgpack::object_parser(obj).parse(vis);
169
606
  return s;
170
607
  }
171
608
 
@@ -236,142 +673,158 @@ template <>
236
673
  struct pack<msgpack::object> {
237
674
  template <typename Stream>
238
675
  msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& o, msgpack::object const& v) const {
239
- switch(v.type) {
240
- case msgpack::type::NIL:
241
- o.pack_nil();
242
- return o;
243
-
244
- case msgpack::type::BOOLEAN:
245
- if(v.via.boolean) {
246
- o.pack_true();
247
- } else {
248
- o.pack_false();
249
- }
250
- return o;
251
-
252
- case msgpack::type::POSITIVE_INTEGER:
253
- o.pack_uint64(v.via.u64);
254
- return o;
255
-
256
- case msgpack::type::NEGATIVE_INTEGER:
257
- o.pack_int64(v.via.i64);
258
- return o;
259
-
260
- case msgpack::type::FLOAT:
261
- o.pack_double(v.via.f64);
262
- return o;
263
-
264
- case msgpack::type::STR:
265
- o.pack_str(v.via.str.size);
266
- o.pack_str_body(v.via.str.ptr, v.via.str.size);
267
- return o;
268
-
269
- case msgpack::type::BIN:
270
- o.pack_bin(v.via.bin.size);
271
- o.pack_bin_body(v.via.bin.ptr, v.via.bin.size);
272
- return o;
273
-
274
- case msgpack::type::EXT:
275
- o.pack_ext(v.via.ext.size, v.via.ext.type());
276
- o.pack_ext_body(v.via.ext.data(), v.via.ext.size);
277
- return o;
278
-
279
- case msgpack::type::ARRAY:
280
- o.pack_array(v.via.array.size);
281
- for(msgpack::object* p(v.via.array.ptr),
282
- * const pend(v.via.array.ptr + v.via.array.size);
283
- p < pend; ++p) {
284
- msgpack::operator<<(o, *p);
285
- }
286
- return o;
287
-
288
- case msgpack::type::MAP:
289
- o.pack_map(v.via.map.size);
290
- for(msgpack::object_kv* p(v.via.map.ptr),
291
- * const pend(v.via.map.ptr + v.via.map.size);
292
- p < pend; ++p) {
293
- msgpack::operator<<(o, p->key);
294
- msgpack::operator<<(o, p->val);
295
- }
296
- return o;
297
-
298
- default:
299
- throw msgpack::type_error();
300
- }
676
+ object_pack_visitor<Stream> vis(o);
677
+ msgpack::object_parser(v).parse(vis);
678
+ return o;
301
679
  }
302
680
  };
303
681
 
304
682
  template <>
305
683
  struct object_with_zone<msgpack::object> {
306
684
  void operator()(msgpack::object::with_zone& o, msgpack::object const& v) const {
307
- o.type = v.type;
308
-
309
- switch(v.type) {
310
- case msgpack::type::NIL:
311
- case msgpack::type::BOOLEAN:
312
- case msgpack::type::POSITIVE_INTEGER:
313
- case msgpack::type::NEGATIVE_INTEGER:
314
- case msgpack::type::FLOAT:
315
- std::memcpy(&o.via, &v.via, sizeof(v.via));
316
- return;
317
-
318
- case msgpack::type::STR: {
319
- char* ptr = static_cast<char*>(o.zone.allocate_align(v.via.str.size));
320
- o.via.str.ptr = ptr;
321
- o.via.str.size = v.via.str.size;
322
- std::memcpy(ptr, v.via.str.ptr, v.via.str.size);
323
- return;
324
- }
325
-
326
- case msgpack::type::BIN: {
327
- char* ptr = static_cast<char*>(o.zone.allocate_align(v.via.bin.size));
328
- o.via.bin.ptr = ptr;
329
- o.via.bin.size = v.via.bin.size;
330
- std::memcpy(ptr, v.via.bin.ptr, v.via.bin.size);
331
- return;
332
- }
333
-
334
- case msgpack::type::EXT: {
335
- char* ptr = static_cast<char*>(o.zone.allocate_align(v.via.ext.size + 1));
336
- o.via.ext.ptr = ptr;
337
- o.via.ext.size = v.via.ext.size;
338
- std::memcpy(ptr, v.via.ext.ptr, v.via.ext.size + 1);
339
- return;
340
- }
341
-
342
- case msgpack::type::ARRAY:
343
- o.via.array.ptr = static_cast<msgpack::object*>(o.zone.allocate_align(sizeof(msgpack::object) * v.via.array.size));
344
- o.via.array.size = v.via.array.size;
345
- for (msgpack::object
346
- * po(o.via.array.ptr),
347
- * pv(v.via.array.ptr),
348
- * const pvend(v.via.array.ptr + v.via.array.size);
349
- pv < pvend;
350
- ++po, ++pv) {
351
- new (po) msgpack::object(*pv, o.zone);
352
- }
353
- return;
354
-
355
- case msgpack::type::MAP:
356
- o.via.map.ptr = (msgpack::object_kv*)o.zone.allocate_align(sizeof(msgpack::object_kv) * v.via.map.size);
357
- o.via.map.size = v.via.map.size;
358
- for(msgpack::object_kv
359
- * po(o.via.map.ptr),
360
- * pv(v.via.map.ptr),
361
- * const pvend(v.via.map.ptr + v.via.map.size);
362
- pv < pvend;
363
- ++po, ++pv) {
364
- msgpack::object_kv* kv = new (po) msgpack::object_kv;
365
- new (&kv->key) msgpack::object(pv->key, o.zone);
366
- new (&kv->val) msgpack::object(pv->val, o.zone);
367
- }
368
- return;
369
-
370
- default:
371
- throw msgpack::type_error();
685
+ object_with_zone_visitor vis(o);
686
+ msgpack::object_parser(v).parse(vis);
687
+ }
688
+ private:
689
+ struct object_with_zone_visitor {
690
+ explicit object_with_zone_visitor(msgpack::object::with_zone& owz)
691
+ :m_zone(owz.zone), m_ptr(&owz) {
692
+ m_objs.push_back(&owz);
693
+ }
694
+ bool visit_nil() {
695
+ m_ptr->type = msgpack::type::NIL;
696
+ return true;
697
+ }
698
+ bool visit_boolean(bool v) {
699
+ m_ptr->type = msgpack::type::BOOLEAN;
700
+ m_ptr->via.boolean = v;
701
+ return true;
702
+ }
703
+ bool visit_positive_integer(uint64_t v) {
704
+ m_ptr->type = msgpack::type::POSITIVE_INTEGER;
705
+ m_ptr->via.u64 = v;
706
+ return true;
707
+ }
708
+ bool visit_negative_integer(int64_t v) {
709
+ m_ptr->type = msgpack::type::NEGATIVE_INTEGER;
710
+ m_ptr->via.i64 = v;
711
+ return true;
712
+ }
713
+ bool visit_float32(float v) {
714
+ m_ptr->type = msgpack::type::FLOAT32;
715
+ m_ptr->via.f64 = v;
716
+ return true;
717
+ }
718
+ bool visit_float64(double v) {
719
+ m_ptr->type = msgpack::type::FLOAT64;
720
+ m_ptr->via.f64 = v;
721
+ return true;
722
+ }
723
+ bool visit_str(const char* v, uint32_t size) {
724
+ m_ptr->type = msgpack::type::STR;
725
+ m_ptr->via.str.size = size;
726
+ char* ptr = static_cast<char*>(m_zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char)));
727
+ m_ptr->via.str.ptr = ptr;
728
+ std::memcpy(ptr, v, size);
729
+ return true;
372
730
  }
731
+ bool visit_bin(const char* v, uint32_t size) {
732
+ m_ptr->type = msgpack::type::BIN;
733
+ m_ptr->via.bin.size = size;
734
+ char* ptr = static_cast<char*>(m_zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char)));
735
+ m_ptr->via.bin.ptr = ptr;
736
+ std::memcpy(ptr, v, size);
737
+ return true;
738
+ }
739
+ bool visit_ext(const char* v, uint32_t size) {
740
+ m_ptr->type = msgpack::type::EXT;
373
741
 
374
- }
742
+ // v contains type but length(size) doesn't count the type byte.
743
+ // See https://github.com/msgpack/msgpack/blob/master/spec.md#ext-format-family
744
+ m_ptr->via.ext.size = size - 1;
745
+
746
+ char* ptr = static_cast<char*>(m_zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char)));
747
+ m_ptr->via.ext.ptr = ptr;
748
+ std::memcpy(ptr, v, size);
749
+ return true;
750
+ }
751
+ bool start_array(uint32_t num_elements) {
752
+ m_ptr->type = msgpack::type::ARRAY;
753
+ m_ptr->via.array.ptr = static_cast<msgpack::object*>(
754
+ m_zone.allocate_align(
755
+ sizeof(msgpack::object) * num_elements, MSGPACK_ZONE_ALIGNOF(msgpack::object)));
756
+ m_ptr->via.array.size = num_elements;
757
+ m_objs.push_back(elem(m_ptr->via.array.ptr));
758
+ return true;
759
+ }
760
+ bool start_array_item() {
761
+ m_ptr = m_objs.back().get_item();
762
+ return true;
763
+ }
764
+ bool end_array_item() {
765
+ ++m_objs.back().as.obj;
766
+ return true;
767
+ }
768
+ bool end_array() {
769
+ m_objs.pop_back();
770
+ return true;
771
+ }
772
+ bool start_map(uint32_t num_kv_pairs) {
773
+ m_ptr->type = msgpack::type::MAP;
774
+ m_ptr->via.map.ptr = (msgpack::object_kv*)m_zone.allocate_align(
775
+ sizeof(msgpack::object_kv) * num_kv_pairs, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv));
776
+ m_ptr->via.map.size = num_kv_pairs;
777
+ m_objs.push_back(elem(m_ptr->via.map.ptr));
778
+ return true;
779
+ }
780
+ bool start_map_key() {
781
+ m_ptr = m_objs.back().get_key();
782
+ return true;
783
+ }
784
+ bool end_map_key() {
785
+ return true;
786
+ }
787
+ bool start_map_value() {
788
+ m_ptr = m_objs.back().get_val();
789
+ return true;
790
+ }
791
+ bool end_map_value() {
792
+ ++m_objs.back().as.kv;
793
+ return true;
794
+ }
795
+ bool end_map() {
796
+ m_objs.pop_back();
797
+ return true;
798
+ }
799
+ private:
800
+ struct elem {
801
+ elem(msgpack::object* obj)
802
+ :is_obj(true) {
803
+ as.obj = obj;
804
+ }
805
+ elem(msgpack::object_kv* kv)
806
+ :is_obj(false) {
807
+ as.kv = kv;
808
+ }
809
+ msgpack::object* get_item() {
810
+ return as.obj;
811
+ }
812
+ msgpack::object* get_key() {
813
+ return &as.kv->key;
814
+ }
815
+ msgpack::object* get_val() {
816
+ return &as.kv->val;
817
+ }
818
+ union {
819
+ msgpack::object* obj;
820
+ msgpack::object_kv* kv;
821
+ } as;
822
+ bool is_obj;
823
+ };
824
+ std::vector<elem> m_objs;
825
+ msgpack::zone& m_zone;
826
+ msgpack::object* m_ptr;
827
+ };
375
828
  };
376
829
 
377
830
  // Adaptor functor specialization to object::with_zone
@@ -395,7 +848,6 @@ class define : public Type {
395
848
  public:
396
849
  typedef Type msgpack_type;
397
850
  typedef define<Type> define_type;
398
-
399
851
  define() {}
400
852
  define(const msgpack_type& v) : msgpack_type(v) {}
401
853
 
@@ -421,79 +873,164 @@ inline msgpack::packer<Stream>& packer<Stream>::pack(const T& v)
421
873
  return *this;
422
874
  }
423
875
 
424
- inline bool operator==(const msgpack::object& x, const msgpack::object& y)
425
- {
426
- if(x.type != y.type) { return false; }
427
-
428
- switch(x.type) {
429
- case msgpack::type::NIL:
876
+ struct object_equal_visitor {
877
+ object_equal_visitor(msgpack::object const& obj, bool& result)
878
+ :m_ptr(&obj), m_result(result) {}
879
+ bool visit_nil() {
880
+ if (m_ptr->type != msgpack::type::NIL) {
881
+ m_result = false;
882
+ return false;
883
+ }
430
884
  return true;
431
-
432
- case msgpack::type::BOOLEAN:
433
- return x.via.boolean == y.via.boolean;
434
-
435
- case msgpack::type::POSITIVE_INTEGER:
436
- return x.via.u64 == y.via.u64;
437
-
438
- case msgpack::type::NEGATIVE_INTEGER:
439
- return x.via.i64 == y.via.i64;
440
-
441
- case msgpack::type::FLOAT:
442
- return x.via.f64 == y.via.f64;
443
-
444
- case msgpack::type::STR:
445
- return x.via.str.size == y.via.str.size &&
446
- std::memcmp(x.via.str.ptr, y.via.str.ptr, x.via.str.size) == 0;
447
-
448
- case msgpack::type::BIN:
449
- return x.via.bin.size == y.via.bin.size &&
450
- std::memcmp(x.via.bin.ptr, y.via.bin.ptr, x.via.bin.size) == 0;
451
-
452
- case msgpack::type::EXT:
453
- return x.via.ext.size == y.via.ext.size &&
454
- std::memcmp(x.via.ext.ptr, y.via.ext.ptr, x.via.ext.size) == 0;
455
-
456
- case msgpack::type::ARRAY:
457
- if(x.via.array.size != y.via.array.size) {
885
+ }
886
+ bool visit_boolean(bool v) {
887
+ if (m_ptr->type != msgpack::type::BOOLEAN || m_ptr->via.boolean != v) {
888
+ m_result = false;
458
889
  return false;
459
- } else if(x.via.array.size == 0) {
460
- return true;
461
- } else {
462
- msgpack::object* px = x.via.array.ptr;
463
- msgpack::object* const pxend = x.via.array.ptr + x.via.array.size;
464
- msgpack::object* py = y.via.array.ptr;
465
- do {
466
- if(!(*px == *py)) {
467
- return false;
468
- }
469
- ++px;
470
- ++py;
471
- } while(px < pxend);
472
- return true;
473
890
  }
474
-
475
- case msgpack::type::MAP:
476
- if(x.via.map.size != y.via.map.size) {
891
+ return true;
892
+ }
893
+ bool visit_positive_integer(uint64_t v) {
894
+ if (m_ptr->type != msgpack::type::POSITIVE_INTEGER || m_ptr->via.u64 != v) {
895
+ m_result = false;
477
896
  return false;
478
- } else if(x.via.map.size == 0) {
479
- return true;
480
- } else {
481
- msgpack::object_kv* px = x.via.map.ptr;
482
- msgpack::object_kv* const pxend = x.via.map.ptr + x.via.map.size;
483
- msgpack::object_kv* py = y.via.map.ptr;
484
- do {
485
- if(!(px->key == py->key) || !(px->val == py->val)) {
486
- return false;
487
- }
488
- ++px;
489
- ++py;
490
- } while(px < pxend);
491
- return true;
492
897
  }
493
-
494
- default:
495
- return false;
898
+ return true;
899
+ }
900
+ bool visit_negative_integer(int64_t v) {
901
+ if (m_ptr->type != msgpack::type::NEGATIVE_INTEGER || m_ptr->via.i64 != v) {
902
+ m_result = false;
903
+ return false;
904
+ }
905
+ return true;
906
+ }
907
+ bool visit_float32(float v) {
908
+ if (m_ptr->type != msgpack::type::FLOAT32 || m_ptr->via.f64 != v) {
909
+ m_result = false;
910
+ return false;
911
+ }
912
+ return true;
913
+ }
914
+ bool visit_float64(double v) {
915
+ if (m_ptr->type != msgpack::type::FLOAT64 || m_ptr->via.f64 != v) {
916
+ m_result = false;
917
+ return false;
918
+ }
919
+ return true;
920
+ }
921
+ bool visit_str(const char* v, uint32_t size) {
922
+ if (m_ptr->type != msgpack::type::STR ||
923
+ m_ptr->via.str.size != size ||
924
+ std::memcmp(m_ptr->via.str.ptr, v, size) != 0) {
925
+ m_result = false;
926
+ return false;
927
+ }
928
+ return true;
496
929
  }
930
+ bool visit_bin(const char* v, uint32_t size) {
931
+ if (m_ptr->type != msgpack::type::BIN ||
932
+ m_ptr->via.bin.size != size ||
933
+ std::memcmp(m_ptr->via.bin.ptr, v, size) != 0) {
934
+ m_result = false;
935
+ return false;
936
+ }
937
+ return true;
938
+ }
939
+ bool visit_ext(const char* v, uint32_t size) {
940
+ if (m_ptr->type != msgpack::type::EXT ||
941
+ m_ptr->via.ext.size != size ||
942
+ std::memcmp(m_ptr->via.ext.ptr, v, size) != 0) {
943
+ m_result = false;
944
+ return false;
945
+ }
946
+ return true;
947
+ }
948
+ bool start_array(uint32_t num_elements) {
949
+ if (m_ptr->type != msgpack::type::ARRAY ||
950
+ m_ptr->via.array.size != num_elements) {
951
+ m_result = false;
952
+ return false;
953
+ }
954
+ m_objs.push_back(elem(m_ptr->via.array.ptr));
955
+ return true;
956
+ }
957
+ bool start_array_item() {
958
+ m_ptr = m_objs.back().get_item();
959
+ return true;
960
+ }
961
+ bool end_array_item() {
962
+ ++m_objs.back().as.obj;
963
+ return true;
964
+ }
965
+ bool end_array() {
966
+ m_objs.pop_back();
967
+ return true;
968
+ }
969
+ bool start_map(uint32_t num_kv_pairs) {
970
+ if (m_ptr->type != msgpack::type::MAP ||
971
+ m_ptr->via.array.size != num_kv_pairs) {
972
+ m_result = false;
973
+ return false;
974
+ }
975
+ m_objs.push_back(elem(m_ptr->via.map.ptr));
976
+ return true;
977
+ }
978
+ bool start_map_key() {
979
+ m_ptr = m_objs.back().get_key();
980
+ return true;
981
+ }
982
+ bool end_map_key() {
983
+ return true;
984
+ }
985
+ bool start_map_value() {
986
+ m_ptr = m_objs.back().get_val();
987
+ return true;
988
+ }
989
+ bool end_map_value() {
990
+ ++m_objs.back().as.kv;
991
+ return true;
992
+ }
993
+ bool end_map() {
994
+ m_objs.pop_back();
995
+ return true;
996
+ }
997
+ private:
998
+ struct elem {
999
+ elem(msgpack::object const* obj)
1000
+ :is_obj(true) {
1001
+ as.obj = obj;
1002
+ }
1003
+ elem(msgpack::object_kv const* kv)
1004
+ :is_obj(false) {
1005
+ as.kv = kv;
1006
+ }
1007
+ msgpack::object const* get_item() {
1008
+ return as.obj;
1009
+ }
1010
+ msgpack::object const* get_key() {
1011
+ return &as.kv->key;
1012
+ }
1013
+ msgpack::object const* get_val() {
1014
+ return &as.kv->val;
1015
+ }
1016
+ union {
1017
+ msgpack::object const* obj;
1018
+ msgpack::object_kv const* kv;
1019
+ } as;
1020
+ bool is_obj;
1021
+ };
1022
+ std::vector<elem> m_objs;
1023
+ msgpack::object const* m_ptr;
1024
+ bool& m_result;
1025
+ };
1026
+
1027
+ inline bool operator==(const msgpack::object& x, const msgpack::object& y)
1028
+ {
1029
+ if(x.type != y.type) { return false; }
1030
+ bool b = true;
1031
+ object_equal_visitor vis(y, b);
1032
+ msgpack::object_parser(x).parse(vis);
1033
+ return b;
497
1034
  }
498
1035
 
499
1036
  template <typename T>
@@ -640,7 +1177,7 @@ inline object::object(const msgpack_object& o)
640
1177
  inline void operator<< (msgpack::object& o, const msgpack_object& v)
641
1178
  {
642
1179
  // FIXME beter way?
643
- std::memcpy(&o, &v, sizeof(v));
1180
+ std::memcpy(static_cast<void*>(&o), &v, sizeof(v));
644
1181
  }
645
1182
 
646
1183
  inline object::operator msgpack_object() const
@@ -673,72 +1210,12 @@ inline void pack_copy(msgpack::packer<Stream>& o, T v)
673
1210
  pack(o, v);
674
1211
  }
675
1212
 
676
-
677
1213
  template <typename Stream>
678
1214
  inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object& v)
679
1215
  {
680
- switch(v.type) {
681
- case msgpack::type::NIL:
682
- o.pack_nil();
683
- return o;
684
-
685
- case msgpack::type::BOOLEAN:
686
- if(v.via.boolean) {
687
- o.pack_true();
688
- } else {
689
- o.pack_false();
690
- }
691
- return o;
692
-
693
- case msgpack::type::POSITIVE_INTEGER:
694
- o.pack_uint64(v.via.u64);
695
- return o;
696
-
697
- case msgpack::type::NEGATIVE_INTEGER:
698
- o.pack_int64(v.via.i64);
699
- return o;
700
-
701
- case msgpack::type::FLOAT:
702
- o.pack_double(v.via.f64);
703
- return o;
704
-
705
- case msgpack::type::STR:
706
- o.pack_str(v.via.str.size);
707
- o.pack_str_body(v.via.str.ptr, v.via.str.size);
708
- return o;
709
-
710
- case msgpack::type::BIN:
711
- o.pack_bin(v.via.bin.size);
712
- o.pack_bin_body(v.via.bin.ptr, v.via.bin.size);
713
- return o;
714
-
715
- case msgpack::type::EXT:
716
- o.pack_ext(v.via.ext.size, v.via.ext.type());
717
- o.pack_ext_body(v.via.ext.data(), v.via.ext.size);
718
- return o;
719
-
720
- case msgpack::type::ARRAY:
721
- o.pack_array(v.via.array.size);
722
- for(msgpack::object* p(v.via.array.ptr),
723
- * const pend(v.via.array.ptr + v.via.array.size);
724
- p < pend; ++p) {
725
- msgpack::operator<<(o, *p);
726
- }
727
- return o;
728
-
729
- case msgpack::type::MAP:
730
- o.pack_map(v.via.map.size);
731
- for(msgpack::object_kv* p(v.via.map.ptr),
732
- * const pend(v.via.map.ptr + v.via.map.size);
733
- p < pend; ++p) {
734
- msgpack::operator<<(o, p->key);
735
- msgpack::operator<<(o, p->val);
736
- }
737
- return o;
738
-
739
- default:
740
- throw msgpack::type_error();
741
- }
1216
+ object_pack_visitor<Stream> vis(o);
1217
+ msgpack::object_parser(v).parse(vis);
1218
+ return o;
742
1219
  }
743
1220
 
744
1221
  template <typename Stream>
@@ -747,112 +1224,10 @@ inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const ms
747
1224
  return o << static_cast<msgpack::object>(v);
748
1225
  }
749
1226
 
750
- inline std::ostream& operator<< (std::ostream& s, const msgpack::object& o)
1227
+ inline std::ostream& operator<< (std::ostream& s, const msgpack::object& v)
751
1228
  {
752
- switch(o.type) {
753
- case msgpack::type::NIL:
754
- s << "null";
755
- break;
756
-
757
- case msgpack::type::BOOLEAN:
758
- s << (o.via.boolean ? "true" : "false");
759
- break;
760
-
761
- case msgpack::type::POSITIVE_INTEGER:
762
- s << o.via.u64;
763
- break;
764
-
765
- case msgpack::type::NEGATIVE_INTEGER:
766
- s << o.via.i64;
767
- break;
768
-
769
- case msgpack::type::FLOAT:
770
- s << o.via.f64;
771
- break;
772
-
773
- case msgpack::type::STR:
774
- s << '"';
775
- for (uint32_t i = 0; i < o.via.str.size; ++i) {
776
- char c = o.via.str.ptr[i];
777
- switch (c) {
778
- case '\\':
779
- s << "\\\\";
780
- break;
781
- case '"':
782
- s << "\\\"";
783
- break;
784
- case '/':
785
- s << "\\/";
786
- break;
787
- case '\b':
788
- s << "\\b";
789
- break;
790
- case '\f':
791
- s << "\\f";
792
- break;
793
- case '\n':
794
- s << "\\n";
795
- break;
796
- case '\r':
797
- s << "\\r";
798
- break;
799
- case '\t':
800
- s << "\\t";
801
- break;
802
- default: {
803
- unsigned int code = static_cast<unsigned int>(c);
804
- if (code < 0x20 || code == 0x7f) {
805
- s << "\\u" << std::hex << std::setw(4) << std::setfill('0') << (code & 0xff);
806
- }
807
- else {
808
- s << c;
809
- }
810
- } break;
811
- }
812
- }
813
- s << '"';
814
- break;
815
-
816
- case msgpack::type::BIN:
817
- (s << '"').write(o.via.bin.ptr, o.via.bin.size) << '"';
818
- break;
819
-
820
- case msgpack::type::EXT:
821
- s << "EXT";
822
- break;
823
-
824
- case msgpack::type::ARRAY:
825
- s << "[";
826
- if(o.via.array.size != 0) {
827
- msgpack::object* p(o.via.array.ptr);
828
- s << *p;
829
- ++p;
830
- for(msgpack::object* const pend(o.via.array.ptr + o.via.array.size);
831
- p < pend; ++p) {
832
- s << ", " << *p;
833
- }
834
- }
835
- s << "]";
836
- break;
837
-
838
- case msgpack::type::MAP:
839
- s << "{";
840
- if(o.via.map.size != 0) {
841
- msgpack::object_kv* p(o.via.map.ptr);
842
- s << p->key << ':' << p->val;
843
- ++p;
844
- for(msgpack::object_kv* const pend(o.via.map.ptr + o.via.map.size);
845
- p < pend; ++p) {
846
- s << ", " << p->key << ':' << p->val;
847
- }
848
- }
849
- s << "}";
850
- break;
851
-
852
- default:
853
- // FIXME
854
- s << "#<UNKNOWN " << static_cast<uint16_t>(o.type) << ">";
855
- }
1229
+ object_stringize_visitor vis(s);
1230
+ msgpack::object_parser(v).parse(vis);
856
1231
  return s;
857
1232
  }
858
1233