rroonga 9.0.3-x86-mingw32 → 9.0.7-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (769) hide show
  1. checksums.yaml +4 -4
  2. data/doc/text/news.md +30 -0
  3. data/ext/groonga/rb-grn-context.c +27 -0
  4. data/ext/groonga/rb-grn-flushable.c +7 -0
  5. data/ext/groonga/rb-grn-index-column.c +28 -0
  6. data/ext/groonga/rb-grn-index-cursor.c +19 -0
  7. data/ext/groonga/rb-grn-logger.c +17 -3
  8. data/ext/groonga/rb-grn-object.c +236 -22
  9. data/ext/groonga/rb-grn-table.c +68 -42
  10. data/ext/groonga/rb-grn.h +1 -1
  11. data/lib/2.3/groonga.so +0 -0
  12. data/lib/2.4/groonga.so +0 -0
  13. data/lib/2.5/groonga.so +0 -0
  14. data/lib/2.6/groonga.so +0 -0
  15. data/lib/groonga/dumper.rb +3 -0
  16. data/lib/groonga/record.rb +2 -2
  17. data/test/groonga-test-utils.rb +28 -5
  18. data/test/run-test.rb +0 -2
  19. data/test/test-accessor.rb +63 -7
  20. data/test/test-context.rb +25 -0
  21. data/test/test-exception.rb +5 -0
  22. data/test/test-flushable.rb +51 -6
  23. data/test/test-index-column.rb +67 -6
  24. data/test/test-index-cursor.rb +26 -0
  25. data/test/test-logger.rb +56 -11
  26. data/test/test-plugin.rb +1 -0
  27. data/test/test-query-logger.rb +4 -3
  28. data/test/test-record.rb +2 -1
  29. data/test/test-remote.rb +40 -10
  30. data/test/test-schema-dumper.rb +13 -0
  31. data/test/test-table.rb +21 -1
  32. data/test/test-variable.rb +23 -7
  33. data/vendor/local/bin/generate-pdb.bat +21 -21
  34. data/vendor/local/bin/grndb.exe +0 -0
  35. data/vendor/local/bin/groonga-benchmark.exe +0 -0
  36. data/vendor/local/bin/groonga-suggest-create-dataset.exe +0 -0
  37. data/vendor/local/bin/groonga.exe +0 -0
  38. data/vendor/local/bin/libgroonga-0.dll +0 -0
  39. data/vendor/local/bin/libmecab-2.dll +0 -0
  40. data/vendor/local/bin/libmsgpackc.dll +0 -0
  41. data/vendor/local/bin/libonigmo-6.dll +0 -0
  42. data/vendor/local/bin/libpcre-1.dll +0 -0
  43. data/vendor/local/bin/libpcrecpp-0.dll +0 -0
  44. data/vendor/local/bin/libpcreposix-0.dll +0 -0
  45. data/vendor/local/bin/lz4.exe +0 -0
  46. data/vendor/local/bin/lz4c.exe +0 -0
  47. data/vendor/local/bin/lz4cat.exe +0 -0
  48. data/vendor/local/bin/mecab.exe +0 -0
  49. data/vendor/local/bin/pcregrep.exe +0 -0
  50. data/vendor/local/bin/pcretest.exe +0 -0
  51. data/vendor/local/bin/unlz4.exe +0 -0
  52. data/vendor/local/bin/zlib1.dll +0 -0
  53. data/vendor/local/cmake/RapidJSONConfig.cmake +3 -0
  54. data/vendor/local/cmake/RapidJSONConfigVersion.cmake +10 -0
  55. data/vendor/local/include/groonga/groonga/expr.h +16 -0
  56. data/vendor/local/include/groonga/groonga/obj.h +8 -0
  57. data/vendor/local/include/groonga/groonga/output.h +5 -0
  58. data/vendor/local/include/groonga/groonga/version.h +2 -2
  59. data/vendor/local/include/rapidjson/allocators.h +271 -0
  60. data/vendor/local/include/rapidjson/document.h +2575 -0
  61. data/vendor/local/include/rapidjson/encodedstream.h +299 -0
  62. data/vendor/local/include/rapidjson/encodings.h +716 -0
  63. data/vendor/local/include/rapidjson/error/en.h +74 -0
  64. data/vendor/local/include/rapidjson/error/error.h +155 -0
  65. data/vendor/local/include/rapidjson/filereadstream.h +99 -0
  66. data/vendor/local/include/rapidjson/filewritestream.h +104 -0
  67. data/vendor/local/include/rapidjson/fwd.h +151 -0
  68. data/vendor/local/include/rapidjson/internal/biginteger.h +290 -0
  69. data/vendor/local/include/rapidjson/internal/diyfp.h +258 -0
  70. data/vendor/local/include/rapidjson/internal/dtoa.h +245 -0
  71. data/vendor/local/include/rapidjson/internal/ieee754.h +78 -0
  72. data/vendor/local/include/rapidjson/internal/itoa.h +304 -0
  73. data/vendor/local/include/rapidjson/internal/meta.h +181 -0
  74. data/vendor/local/include/rapidjson/internal/pow10.h +55 -0
  75. data/vendor/local/include/rapidjson/internal/regex.h +701 -0
  76. data/vendor/local/include/rapidjson/internal/stack.h +230 -0
  77. data/vendor/local/include/rapidjson/internal/strfunc.h +55 -0
  78. data/vendor/local/include/rapidjson/internal/strtod.h +269 -0
  79. data/vendor/local/include/rapidjson/internal/swap.h +46 -0
  80. data/vendor/local/include/rapidjson/istreamwrapper.h +115 -0
  81. data/vendor/local/include/rapidjson/memorybuffer.h +70 -0
  82. data/vendor/local/include/rapidjson/memorystream.h +71 -0
  83. data/vendor/local/include/rapidjson/msinttypes/inttypes.h +316 -0
  84. data/vendor/local/include/rapidjson/msinttypes/stdint.h +300 -0
  85. data/vendor/local/include/rapidjson/ostreamwrapper.h +81 -0
  86. data/vendor/local/include/rapidjson/pointer.h +1358 -0
  87. data/vendor/local/include/rapidjson/prettywriter.h +255 -0
  88. data/vendor/local/include/rapidjson/rapidjson.h +615 -0
  89. data/vendor/local/include/rapidjson/reader.h +1879 -0
  90. data/vendor/local/include/rapidjson/schema.h +2006 -0
  91. data/vendor/local/include/rapidjson/stream.h +179 -0
  92. data/vendor/local/include/rapidjson/stringbuffer.h +117 -0
  93. data/vendor/local/include/rapidjson/writer.h +610 -0
  94. data/vendor/local/lib/groonga/plugins/functions/index_column.a +0 -0
  95. data/vendor/local/lib/groonga/plugins/functions/index_column.dll +0 -0
  96. data/vendor/local/lib/groonga/plugins/functions/index_column.dll.a +0 -0
  97. data/vendor/local/lib/groonga/plugins/functions/index_column.la +1 -1
  98. data/vendor/local/lib/groonga/plugins/functions/math.a +0 -0
  99. data/vendor/local/lib/groonga/plugins/functions/math.dll +0 -0
  100. data/vendor/local/lib/groonga/plugins/functions/math.dll.a +0 -0
  101. data/vendor/local/lib/groonga/plugins/functions/math.la +1 -1
  102. data/vendor/local/lib/groonga/plugins/functions/number.a +0 -0
  103. data/vendor/local/lib/groonga/plugins/functions/number.dll +0 -0
  104. data/vendor/local/lib/groonga/plugins/functions/number.dll.a +0 -0
  105. data/vendor/local/lib/groonga/plugins/functions/number.la +1 -1
  106. data/vendor/local/lib/groonga/plugins/functions/string.a +0 -0
  107. data/vendor/local/lib/groonga/plugins/functions/string.dll +0 -0
  108. data/vendor/local/lib/groonga/plugins/functions/string.dll.a +0 -0
  109. data/vendor/local/lib/groonga/plugins/functions/string.la +1 -1
  110. data/vendor/local/lib/groonga/plugins/functions/time.a +0 -0
  111. data/vendor/local/lib/groonga/plugins/functions/time.dll +0 -0
  112. data/vendor/local/lib/groonga/plugins/functions/time.dll.a +0 -0
  113. data/vendor/local/lib/groonga/plugins/functions/time.la +1 -1
  114. data/vendor/local/lib/groonga/plugins/functions/vector.a +0 -0
  115. data/vendor/local/lib/groonga/plugins/functions/vector.dll +0 -0
  116. data/vendor/local/lib/groonga/plugins/functions/vector.dll.a +0 -0
  117. data/vendor/local/lib/groonga/plugins/functions/vector.la +1 -1
  118. data/vendor/local/lib/groonga/plugins/normalizers/mysql.a +0 -0
  119. data/vendor/local/lib/groonga/plugins/normalizers/mysql.dll +0 -0
  120. data/vendor/local/lib/groonga/plugins/normalizers/mysql.dll.a +0 -0
  121. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
  122. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
  123. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
  124. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.la +1 -1
  125. data/vendor/local/lib/groonga/plugins/sharding/dynamic_columns.rb +44 -18
  126. data/vendor/local/lib/groonga/plugins/sharding/logical_count.rb +9 -8
  127. data/vendor/local/lib/groonga/plugins/sharding/logical_range_filter.rb +48 -15
  128. data/vendor/local/lib/groonga/plugins/sharding/logical_select.rb +84 -58
  129. data/vendor/local/lib/groonga/plugins/sharding/range_expression_builder.rb +1 -1
  130. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  131. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  132. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  133. data/vendor/local/lib/groonga/plugins/suggest/suggest.la +1 -1
  134. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.a +0 -0
  135. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll +0 -0
  136. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll.a +0 -0
  137. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.la +1 -1
  138. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  139. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  140. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  141. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +1 -1
  142. data/vendor/local/lib/groonga/scripts/ruby/command.rb +3 -4
  143. data/vendor/local/lib/groonga/scripts/ruby/command_line/grndb.rb +267 -77
  144. data/vendor/local/lib/groonga/scripts/ruby/command_line_parser.rb +96 -0
  145. data/vendor/local/lib/groonga/scripts/ruby/expression_rewriters/optimizer.rb +1 -1
  146. data/vendor/local/lib/groonga/scripts/ruby/expression_tree/binary_operation.rb +30 -7
  147. data/vendor/local/lib/groonga/scripts/ruby/initialize/pre.rb +5 -0
  148. data/vendor/local/lib/groonga/scripts/ruby/loggable.rb +8 -0
  149. data/vendor/local/lib/groonga/scripts/ruby/logger/flags.rb +70 -0
  150. data/vendor/local/lib/groonga/scripts/ruby/query_loggable.rb +8 -0
  151. data/vendor/local/lib/groonga/scripts/ruby/scan_info_builder.rb +1 -1
  152. data/vendor/local/lib/groonga/scripts/ruby/scan_info_data.rb +2 -2
  153. data/vendor/local/lib/groonga/scripts/ruby/time.rb +9 -0
  154. data/vendor/local/lib/libgroonga.a +0 -0
  155. data/vendor/local/lib/libgroonga.dll.a +0 -0
  156. data/vendor/local/lib/libgroonga.la +1 -1
  157. data/vendor/local/lib/liblz4.dll +0 -0
  158. data/vendor/local/lib/liblz4.dll.1 +0 -0
  159. data/vendor/local/lib/liblz4.dll.1.8.2 +0 -0
  160. data/vendor/local/lib/libmecab.dll.a +0 -0
  161. data/vendor/local/lib/libmsgpackc.dll.a +0 -0
  162. data/vendor/local/lib/libonigmo.a +0 -0
  163. data/vendor/local/lib/libonigmo.dll.a +0 -0
  164. data/vendor/local/lib/libonigmo.la +1 -1
  165. data/vendor/local/lib/libpcre.dll.a +0 -0
  166. data/vendor/local/lib/libpcrecpp.dll.a +0 -0
  167. data/vendor/local/lib/libpcreposix.dll.a +0 -0
  168. data/vendor/local/lib/libz.dll.a +0 -0
  169. data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
  170. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  171. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  172. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  173. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  174. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  175. data/vendor/local/share/doc/RapidJSON/examples/CMakeLists.txt +42 -0
  176. data/vendor/local/share/doc/RapidJSON/examples/capitalize/capitalize.cpp +67 -0
  177. data/vendor/local/share/doc/RapidJSON/examples/condense/condense.cpp +32 -0
  178. data/vendor/local/share/doc/RapidJSON/examples/filterkey/filterkey.cpp +135 -0
  179. data/vendor/local/share/doc/RapidJSON/examples/filterkeydom/filterkeydom.cpp +170 -0
  180. data/vendor/local/share/doc/RapidJSON/examples/jsonx/jsonx.cpp +207 -0
  181. data/vendor/local/share/doc/RapidJSON/examples/messagereader/messagereader.cpp +105 -0
  182. data/vendor/local/share/doc/RapidJSON/examples/parsebyparts/parsebyparts.cpp +173 -0
  183. data/vendor/local/share/doc/RapidJSON/examples/pretty/pretty.cpp +30 -0
  184. data/vendor/local/share/doc/RapidJSON/examples/prettyauto/prettyauto.cpp +56 -0
  185. data/vendor/local/share/doc/RapidJSON/examples/schemavalidator/schemavalidator.cpp +72 -0
  186. data/vendor/local/share/doc/RapidJSON/examples/serialize/serialize.cpp +173 -0
  187. data/vendor/local/share/doc/RapidJSON/examples/simpledom/simpledom.cpp +29 -0
  188. data/vendor/local/share/doc/RapidJSON/examples/simplereader/simplereader.cpp +42 -0
  189. data/vendor/local/share/doc/RapidJSON/examples/simplewriter/simplewriter.cpp +36 -0
  190. data/vendor/local/share/doc/RapidJSON/examples/tutorial/tutorial.cpp +151 -0
  191. data/vendor/local/share/doc/RapidJSON/readme.md +160 -0
  192. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  193. data/vendor/local/share/doc/groonga/en/html/_static/documentation_options.js +1 -1
  194. data/vendor/local/share/doc/groonga/en/html/characteristic.html +3 -3
  195. data/vendor/local/share/doc/groonga/en/html/client.html +3 -3
  196. data/vendor/local/share/doc/groonga/en/html/community.html +3 -3
  197. data/vendor/local/share/doc/groonga/en/html/contribution.html +3 -3
  198. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +3 -3
  199. data/vendor/local/share/doc/groonga/en/html/contribution/development/build.html +3 -3
  200. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_autotools.html +3 -3
  201. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_cmake.html +3 -3
  202. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/windows_cmake.html +3 -3
  203. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +3 -3
  204. data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +3 -3
  205. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +3 -3
  206. data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +3 -3
  207. data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +3 -3
  208. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +3 -3
  209. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +3 -3
  210. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +3 -3
  211. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +3 -3
  212. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +3 -3
  213. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +3 -3
  214. data/vendor/local/share/doc/groonga/en/html/development.html +3 -3
  215. data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +3 -3
  216. data/vendor/local/share/doc/groonga/en/html/genindex.html +3 -3
  217. data/vendor/local/share/doc/groonga/en/html/index.html +11 -7
  218. data/vendor/local/share/doc/groonga/en/html/install.html +5 -4
  219. data/vendor/local/share/doc/groonga/en/html/install/centos.html +6 -6
  220. data/vendor/local/share/doc/groonga/en/html/install/debian.html +79 -8
  221. data/vendor/local/share/doc/groonga/en/html/install/docker.html +3 -3
  222. data/vendor/local/share/doc/groonga/en/html/install/fedora.html +6 -6
  223. data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +6 -6
  224. data/vendor/local/share/doc/groonga/en/html/install/others.html +6 -6
  225. data/vendor/local/share/doc/groonga/en/html/install/solaris.html +6 -6
  226. data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +6 -6
  227. data/vendor/local/share/doc/groonga/en/html/install/windows.html +12 -12
  228. data/vendor/local/share/doc/groonga/en/html/limitations.html +3 -3
  229. data/vendor/local/share/doc/groonga/en/html/news.html +498 -206
  230. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +3 -3
  231. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +3 -3
  232. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +3 -3
  233. data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +3 -3
  234. data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +3 -3
  235. data/vendor/local/share/doc/groonga/en/html/news/2.x.html +3 -3
  236. data/vendor/local/share/doc/groonga/en/html/news/3.x.html +3 -3
  237. data/vendor/local/share/doc/groonga/en/html/news/4.x.html +3 -3
  238. data/vendor/local/share/doc/groonga/en/html/news/5.x.html +3 -3
  239. data/vendor/local/share/doc/groonga/en/html/news/6.x.html +3 -3
  240. data/vendor/local/share/doc/groonga/en/html/news/senna.html +3 -3
  241. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  242. data/vendor/local/share/doc/groonga/en/html/reference.html +9 -6
  243. data/vendor/local/share/doc/groonga/en/html/reference/alias.html +3 -3
  244. data/vendor/local/share/doc/groonga/en/html/reference/api.html +3 -3
  245. data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +3 -3
  246. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +3 -3
  247. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +3 -3
  248. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +3 -3
  249. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +3 -3
  250. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +3 -3
  251. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +3 -3
  252. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +3 -3
  253. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +3 -3
  254. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +3 -3
  255. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +3 -3
  256. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +3 -3
  257. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +3 -3
  258. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +3 -3
  259. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_inspect.html +3 -3
  260. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +3 -3
  261. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +3 -3
  262. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +3 -3
  263. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +3 -3
  264. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +3 -3
  265. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +3 -3
  266. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_thread.html +3 -3
  267. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +3 -3
  268. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +3 -3
  269. data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +3 -3
  270. data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +3 -3
  271. data/vendor/local/share/doc/groonga/en/html/reference/cast.html +3 -3
  272. data/vendor/local/share/doc/groonga/en/html/reference/column.html +3 -3
  273. data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +3 -3
  274. data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +3 -3
  275. data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +3 -3
  276. data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +3 -3
  277. data/vendor/local/share/doc/groonga/en/html/reference/command.html +3 -3
  278. data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +3 -3
  279. data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +3 -3
  280. data/vendor/local/share/doc/groonga/en/html/reference/command/pretty_print.html +3 -3
  281. data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +3 -3
  282. data/vendor/local/share/doc/groonga/en/html/reference/command/request_timeout.html +3 -3
  283. data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +3 -3
  284. data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +3 -3
  285. data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +3 -3
  286. data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +3 -3
  287. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_copy.html +3 -3
  288. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +3 -3
  289. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +3 -3
  290. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +3 -3
  291. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +3 -3
  292. data/vendor/local/share/doc/groonga/en/html/reference/commands/config_delete.html +3 -3
  293. data/vendor/local/share/doc/groonga/en/html/reference/commands/config_get.html +3 -3
  294. data/vendor/local/share/doc/groonga/en/html/reference/commands/config_set.html +3 -3
  295. data/vendor/local/share/doc/groonga/en/html/reference/commands/database_unmap.html +3 -3
  296. data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +3 -3
  297. data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +3 -3
  298. data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +3 -3
  299. data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +3 -3
  300. data/vendor/local/share/doc/groonga/en/html/reference/commands/io_flush.html +3 -3
  301. data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +3 -3
  302. data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_acquire.html +3 -3
  303. data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +3 -3
  304. data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_release.html +3 -3
  305. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +3 -3
  306. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +3 -3
  307. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +3 -3
  308. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +3 -3
  309. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_parameters.html +3 -3
  310. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +77 -4
  311. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_select.html +3 -3
  312. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_shard_list.html +3 -3
  313. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_table_remove.html +3 -3
  314. data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +3 -3
  315. data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +3 -3
  316. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_exist.html +3 -3
  317. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_inspect.html +78 -54
  318. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_list.html +3 -3
  319. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_remove.html +3 -3
  320. data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +3 -3
  321. data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +3 -3
  322. data/vendor/local/share/doc/groonga/en/html/reference/commands/query_expand.html +3 -3
  323. data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +3 -3
  324. data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +3 -3
  325. data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +3 -3
  326. data/vendor/local/share/doc/groonga/en/html/reference/commands/reindex.html +3 -3
  327. data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +3 -3
  328. data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +3 -3
  329. data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +3 -3
  330. data/vendor/local/share/doc/groonga/en/html/reference/commands/schema.html +3 -3
  331. data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +3 -3
  332. data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +3 -3
  333. data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +3 -3
  334. data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +3 -3
  335. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_copy.html +3 -3
  336. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +3 -3
  337. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +3 -3
  338. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +3 -3
  339. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_rename.html +3 -3
  340. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +3 -3
  341. data/vendor/local/share/doc/groonga/en/html/reference/commands/thread_limit.html +3 -3
  342. data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +3 -3
  343. data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +3 -3
  344. data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +3 -3
  345. data/vendor/local/share/doc/groonga/en/html/reference/configuration.html +6 -6
  346. data/vendor/local/share/doc/groonga/en/html/reference/executables.html +3 -3
  347. data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +58 -4
  348. data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +3 -3
  349. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +3 -3
  350. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +3 -3
  351. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +3 -3
  352. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +3 -3
  353. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +3 -3
  354. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +3 -3
  355. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +3 -3
  356. data/vendor/local/share/doc/groonga/en/html/reference/function.html +3 -3
  357. data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +3 -3
  358. data/vendor/local/share/doc/groonga/en/html/reference/functions/cast_loose.html +3 -3
  359. data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +3 -3
  360. data/vendor/local/share/doc/groonga/en/html/reference/functions/fuzzy_search.html +3 -3
  361. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +11 -19
  362. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +3 -3
  363. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +3 -3
  364. data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +3 -3
  365. data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +3 -3
  366. data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +3 -3
  367. data/vendor/local/share/doc/groonga/en/html/reference/functions/in_records.html +3 -3
  368. data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +3 -3
  369. data/vendor/local/share/doc/groonga/en/html/reference/functions/math_abs.html +3 -3
  370. data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +3 -3
  371. data/vendor/local/share/doc/groonga/en/html/reference/functions/number_classify.html +3 -3
  372. data/vendor/local/share/doc/groonga/en/html/reference/functions/prefix_rk_search.html +3 -3
  373. data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +3 -3
  374. data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +3 -3
  375. data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +3 -3
  376. data/vendor/local/share/doc/groonga/en/html/reference/functions/string_length.html +3 -3
  377. data/vendor/local/share/doc/groonga/en/html/reference/functions/string_substring.html +3 -3
  378. data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +3 -3
  379. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_day.html +3 -3
  380. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_day_of_week.html +3 -3
  381. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_hour.html +3 -3
  382. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_minute.html +3 -3
  383. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_month.html +3 -3
  384. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_second.html +3 -3
  385. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_week.html +3 -3
  386. data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_year.html +3 -3
  387. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_find.html +3 -3
  388. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_new.html +3 -3
  389. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +3 -3
  390. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_slice.html +3 -3
  391. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +3 -3
  392. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +3 -3
  393. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +3 -3
  394. data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +3 -3
  395. data/vendor/local/share/doc/groonga/en/html/reference/log.html +3 -3
  396. data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +3 -3
  397. data/vendor/local/share/doc/groonga/en/html/reference/normalizers/normalizer_auto.html +3 -3
  398. data/vendor/local/share/doc/groonga/en/html/reference/normalizers/normalizer_nfkc100.html +3 -3
  399. data/vendor/local/share/doc/groonga/en/html/reference/normalizers/normalizer_nfkc51.html +3 -3
  400. data/vendor/local/share/doc/groonga/en/html/reference/operations.html +3 -3
  401. data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +3 -3
  402. data/vendor/local/share/doc/groonga/en/html/reference/operations/prefix_rk_search.html +3 -3
  403. data/vendor/local/share/doc/groonga/en/html/reference/output.html +3 -3
  404. data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +3 -3
  405. data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +3 -3
  406. data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +3 -3
  407. data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +3 -3
  408. data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +3 -3
  409. data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +3 -3
  410. data/vendor/local/share/doc/groonga/en/html/reference/sharding.html +3 -3
  411. data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +3 -3
  412. data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +3 -3
  413. data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +3 -3
  414. data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +3 -3
  415. data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +3 -3
  416. data/vendor/local/share/doc/groonga/en/html/reference/tables.html +3 -3
  417. data/vendor/local/share/doc/groonga/en/html/reference/token_filter/summary.html +3 -3
  418. data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +7 -7
  419. data/vendor/local/share/doc/groonga/en/html/reference/token_filters/token_filter_nfkc100.html +3 -3
  420. data/vendor/local/share/doc/groonga/en/html/reference/token_filters/token_filter_stem.html +3 -3
  421. data/vendor/local/share/doc/groonga/en/html/reference/token_filters/token_filter_stop_word.html +3 -3
  422. data/vendor/local/share/doc/groonga/en/html/reference/tokenizer/summary.html +3 -3
  423. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +9 -6
  424. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram.html +3 -3
  425. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_ignore_blank.html +3 -3
  426. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol.html +3 -3
  427. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol_alpha.html +3 -3
  428. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol_alpha_digit.html +3 -3
  429. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_split_symbol.html +3 -3
  430. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_split_symbol_alpha.html +3 -3
  431. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_bigram_split_symbol_alpha_digit.html +3 -3
  432. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_delimit.html +3 -3
  433. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_delimit_null.html +3 -3
  434. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_mecab.html +8 -8
  435. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_ngram.html +1005 -0
  436. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_pattern.html +240 -0
  437. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_regexp.html +21 -21
  438. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_table.html +246 -0
  439. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_trigram.html +20 -20
  440. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers/token_unigram.html +15 -15
  441. data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +3 -3
  442. data/vendor/local/share/doc/groonga/en/html/reference/types.html +3 -3
  443. data/vendor/local/share/doc/groonga/en/html/reference/window_function.html +3 -3
  444. data/vendor/local/share/doc/groonga/en/html/reference/window_functions/record_number.html +3 -3
  445. data/vendor/local/share/doc/groonga/en/html/reference/window_functions/window_count.html +3 -3
  446. data/vendor/local/share/doc/groonga/en/html/reference/window_functions/window_record_number.html +3 -3
  447. data/vendor/local/share/doc/groonga/en/html/reference/window_functions/window_sum.html +3 -3
  448. data/vendor/local/share/doc/groonga/en/html/search.html +3 -3
  449. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  450. data/vendor/local/share/doc/groonga/en/html/server.html +3 -3
  451. data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +3 -3
  452. data/vendor/local/share/doc/groonga/en/html/server/http.html +3 -3
  453. data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +3 -3
  454. data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +3 -3
  455. data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +3 -3
  456. data/vendor/local/share/doc/groonga/en/html/server/memcached.html +3 -3
  457. data/vendor/local/share/doc/groonga/en/html/server/package.html +3 -3
  458. data/vendor/local/share/doc/groonga/en/html/spec.html +3 -3
  459. data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +3 -3
  460. data/vendor/local/share/doc/groonga/en/html/spec/search.html +3 -3
  461. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +3 -3
  462. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +3 -3
  463. data/vendor/local/share/doc/groonga/en/html/troubleshooting/how_to_analyze_error_message.html +3 -3
  464. data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +3 -3
  465. data/vendor/local/share/doc/groonga/en/html/tutorial.html +3 -3
  466. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +3 -3
  467. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +3 -3
  468. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +3 -3
  469. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +3 -3
  470. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +3 -3
  471. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +68 -6
  472. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +37 -4
  473. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +3 -3
  474. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +3 -3
  475. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +3 -3
  476. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +3 -3
  477. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  478. data/vendor/local/share/doc/groonga/ja/html/_static/documentation_options.js +1 -1
  479. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +3 -3
  480. data/vendor/local/share/doc/groonga/ja/html/client.html +3 -3
  481. data/vendor/local/share/doc/groonga/ja/html/community.html +3 -3
  482. data/vendor/local/share/doc/groonga/ja/html/contribution.html +3 -3
  483. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +3 -3
  484. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build.html +3 -3
  485. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_autotools.html +3 -3
  486. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_cmake.html +3 -3
  487. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/windows_cmake.html +3 -3
  488. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +3 -3
  489. data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +3 -3
  490. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +3 -3
  491. data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +3 -3
  492. data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +3 -3
  493. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +3 -3
  494. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +3 -3
  495. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +3 -3
  496. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +3 -3
  497. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +3 -3
  498. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +3 -3
  499. data/vendor/local/share/doc/groonga/ja/html/development.html +3 -3
  500. data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +3 -3
  501. data/vendor/local/share/doc/groonga/ja/html/genindex.html +3 -3
  502. data/vendor/local/share/doc/groonga/ja/html/index.html +11 -7
  503. data/vendor/local/share/doc/groonga/ja/html/install.html +5 -4
  504. data/vendor/local/share/doc/groonga/ja/html/install/centos.html +6 -6
  505. data/vendor/local/share/doc/groonga/ja/html/install/debian.html +69 -8
  506. data/vendor/local/share/doc/groonga/ja/html/install/docker.html +3 -3
  507. data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +6 -6
  508. data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +6 -6
  509. data/vendor/local/share/doc/groonga/ja/html/install/others.html +6 -6
  510. data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +6 -6
  511. data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +6 -6
  512. data/vendor/local/share/doc/groonga/ja/html/install/windows.html +12 -12
  513. data/vendor/local/share/doc/groonga/ja/html/limitations.html +3 -3
  514. data/vendor/local/share/doc/groonga/ja/html/news.html +494 -206
  515. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +3 -3
  516. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +3 -3
  517. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +3 -3
  518. data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +3 -3
  519. data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +3 -3
  520. data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +3 -3
  521. data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +3 -3
  522. data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +3 -3
  523. data/vendor/local/share/doc/groonga/ja/html/news/5.x.html +3 -3
  524. data/vendor/local/share/doc/groonga/ja/html/news/6.x.html +3 -3
  525. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +3 -3
  526. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  527. data/vendor/local/share/doc/groonga/ja/html/reference.html +9 -6
  528. data/vendor/local/share/doc/groonga/ja/html/reference/alias.html +3 -3
  529. data/vendor/local/share/doc/groonga/ja/html/reference/api.html +3 -3
  530. data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +3 -3
  531. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +3 -3
  532. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +3 -3
  533. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +3 -3
  534. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +3 -3
  535. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +3 -3
  536. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +3 -3
  537. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +3 -3
  538. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +3 -3
  539. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +3 -3
  540. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +3 -3
  541. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +3 -3
  542. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +3 -3
  543. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +3 -3
  544. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_inspect.html +3 -3
  545. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +3 -3
  546. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +3 -3
  547. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +3 -3
  548. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +3 -3
  549. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +3 -3
  550. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +3 -3
  551. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_thread.html +3 -3
  552. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +3 -3
  553. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +3 -3
  554. data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +3 -3
  555. data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +3 -3
  556. data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +3 -3
  557. data/vendor/local/share/doc/groonga/ja/html/reference/column.html +3 -3
  558. data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +3 -3
  559. data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +3 -3
  560. data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +3 -3
  561. data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +3 -3
  562. data/vendor/local/share/doc/groonga/ja/html/reference/command.html +3 -3
  563. data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +3 -3
  564. data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +3 -3
  565. data/vendor/local/share/doc/groonga/ja/html/reference/command/pretty_print.html +3 -3
  566. data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +3 -3
  567. data/vendor/local/share/doc/groonga/ja/html/reference/command/request_timeout.html +3 -3
  568. data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +3 -3
  569. data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +3 -3
  570. data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +3 -3
  571. data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +3 -3
  572. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_copy.html +3 -3
  573. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +3 -3
  574. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +3 -3
  575. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +3 -3
  576. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +3 -3
  577. data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_delete.html +3 -3
  578. data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_get.html +3 -3
  579. data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_set.html +3 -3
  580. data/vendor/local/share/doc/groonga/ja/html/reference/commands/database_unmap.html +3 -3
  581. data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +3 -3
  582. data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +3 -3
  583. data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +3 -3
  584. data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +3 -3
  585. data/vendor/local/share/doc/groonga/ja/html/reference/commands/io_flush.html +3 -3
  586. data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +3 -3
  587. data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_acquire.html +3 -3
  588. data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +3 -3
  589. data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_release.html +3 -3
  590. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +3 -3
  591. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +3 -3
  592. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +3 -3
  593. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +3 -3
  594. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_parameters.html +3 -3
  595. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +75 -4
  596. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_select.html +7 -7
  597. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_shard_list.html +3 -3
  598. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_table_remove.html +3 -3
  599. data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +3 -3
  600. data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +3 -3
  601. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_exist.html +3 -3
  602. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_inspect.html +73 -54
  603. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_list.html +3 -3
  604. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_remove.html +3 -3
  605. data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +3 -3
  606. data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +3 -3
  607. data/vendor/local/share/doc/groonga/ja/html/reference/commands/query_expand.html +3 -3
  608. data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +3 -3
  609. data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +3 -3
  610. data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +3 -3
  611. data/vendor/local/share/doc/groonga/ja/html/reference/commands/reindex.html +3 -3
  612. data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +3 -3
  613. data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +3 -3
  614. data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +3 -3
  615. data/vendor/local/share/doc/groonga/ja/html/reference/commands/schema.html +3 -3
  616. data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +7 -7
  617. data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +3 -3
  618. data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +3 -3
  619. data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +3 -3
  620. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_copy.html +3 -3
  621. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +3 -3
  622. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +3 -3
  623. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +3 -3
  624. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_rename.html +3 -3
  625. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +3 -3
  626. data/vendor/local/share/doc/groonga/ja/html/reference/commands/thread_limit.html +3 -3
  627. data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +3 -3
  628. data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +3 -3
  629. data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +3 -3
  630. data/vendor/local/share/doc/groonga/ja/html/reference/configuration.html +6 -6
  631. data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +3 -3
  632. data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +57 -4
  633. data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +3 -3
  634. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +3 -3
  635. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +3 -3
  636. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +3 -3
  637. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +3 -3
  638. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +3 -3
  639. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +3 -3
  640. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +3 -3
  641. data/vendor/local/share/doc/groonga/ja/html/reference/function.html +3 -3
  642. data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +3 -3
  643. data/vendor/local/share/doc/groonga/ja/html/reference/functions/cast_loose.html +3 -3
  644. data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +3 -3
  645. data/vendor/local/share/doc/groonga/ja/html/reference/functions/fuzzy_search.html +3 -3
  646. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +11 -19
  647. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +3 -3
  648. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +3 -3
  649. data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +3 -3
  650. data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +3 -3
  651. data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +3 -3
  652. data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_records.html +3 -3
  653. data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +3 -3
  654. data/vendor/local/share/doc/groonga/ja/html/reference/functions/math_abs.html +3 -3
  655. data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +3 -3
  656. data/vendor/local/share/doc/groonga/ja/html/reference/functions/number_classify.html +3 -3
  657. data/vendor/local/share/doc/groonga/ja/html/reference/functions/prefix_rk_search.html +3 -3
  658. data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +3 -3
  659. data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +3 -3
  660. data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +3 -3
  661. data/vendor/local/share/doc/groonga/ja/html/reference/functions/string_length.html +3 -3
  662. data/vendor/local/share/doc/groonga/ja/html/reference/functions/string_substring.html +3 -3
  663. data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +3 -3
  664. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_day.html +3 -3
  665. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_day_of_week.html +3 -3
  666. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_hour.html +3 -3
  667. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_minute.html +3 -3
  668. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_month.html +3 -3
  669. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_second.html +3 -3
  670. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_week.html +3 -3
  671. data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_year.html +3 -3
  672. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_find.html +3 -3
  673. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_new.html +3 -3
  674. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +3 -3
  675. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_slice.html +3 -3
  676. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +3 -3
  677. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +3 -3
  678. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +3 -3
  679. data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +3 -3
  680. data/vendor/local/share/doc/groonga/ja/html/reference/log.html +3 -3
  681. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +3 -3
  682. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers/normalizer_auto.html +3 -3
  683. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers/normalizer_nfkc100.html +3 -3
  684. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers/normalizer_nfkc51.html +3 -3
  685. data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +3 -3
  686. data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +3 -3
  687. data/vendor/local/share/doc/groonga/ja/html/reference/operations/prefix_rk_search.html +3 -3
  688. data/vendor/local/share/doc/groonga/ja/html/reference/output.html +3 -3
  689. data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +3 -3
  690. data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +3 -3
  691. data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +3 -3
  692. data/vendor/local/share/doc/groonga/ja/html/reference/scorer.html +3 -3
  693. data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_at_most.html +3 -3
  694. data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +3 -3
  695. data/vendor/local/share/doc/groonga/ja/html/reference/sharding.html +3 -3
  696. data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +3 -3
  697. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +3 -3
  698. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +3 -3
  699. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +3 -3
  700. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +3 -3
  701. data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +3 -3
  702. data/vendor/local/share/doc/groonga/ja/html/reference/token_filter/summary.html +3 -3
  703. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +7 -7
  704. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters/token_filter_nfkc100.html +3 -3
  705. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters/token_filter_stem.html +3 -3
  706. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters/token_filter_stop_word.html +3 -3
  707. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizer/summary.html +3 -3
  708. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +9 -6
  709. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram.html +3 -3
  710. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_ignore_blank.html +3 -3
  711. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol.html +3 -3
  712. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol_alpha.html +3 -3
  713. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_ignore_blank_split_symbol_alpha_digit.html +3 -3
  714. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_split_symbol.html +3 -3
  715. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_split_symbol_alpha.html +3 -3
  716. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_bigram_split_symbol_alpha_digit.html +3 -3
  717. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_delimit.html +3 -3
  718. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_delimit_null.html +3 -3
  719. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_mecab.html +8 -8
  720. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_ngram.html +998 -0
  721. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_pattern.html +240 -0
  722. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_regexp.html +21 -21
  723. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_table.html +242 -0
  724. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_trigram.html +20 -20
  725. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers/token_unigram.html +15 -15
  726. data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +3 -3
  727. data/vendor/local/share/doc/groonga/ja/html/reference/types.html +3 -3
  728. data/vendor/local/share/doc/groonga/ja/html/reference/window_function.html +3 -3
  729. data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/record_number.html +3 -3
  730. data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/window_count.html +3 -3
  731. data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/window_record_number.html +3 -3
  732. data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/window_sum.html +3 -3
  733. data/vendor/local/share/doc/groonga/ja/html/search.html +3 -3
  734. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  735. data/vendor/local/share/doc/groonga/ja/html/server.html +3 -3
  736. data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +3 -3
  737. data/vendor/local/share/doc/groonga/ja/html/server/http.html +3 -3
  738. data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +3 -3
  739. data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +3 -3
  740. data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +3 -3
  741. data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +3 -3
  742. data/vendor/local/share/doc/groonga/ja/html/server/package.html +3 -3
  743. data/vendor/local/share/doc/groonga/ja/html/spec.html +3 -3
  744. data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +3 -3
  745. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +3 -3
  746. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +3 -3
  747. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +3 -3
  748. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/how_to_analyze_error_message.html +3 -3
  749. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +3 -3
  750. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +3 -3
  751. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +3 -3
  752. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +3 -3
  753. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +3 -3
  754. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +3 -3
  755. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +3 -3
  756. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +64 -6
  757. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +37 -4
  758. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +3 -3
  759. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +3 -3
  760. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +3 -3
  761. data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +3 -3
  762. data/vendor/local/share/groonga/COPYING +502 -0
  763. data/vendor/local/share/groonga/mruby/LEGAL +58 -54
  764. data/vendor/local/share/license/mruby/AUTHORS +6 -2
  765. data/vendor/local/share/license/mruby/LEGAL +1 -1
  766. data/vendor/local/share/license/mruby/{MITL → LICENSE} +1 -1
  767. data/vendor/local/share/license/mruby/README.md +3 -3
  768. data/vendor/local/share/license/rapidjson/license.txt +57 -0
  769. metadata +126 -60
@@ -0,0 +1,179 @@
1
+ // Tencent is pleased to support the open source community by making RapidJSON available.
2
+ //
3
+ // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
4
+ //
5
+ // Licensed under the MIT License (the "License"); you may not use this file except
6
+ // in compliance with the License. You may obtain a copy of the License at
7
+ //
8
+ // http://opensource.org/licenses/MIT
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software distributed
11
+ // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12
+ // CONDITIONS OF ANY KIND, either express or implied. See the License for the
13
+ // specific language governing permissions and limitations under the License.
14
+
15
+ #include "rapidjson.h"
16
+
17
+ #ifndef RAPIDJSON_STREAM_H_
18
+ #define RAPIDJSON_STREAM_H_
19
+
20
+ #include "encodings.h"
21
+
22
+ RAPIDJSON_NAMESPACE_BEGIN
23
+
24
+ ///////////////////////////////////////////////////////////////////////////////
25
+ // Stream
26
+
27
+ /*! \class rapidjson::Stream
28
+ \brief Concept for reading and writing characters.
29
+
30
+ For read-only stream, no need to implement PutBegin(), Put(), Flush() and PutEnd().
31
+
32
+ For write-only stream, only need to implement Put() and Flush().
33
+
34
+ \code
35
+ concept Stream {
36
+ typename Ch; //!< Character type of the stream.
37
+
38
+ //! Read the current character from stream without moving the read cursor.
39
+ Ch Peek() const;
40
+
41
+ //! Read the current character from stream and moving the read cursor to next character.
42
+ Ch Take();
43
+
44
+ //! Get the current read cursor.
45
+ //! \return Number of characters read from start.
46
+ size_t Tell();
47
+
48
+ //! Begin writing operation at the current read pointer.
49
+ //! \return The begin writer pointer.
50
+ Ch* PutBegin();
51
+
52
+ //! Write a character.
53
+ void Put(Ch c);
54
+
55
+ //! Flush the buffer.
56
+ void Flush();
57
+
58
+ //! End the writing operation.
59
+ //! \param begin The begin write pointer returned by PutBegin().
60
+ //! \return Number of characters written.
61
+ size_t PutEnd(Ch* begin);
62
+ }
63
+ \endcode
64
+ */
65
+
66
+ //! Provides additional information for stream.
67
+ /*!
68
+ By using traits pattern, this type provides a default configuration for stream.
69
+ For custom stream, this type can be specialized for other configuration.
70
+ See TEST(Reader, CustomStringStream) in readertest.cpp for example.
71
+ */
72
+ template<typename Stream>
73
+ struct StreamTraits {
74
+ //! Whether to make local copy of stream for optimization during parsing.
75
+ /*!
76
+ By default, for safety, streams do not use local copy optimization.
77
+ Stream that can be copied fast should specialize this, like StreamTraits<StringStream>.
78
+ */
79
+ enum { copyOptimization = 0 };
80
+ };
81
+
82
+ //! Reserve n characters for writing to a stream.
83
+ template<typename Stream>
84
+ inline void PutReserve(Stream& stream, size_t count) {
85
+ (void)stream;
86
+ (void)count;
87
+ }
88
+
89
+ //! Write character to a stream, presuming buffer is reserved.
90
+ template<typename Stream>
91
+ inline void PutUnsafe(Stream& stream, typename Stream::Ch c) {
92
+ stream.Put(c);
93
+ }
94
+
95
+ //! Put N copies of a character to a stream.
96
+ template<typename Stream, typename Ch>
97
+ inline void PutN(Stream& stream, Ch c, size_t n) {
98
+ PutReserve(stream, n);
99
+ for (size_t i = 0; i < n; i++)
100
+ PutUnsafe(stream, c);
101
+ }
102
+
103
+ ///////////////////////////////////////////////////////////////////////////////
104
+ // StringStream
105
+
106
+ //! Read-only string stream.
107
+ /*! \note implements Stream concept
108
+ */
109
+ template <typename Encoding>
110
+ struct GenericStringStream {
111
+ typedef typename Encoding::Ch Ch;
112
+
113
+ GenericStringStream(const Ch *src) : src_(src), head_(src) {}
114
+
115
+ Ch Peek() const { return *src_; }
116
+ Ch Take() { return *src_++; }
117
+ size_t Tell() const { return static_cast<size_t>(src_ - head_); }
118
+
119
+ Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
120
+ void Put(Ch) { RAPIDJSON_ASSERT(false); }
121
+ void Flush() { RAPIDJSON_ASSERT(false); }
122
+ size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
123
+
124
+ const Ch* src_; //!< Current read position.
125
+ const Ch* head_; //!< Original head of the string.
126
+ };
127
+
128
+ template <typename Encoding>
129
+ struct StreamTraits<GenericStringStream<Encoding> > {
130
+ enum { copyOptimization = 1 };
131
+ };
132
+
133
+ //! String stream with UTF8 encoding.
134
+ typedef GenericStringStream<UTF8<> > StringStream;
135
+
136
+ ///////////////////////////////////////////////////////////////////////////////
137
+ // InsituStringStream
138
+
139
+ //! A read-write string stream.
140
+ /*! This string stream is particularly designed for in-situ parsing.
141
+ \note implements Stream concept
142
+ */
143
+ template <typename Encoding>
144
+ struct GenericInsituStringStream {
145
+ typedef typename Encoding::Ch Ch;
146
+
147
+ GenericInsituStringStream(Ch *src) : src_(src), dst_(0), head_(src) {}
148
+
149
+ // Read
150
+ Ch Peek() { return *src_; }
151
+ Ch Take() { return *src_++; }
152
+ size_t Tell() { return static_cast<size_t>(src_ - head_); }
153
+
154
+ // Write
155
+ void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; }
156
+
157
+ Ch* PutBegin() { return dst_ = src_; }
158
+ size_t PutEnd(Ch* begin) { return static_cast<size_t>(dst_ - begin); }
159
+ void Flush() {}
160
+
161
+ Ch* Push(size_t count) { Ch* begin = dst_; dst_ += count; return begin; }
162
+ void Pop(size_t count) { dst_ -= count; }
163
+
164
+ Ch* src_;
165
+ Ch* dst_;
166
+ Ch* head_;
167
+ };
168
+
169
+ template <typename Encoding>
170
+ struct StreamTraits<GenericInsituStringStream<Encoding> > {
171
+ enum { copyOptimization = 1 };
172
+ };
173
+
174
+ //! Insitu string stream with UTF8 encoding.
175
+ typedef GenericInsituStringStream<UTF8<> > InsituStringStream;
176
+
177
+ RAPIDJSON_NAMESPACE_END
178
+
179
+ #endif // RAPIDJSON_STREAM_H_
@@ -0,0 +1,117 @@
1
+ // Tencent is pleased to support the open source community by making RapidJSON available.
2
+ //
3
+ // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
4
+ //
5
+ // Licensed under the MIT License (the "License"); you may not use this file except
6
+ // in compliance with the License. You may obtain a copy of the License at
7
+ //
8
+ // http://opensource.org/licenses/MIT
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software distributed
11
+ // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12
+ // CONDITIONS OF ANY KIND, either express or implied. See the License for the
13
+ // specific language governing permissions and limitations under the License.
14
+
15
+ #ifndef RAPIDJSON_STRINGBUFFER_H_
16
+ #define RAPIDJSON_STRINGBUFFER_H_
17
+
18
+ #include "stream.h"
19
+ #include "internal/stack.h"
20
+
21
+ #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
22
+ #include <utility> // std::move
23
+ #endif
24
+
25
+ #include "internal/stack.h"
26
+
27
+ #if defined(__clang__)
28
+ RAPIDJSON_DIAG_PUSH
29
+ RAPIDJSON_DIAG_OFF(c++98-compat)
30
+ #endif
31
+
32
+ RAPIDJSON_NAMESPACE_BEGIN
33
+
34
+ //! Represents an in-memory output stream.
35
+ /*!
36
+ \tparam Encoding Encoding of the stream.
37
+ \tparam Allocator type for allocating memory buffer.
38
+ \note implements Stream concept
39
+ */
40
+ template <typename Encoding, typename Allocator = CrtAllocator>
41
+ class GenericStringBuffer {
42
+ public:
43
+ typedef typename Encoding::Ch Ch;
44
+
45
+ GenericStringBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {}
46
+
47
+ #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
48
+ GenericStringBuffer(GenericStringBuffer&& rhs) : stack_(std::move(rhs.stack_)) {}
49
+ GenericStringBuffer& operator=(GenericStringBuffer&& rhs) {
50
+ if (&rhs != this)
51
+ stack_ = std::move(rhs.stack_);
52
+ return *this;
53
+ }
54
+ #endif
55
+
56
+ void Put(Ch c) { *stack_.template Push<Ch>() = c; }
57
+ void PutUnsafe(Ch c) { *stack_.template PushUnsafe<Ch>() = c; }
58
+ void Flush() {}
59
+
60
+ void Clear() { stack_.Clear(); }
61
+ void ShrinkToFit() {
62
+ // Push and pop a null terminator. This is safe.
63
+ *stack_.template Push<Ch>() = '\0';
64
+ stack_.ShrinkToFit();
65
+ stack_.template Pop<Ch>(1);
66
+ }
67
+
68
+ void Reserve(size_t count) { stack_.template Reserve<Ch>(count); }
69
+ Ch* Push(size_t count) { return stack_.template Push<Ch>(count); }
70
+ Ch* PushUnsafe(size_t count) { return stack_.template PushUnsafe<Ch>(count); }
71
+ void Pop(size_t count) { stack_.template Pop<Ch>(count); }
72
+
73
+ const Ch* GetString() const {
74
+ // Push and pop a null terminator. This is safe.
75
+ *stack_.template Push<Ch>() = '\0';
76
+ stack_.template Pop<Ch>(1);
77
+
78
+ return stack_.template Bottom<Ch>();
79
+ }
80
+
81
+ size_t GetSize() const { return stack_.GetSize(); }
82
+
83
+ static const size_t kDefaultCapacity = 256;
84
+ mutable internal::Stack<Allocator> stack_;
85
+
86
+ private:
87
+ // Prohibit copy constructor & assignment operator.
88
+ GenericStringBuffer(const GenericStringBuffer&);
89
+ GenericStringBuffer& operator=(const GenericStringBuffer&);
90
+ };
91
+
92
+ //! String buffer with UTF8 encoding
93
+ typedef GenericStringBuffer<UTF8<> > StringBuffer;
94
+
95
+ template<typename Encoding, typename Allocator>
96
+ inline void PutReserve(GenericStringBuffer<Encoding, Allocator>& stream, size_t count) {
97
+ stream.Reserve(count);
98
+ }
99
+
100
+ template<typename Encoding, typename Allocator>
101
+ inline void PutUnsafe(GenericStringBuffer<Encoding, Allocator>& stream, typename Encoding::Ch c) {
102
+ stream.PutUnsafe(c);
103
+ }
104
+
105
+ //! Implement specialized version of PutN() with memset() for better performance.
106
+ template<>
107
+ inline void PutN(GenericStringBuffer<UTF8<> >& stream, char c, size_t n) {
108
+ std::memset(stream.stack_.Push<char>(n), c, n * sizeof(c));
109
+ }
110
+
111
+ RAPIDJSON_NAMESPACE_END
112
+
113
+ #if defined(__clang__)
114
+ RAPIDJSON_DIAG_POP
115
+ #endif
116
+
117
+ #endif // RAPIDJSON_STRINGBUFFER_H_
@@ -0,0 +1,610 @@
1
+ // Tencent is pleased to support the open source community by making RapidJSON available.
2
+ //
3
+ // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
4
+ //
5
+ // Licensed under the MIT License (the "License"); you may not use this file except
6
+ // in compliance with the License. You may obtain a copy of the License at
7
+ //
8
+ // http://opensource.org/licenses/MIT
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software distributed
11
+ // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12
+ // CONDITIONS OF ANY KIND, either express or implied. See the License for the
13
+ // specific language governing permissions and limitations under the License.
14
+
15
+ #ifndef RAPIDJSON_WRITER_H_
16
+ #define RAPIDJSON_WRITER_H_
17
+
18
+ #include "stream.h"
19
+ #include "internal/stack.h"
20
+ #include "internal/strfunc.h"
21
+ #include "internal/dtoa.h"
22
+ #include "internal/itoa.h"
23
+ #include "stringbuffer.h"
24
+ #include <new> // placement new
25
+
26
+ #if defined(RAPIDJSON_SIMD) && defined(_MSC_VER)
27
+ #include <intrin.h>
28
+ #pragma intrinsic(_BitScanForward)
29
+ #endif
30
+ #ifdef RAPIDJSON_SSE42
31
+ #include <nmmintrin.h>
32
+ #elif defined(RAPIDJSON_SSE2)
33
+ #include <emmintrin.h>
34
+ #endif
35
+
36
+ #ifdef _MSC_VER
37
+ RAPIDJSON_DIAG_PUSH
38
+ RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
39
+ #endif
40
+
41
+ #ifdef __clang__
42
+ RAPIDJSON_DIAG_PUSH
43
+ RAPIDJSON_DIAG_OFF(padded)
44
+ RAPIDJSON_DIAG_OFF(unreachable-code)
45
+ #endif
46
+
47
+ RAPIDJSON_NAMESPACE_BEGIN
48
+
49
+ ///////////////////////////////////////////////////////////////////////////////
50
+ // WriteFlag
51
+
52
+ /*! \def RAPIDJSON_WRITE_DEFAULT_FLAGS
53
+ \ingroup RAPIDJSON_CONFIG
54
+ \brief User-defined kWriteDefaultFlags definition.
55
+
56
+ User can define this as any \c WriteFlag combinations.
57
+ */
58
+ #ifndef RAPIDJSON_WRITE_DEFAULT_FLAGS
59
+ #define RAPIDJSON_WRITE_DEFAULT_FLAGS kWriteNoFlags
60
+ #endif
61
+
62
+ //! Combination of writeFlags
63
+ enum WriteFlag {
64
+ kWriteNoFlags = 0, //!< No flags are set.
65
+ kWriteValidateEncodingFlag = 1, //!< Validate encoding of JSON strings.
66
+ kWriteNanAndInfFlag = 2, //!< Allow writing of Infinity, -Infinity and NaN.
67
+ kWriteDefaultFlags = RAPIDJSON_WRITE_DEFAULT_FLAGS //!< Default write flags. Can be customized by defining RAPIDJSON_WRITE_DEFAULT_FLAGS
68
+ };
69
+
70
+ //! JSON writer
71
+ /*! Writer implements the concept Handler.
72
+ It generates JSON text by events to an output os.
73
+
74
+ User may programmatically calls the functions of a writer to generate JSON text.
75
+
76
+ On the other side, a writer can also be passed to objects that generates events,
77
+
78
+ for example Reader::Parse() and Document::Accept().
79
+
80
+ \tparam OutputStream Type of output stream.
81
+ \tparam SourceEncoding Encoding of source string.
82
+ \tparam TargetEncoding Encoding of output stream.
83
+ \tparam StackAllocator Type of allocator for allocating memory of stack.
84
+ \note implements Handler concept
85
+ */
86
+ template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
87
+ class Writer {
88
+ public:
89
+ typedef typename SourceEncoding::Ch Ch;
90
+
91
+ static const int kDefaultMaxDecimalPlaces = 324;
92
+
93
+ //! Constructor
94
+ /*! \param os Output stream.
95
+ \param stackAllocator User supplied allocator. If it is null, it will create a private one.
96
+ \param levelDepth Initial capacity of stack.
97
+ */
98
+ explicit
99
+ Writer(OutputStream& os, StackAllocator* stackAllocator = 0, size_t levelDepth = kDefaultLevelDepth) :
100
+ os_(&os), level_stack_(stackAllocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}
101
+
102
+ explicit
103
+ Writer(StackAllocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth) :
104
+ os_(0), level_stack_(allocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}
105
+
106
+ //! Reset the writer with a new stream.
107
+ /*!
108
+ This function reset the writer with a new stream and default settings,
109
+ in order to make a Writer object reusable for output multiple JSONs.
110
+
111
+ \param os New output stream.
112
+ \code
113
+ Writer<OutputStream> writer(os1);
114
+ writer.StartObject();
115
+ // ...
116
+ writer.EndObject();
117
+
118
+ writer.Reset(os2);
119
+ writer.StartObject();
120
+ // ...
121
+ writer.EndObject();
122
+ \endcode
123
+ */
124
+ void Reset(OutputStream& os) {
125
+ os_ = &os;
126
+ hasRoot_ = false;
127
+ level_stack_.Clear();
128
+ }
129
+
130
+ //! Checks whether the output is a complete JSON.
131
+ /*!
132
+ A complete JSON has a complete root object or array.
133
+ */
134
+ bool IsComplete() const {
135
+ return hasRoot_ && level_stack_.Empty();
136
+ }
137
+
138
+ int GetMaxDecimalPlaces() const {
139
+ return maxDecimalPlaces_;
140
+ }
141
+
142
+ //! Sets the maximum number of decimal places for double output.
143
+ /*!
144
+ This setting truncates the output with specified number of decimal places.
145
+
146
+ For example,
147
+
148
+ \code
149
+ writer.SetMaxDecimalPlaces(3);
150
+ writer.StartArray();
151
+ writer.Double(0.12345); // "0.123"
152
+ writer.Double(0.0001); // "0.0"
153
+ writer.Double(1.234567890123456e30); // "1.234567890123456e30" (do not truncate significand for positive exponent)
154
+ writer.Double(1.23e-4); // "0.0" (do truncate significand for negative exponent)
155
+ writer.EndArray();
156
+ \endcode
157
+
158
+ The default setting does not truncate any decimal places. You can restore to this setting by calling
159
+ \code
160
+ writer.SetMaxDecimalPlaces(Writer::kDefaultMaxDecimalPlaces);
161
+ \endcode
162
+ */
163
+ void SetMaxDecimalPlaces(int maxDecimalPlaces) {
164
+ maxDecimalPlaces_ = maxDecimalPlaces;
165
+ }
166
+
167
+ /*!@name Implementation of Handler
168
+ \see Handler
169
+ */
170
+ //@{
171
+
172
+ bool Null() { Prefix(kNullType); return EndValue(WriteNull()); }
173
+ bool Bool(bool b) { Prefix(b ? kTrueType : kFalseType); return EndValue(WriteBool(b)); }
174
+ bool Int(int i) { Prefix(kNumberType); return EndValue(WriteInt(i)); }
175
+ bool Uint(unsigned u) { Prefix(kNumberType); return EndValue(WriteUint(u)); }
176
+ bool Int64(int64_t i64) { Prefix(kNumberType); return EndValue(WriteInt64(i64)); }
177
+ bool Uint64(uint64_t u64) { Prefix(kNumberType); return EndValue(WriteUint64(u64)); }
178
+
179
+ //! Writes the given \c double value to the stream
180
+ /*!
181
+ \param d The value to be written.
182
+ \return Whether it is succeed.
183
+ */
184
+ bool Double(double d) { Prefix(kNumberType); return EndValue(WriteDouble(d)); }
185
+
186
+ bool RawNumber(const Ch* str, SizeType length, bool copy = false) {
187
+ (void)copy;
188
+ Prefix(kNumberType);
189
+ return EndValue(WriteString(str, length));
190
+ }
191
+
192
+ bool String(const Ch* str, SizeType length, bool copy = false) {
193
+ (void)copy;
194
+ Prefix(kStringType);
195
+ return EndValue(WriteString(str, length));
196
+ }
197
+
198
+ #if RAPIDJSON_HAS_STDSTRING
199
+ bool String(const std::basic_string<Ch>& str) {
200
+ return String(str.data(), SizeType(str.size()));
201
+ }
202
+ #endif
203
+
204
+ bool StartObject() {
205
+ Prefix(kObjectType);
206
+ new (level_stack_.template Push<Level>()) Level(false);
207
+ return WriteStartObject();
208
+ }
209
+
210
+ bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
211
+
212
+ bool EndObject(SizeType memberCount = 0) {
213
+ (void)memberCount;
214
+ RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level));
215
+ RAPIDJSON_ASSERT(!level_stack_.template Top<Level>()->inArray);
216
+ level_stack_.template Pop<Level>(1);
217
+ return EndValue(WriteEndObject());
218
+ }
219
+
220
+ bool StartArray() {
221
+ Prefix(kArrayType);
222
+ new (level_stack_.template Push<Level>()) Level(true);
223
+ return WriteStartArray();
224
+ }
225
+
226
+ bool EndArray(SizeType elementCount = 0) {
227
+ (void)elementCount;
228
+ RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level));
229
+ RAPIDJSON_ASSERT(level_stack_.template Top<Level>()->inArray);
230
+ level_stack_.template Pop<Level>(1);
231
+ return EndValue(WriteEndArray());
232
+ }
233
+ //@}
234
+
235
+ /*! @name Convenience extensions */
236
+ //@{
237
+
238
+ //! Simpler but slower overload.
239
+ bool String(const Ch* str) { return String(str, internal::StrLen(str)); }
240
+ bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); }
241
+
242
+ //@}
243
+
244
+ //! Write a raw JSON value.
245
+ /*!
246
+ For user to write a stringified JSON as a value.
247
+
248
+ \param json A well-formed JSON value. It should not contain null character within [0, length - 1] range.
249
+ \param length Length of the json.
250
+ \param type Type of the root of json.
251
+ */
252
+ bool RawValue(const Ch* json, size_t length, Type type) { Prefix(type); return EndValue(WriteRawValue(json, length)); }
253
+
254
+ protected:
255
+ //! Information for each nested level
256
+ struct Level {
257
+ Level(bool inArray_) : valueCount(0), inArray(inArray_) {}
258
+ size_t valueCount; //!< number of values in this level
259
+ bool inArray; //!< true if in array, otherwise in object
260
+ };
261
+
262
+ static const size_t kDefaultLevelDepth = 32;
263
+
264
+ bool WriteNull() {
265
+ PutReserve(*os_, 4);
266
+ PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 'l'); return true;
267
+ }
268
+
269
+ bool WriteBool(bool b) {
270
+ if (b) {
271
+ PutReserve(*os_, 4);
272
+ PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'r'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'e');
273
+ }
274
+ else {
275
+ PutReserve(*os_, 5);
276
+ PutUnsafe(*os_, 'f'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 's'); PutUnsafe(*os_, 'e');
277
+ }
278
+ return true;
279
+ }
280
+
281
+ bool WriteInt(int i) {
282
+ char buffer[11];
283
+ const char* end = internal::i32toa(i, buffer);
284
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
285
+ for (const char* p = buffer; p != end; ++p)
286
+ PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
287
+ return true;
288
+ }
289
+
290
+ bool WriteUint(unsigned u) {
291
+ char buffer[10];
292
+ const char* end = internal::u32toa(u, buffer);
293
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
294
+ for (const char* p = buffer; p != end; ++p)
295
+ PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
296
+ return true;
297
+ }
298
+
299
+ bool WriteInt64(int64_t i64) {
300
+ char buffer[21];
301
+ const char* end = internal::i64toa(i64, buffer);
302
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
303
+ for (const char* p = buffer; p != end; ++p)
304
+ PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
305
+ return true;
306
+ }
307
+
308
+ bool WriteUint64(uint64_t u64) {
309
+ char buffer[20];
310
+ char* end = internal::u64toa(u64, buffer);
311
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
312
+ for (char* p = buffer; p != end; ++p)
313
+ PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
314
+ return true;
315
+ }
316
+
317
+ bool WriteDouble(double d) {
318
+ if (internal::Double(d).IsNanOrInf()) {
319
+ if (!(writeFlags & kWriteNanAndInfFlag))
320
+ return false;
321
+ if (internal::Double(d).IsNan()) {
322
+ PutReserve(*os_, 3);
323
+ PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N');
324
+ return true;
325
+ }
326
+ if (internal::Double(d).Sign()) {
327
+ PutReserve(*os_, 9);
328
+ PutUnsafe(*os_, '-');
329
+ }
330
+ else
331
+ PutReserve(*os_, 8);
332
+ PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f');
333
+ PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y');
334
+ return true;
335
+ }
336
+
337
+ char buffer[25];
338
+ char* end = internal::dtoa(d, buffer, maxDecimalPlaces_);
339
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
340
+ for (char* p = buffer; p != end; ++p)
341
+ PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
342
+ return true;
343
+ }
344
+
345
+ bool WriteString(const Ch* str, SizeType length) {
346
+ static const typename TargetEncoding::Ch hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
347
+ static const char escape[256] = {
348
+ #define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
349
+ //0 1 2 3 4 5 6 7 8 9 A B C D E F
350
+ 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'b', 't', 'n', 'u', 'f', 'r', 'u', 'u', // 00
351
+ 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', // 10
352
+ 0, 0, '"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20
353
+ Z16, Z16, // 30~4F
354
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0, // 50
355
+ Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16 // 60~FF
356
+ #undef Z16
357
+ };
358
+
359
+ if (TargetEncoding::supportUnicode)
360
+ PutReserve(*os_, 2 + length * 6); // "\uxxxx..."
361
+ else
362
+ PutReserve(*os_, 2 + length * 12); // "\uxxxx\uyyyy..."
363
+
364
+ PutUnsafe(*os_, '\"');
365
+ GenericStringStream<SourceEncoding> is(str);
366
+ while (ScanWriteUnescapedString(is, length)) {
367
+ const Ch c = is.Peek();
368
+ if (!TargetEncoding::supportUnicode && static_cast<unsigned>(c) >= 0x80) {
369
+ // Unicode escaping
370
+ unsigned codepoint;
371
+ if (RAPIDJSON_UNLIKELY(!SourceEncoding::Decode(is, &codepoint)))
372
+ return false;
373
+ PutUnsafe(*os_, '\\');
374
+ PutUnsafe(*os_, 'u');
375
+ if (codepoint <= 0xD7FF || (codepoint >= 0xE000 && codepoint <= 0xFFFF)) {
376
+ PutUnsafe(*os_, hexDigits[(codepoint >> 12) & 15]);
377
+ PutUnsafe(*os_, hexDigits[(codepoint >> 8) & 15]);
378
+ PutUnsafe(*os_, hexDigits[(codepoint >> 4) & 15]);
379
+ PutUnsafe(*os_, hexDigits[(codepoint ) & 15]);
380
+ }
381
+ else {
382
+ RAPIDJSON_ASSERT(codepoint >= 0x010000 && codepoint <= 0x10FFFF);
383
+ // Surrogate pair
384
+ unsigned s = codepoint - 0x010000;
385
+ unsigned lead = (s >> 10) + 0xD800;
386
+ unsigned trail = (s & 0x3FF) + 0xDC00;
387
+ PutUnsafe(*os_, hexDigits[(lead >> 12) & 15]);
388
+ PutUnsafe(*os_, hexDigits[(lead >> 8) & 15]);
389
+ PutUnsafe(*os_, hexDigits[(lead >> 4) & 15]);
390
+ PutUnsafe(*os_, hexDigits[(lead ) & 15]);
391
+ PutUnsafe(*os_, '\\');
392
+ PutUnsafe(*os_, 'u');
393
+ PutUnsafe(*os_, hexDigits[(trail >> 12) & 15]);
394
+ PutUnsafe(*os_, hexDigits[(trail >> 8) & 15]);
395
+ PutUnsafe(*os_, hexDigits[(trail >> 4) & 15]);
396
+ PutUnsafe(*os_, hexDigits[(trail ) & 15]);
397
+ }
398
+ }
399
+ else if ((sizeof(Ch) == 1 || static_cast<unsigned>(c) < 256) && RAPIDJSON_UNLIKELY(escape[static_cast<unsigned char>(c)])) {
400
+ is.Take();
401
+ PutUnsafe(*os_, '\\');
402
+ PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(escape[static_cast<unsigned char>(c)]));
403
+ if (escape[static_cast<unsigned char>(c)] == 'u') {
404
+ PutUnsafe(*os_, '0');
405
+ PutUnsafe(*os_, '0');
406
+ PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) >> 4]);
407
+ PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) & 0xF]);
408
+ }
409
+ }
410
+ else if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ?
411
+ Transcoder<SourceEncoding, TargetEncoding>::Validate(is, *os_) :
412
+ Transcoder<SourceEncoding, TargetEncoding>::TranscodeUnsafe(is, *os_))))
413
+ return false;
414
+ }
415
+ PutUnsafe(*os_, '\"');
416
+ return true;
417
+ }
418
+
419
+ bool ScanWriteUnescapedString(GenericStringStream<SourceEncoding>& is, size_t length) {
420
+ return RAPIDJSON_LIKELY(is.Tell() < length);
421
+ }
422
+
423
+ bool WriteStartObject() { os_->Put('{'); return true; }
424
+ bool WriteEndObject() { os_->Put('}'); return true; }
425
+ bool WriteStartArray() { os_->Put('['); return true; }
426
+ bool WriteEndArray() { os_->Put(']'); return true; }
427
+
428
+ bool WriteRawValue(const Ch* json, size_t length) {
429
+ PutReserve(*os_, length);
430
+ for (size_t i = 0; i < length; i++) {
431
+ RAPIDJSON_ASSERT(json[i] != '\0');
432
+ PutUnsafe(*os_, json[i]);
433
+ }
434
+ return true;
435
+ }
436
+
437
+ void Prefix(Type type) {
438
+ (void)type;
439
+ if (RAPIDJSON_LIKELY(level_stack_.GetSize() != 0)) { // this value is not at root
440
+ Level* level = level_stack_.template Top<Level>();
441
+ if (level->valueCount > 0) {
442
+ if (level->inArray)
443
+ os_->Put(','); // add comma if it is not the first element in array
444
+ else // in object
445
+ os_->Put((level->valueCount % 2 == 0) ? ',' : ':');
446
+ }
447
+ if (!level->inArray && level->valueCount % 2 == 0)
448
+ RAPIDJSON_ASSERT(type == kStringType); // if it's in object, then even number should be a name
449
+ level->valueCount++;
450
+ }
451
+ else {
452
+ RAPIDJSON_ASSERT(!hasRoot_); // Should only has one and only one root.
453
+ hasRoot_ = true;
454
+ }
455
+ }
456
+
457
+ // Flush the value if it is the top level one.
458
+ bool EndValue(bool ret) {
459
+ if (RAPIDJSON_UNLIKELY(level_stack_.Empty())) // end of json text
460
+ os_->Flush();
461
+ return ret;
462
+ }
463
+
464
+ OutputStream* os_;
465
+ internal::Stack<StackAllocator> level_stack_;
466
+ int maxDecimalPlaces_;
467
+ bool hasRoot_;
468
+
469
+ private:
470
+ // Prohibit copy constructor & assignment operator.
471
+ Writer(const Writer&);
472
+ Writer& operator=(const Writer&);
473
+ };
474
+
475
+ // Full specialization for StringStream to prevent memory copying
476
+
477
+ template<>
478
+ inline bool Writer<StringBuffer>::WriteInt(int i) {
479
+ char *buffer = os_->Push(11);
480
+ const char* end = internal::i32toa(i, buffer);
481
+ os_->Pop(static_cast<size_t>(11 - (end - buffer)));
482
+ return true;
483
+ }
484
+
485
+ template<>
486
+ inline bool Writer<StringBuffer>::WriteUint(unsigned u) {
487
+ char *buffer = os_->Push(10);
488
+ const char* end = internal::u32toa(u, buffer);
489
+ os_->Pop(static_cast<size_t>(10 - (end - buffer)));
490
+ return true;
491
+ }
492
+
493
+ template<>
494
+ inline bool Writer<StringBuffer>::WriteInt64(int64_t i64) {
495
+ char *buffer = os_->Push(21);
496
+ const char* end = internal::i64toa(i64, buffer);
497
+ os_->Pop(static_cast<size_t>(21 - (end - buffer)));
498
+ return true;
499
+ }
500
+
501
+ template<>
502
+ inline bool Writer<StringBuffer>::WriteUint64(uint64_t u) {
503
+ char *buffer = os_->Push(20);
504
+ const char* end = internal::u64toa(u, buffer);
505
+ os_->Pop(static_cast<size_t>(20 - (end - buffer)));
506
+ return true;
507
+ }
508
+
509
+ template<>
510
+ inline bool Writer<StringBuffer>::WriteDouble(double d) {
511
+ if (internal::Double(d).IsNanOrInf()) {
512
+ // Note: This code path can only be reached if (RAPIDJSON_WRITE_DEFAULT_FLAGS & kWriteNanAndInfFlag).
513
+ if (!(kWriteDefaultFlags & kWriteNanAndInfFlag))
514
+ return false;
515
+ if (internal::Double(d).IsNan()) {
516
+ PutReserve(*os_, 3);
517
+ PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N');
518
+ return true;
519
+ }
520
+ if (internal::Double(d).Sign()) {
521
+ PutReserve(*os_, 9);
522
+ PutUnsafe(*os_, '-');
523
+ }
524
+ else
525
+ PutReserve(*os_, 8);
526
+ PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f');
527
+ PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y');
528
+ return true;
529
+ }
530
+
531
+ char *buffer = os_->Push(25);
532
+ char* end = internal::dtoa(d, buffer, maxDecimalPlaces_);
533
+ os_->Pop(static_cast<size_t>(25 - (end - buffer)));
534
+ return true;
535
+ }
536
+
537
+ #if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)
538
+ template<>
539
+ inline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, size_t length) {
540
+ if (length < 16)
541
+ return RAPIDJSON_LIKELY(is.Tell() < length);
542
+
543
+ if (!RAPIDJSON_LIKELY(is.Tell() < length))
544
+ return false;
545
+
546
+ const char* p = is.src_;
547
+ const char* end = is.head_ + length;
548
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
549
+ const char* endAligned = reinterpret_cast<const char*>(reinterpret_cast<size_t>(end) & static_cast<size_t>(~15));
550
+ if (nextAligned > end)
551
+ return true;
552
+
553
+ while (p != nextAligned)
554
+ if (*p < 0x20 || *p == '\"' || *p == '\\') {
555
+ is.src_ = p;
556
+ return RAPIDJSON_LIKELY(is.Tell() < length);
557
+ }
558
+ else
559
+ os_->PutUnsafe(*p++);
560
+
561
+ // The rest of string using SIMD
562
+ static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
563
+ static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
564
+ static const char space[16] = { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 };
565
+ const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
566
+ const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
567
+ const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
568
+
569
+ for (; p != endAligned; p += 16) {
570
+ const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
571
+ const __m128i t1 = _mm_cmpeq_epi8(s, dq);
572
+ const __m128i t2 = _mm_cmpeq_epi8(s, bs);
573
+ const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x19) == 0x19
574
+ const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
575
+ unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
576
+ if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
577
+ SizeType len;
578
+ #ifdef _MSC_VER // Find the index of first escaped
579
+ unsigned long offset;
580
+ _BitScanForward(&offset, r);
581
+ len = offset;
582
+ #else
583
+ len = static_cast<SizeType>(__builtin_ffs(r) - 1);
584
+ #endif
585
+ char* q = reinterpret_cast<char*>(os_->PushUnsafe(len));
586
+ for (size_t i = 0; i < len; i++)
587
+ q[i] = p[i];
588
+
589
+ p += len;
590
+ break;
591
+ }
592
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(os_->PushUnsafe(16)), s);
593
+ }
594
+
595
+ is.src_ = p;
596
+ return RAPIDJSON_LIKELY(is.Tell() < length);
597
+ }
598
+ #endif // defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)
599
+
600
+ RAPIDJSON_NAMESPACE_END
601
+
602
+ #ifdef _MSC_VER
603
+ RAPIDJSON_DIAG_POP
604
+ #endif
605
+
606
+ #ifdef __clang__
607
+ RAPIDJSON_DIAG_POP
608
+ #endif
609
+
610
+ #endif // RAPIDJSON_RAPIDJSON_H_