rroonga 6.0.2-x64-mingw32 → 6.0.4-x64-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/Rakefile +1 -1
 - data/doc/text/news.md +18 -1
 - data/ext/groonga/rb-grn-column.c +1 -2
 - data/ext/groonga/rb-grn-data-column.c +157 -0
 - data/ext/groonga/rb-grn-exception.c +17 -0
 - data/ext/groonga/rb-grn-fix-size-column.c +2 -2
 - data/ext/groonga/rb-grn-object.c +29 -0
 - data/ext/groonga/rb-grn-procedure-type.c +9 -1
 - data/ext/groonga/rb-grn-table-sort-keys.c +85 -0
 - data/ext/groonga/rb-grn-table.c +2 -57
 - data/ext/groonga/rb-grn-variable-size-column.c +2 -2
 - data/ext/groonga/rb-grn.h +17 -3
 - data/lib/2.1/groonga.so +0 -0
 - data/lib/2.2/groonga.so +0 -0
 - data/lib/2.3/groonga.so +0 -0
 - data/rroonga-build.rb +4 -6
 - data/test/test-data-column.rb +53 -0
 - data/test/test-procedure.rb +12 -0
 - data/vendor/local/bin/grndb.exe +0 -0
 - data/vendor/local/bin/groonga-benchmark.exe +0 -0
 - data/vendor/local/bin/groonga.exe +0 -0
 - data/vendor/local/bin/libgroonga-0.dll +0 -0
 - data/vendor/local/bin/libmecab-2.dll +0 -0
 - data/vendor/local/bin/libmsgpack-4.dll +0 -0
 - data/vendor/local/bin/libmsgpackc-2.dll +0 -0
 - data/vendor/local/bin/libonig-5.dll +0 -0
 - data/vendor/local/bin/lz4.exe +0 -0
 - data/vendor/local/bin/lz4c.exe +0 -0
 - data/vendor/local/bin/lz4cat +0 -0
 - data/vendor/local/bin/mecab.exe +0 -0
 - data/vendor/local/bin/zlib1.dll +0 -0
 - data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +1 -1
 - data/vendor/local/include/groonga/groonga.h +5 -0
 - data/vendor/local/include/groonga/groonga/array.h +13 -0
 - data/vendor/local/include/groonga/groonga/db.h +46 -0
 - data/vendor/local/include/groonga/groonga/expr.h +1 -1
 - data/vendor/local/include/groonga/groonga/groonga.h +14 -221
 - data/vendor/local/include/groonga/groonga/hash.h +15 -0
 - data/vendor/local/include/groonga/groonga/obj.h +1 -0
 - data/vendor/local/include/groonga/groonga/operator.h +48 -0
 - data/vendor/local/include/groonga/groonga/output.h +17 -1
 - data/vendor/local/include/groonga/groonga/plugin.h +1 -4
 - data/vendor/local/include/groonga/groonga/portability.h +7 -4
 - data/vendor/local/include/groonga/groonga/scorer.h +3 -3
 - data/vendor/local/include/groonga/groonga/table.h +216 -0
 - data/vendor/local/include/groonga/groonga/time.h +47 -0
 - data/vendor/local/include/groonga/groonga/window_function.h +67 -0
 - data/vendor/local/lib/groonga/plugins/functions/number.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/number.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/number.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/number.la +41 -0
 - data/vendor/local/lib/groonga/plugins/functions/string.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/string.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/string.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/time.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/time.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/time.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/time.la +41 -0
 - data/vendor/local/lib/groonga/plugins/functions/vector.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/vector.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/vector.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
 - data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
 - data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
 - data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/token_filters/stop_word.a +0 -0
 - data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
 - data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
 - data/vendor/local/lib/groonga/scripts/ruby/command_line/grndb.rb +41 -10
 - data/vendor/local/lib/groonga/scripts/ruby/context/rc.rb +2 -0
 - data/vendor/local/lib/libgroonga.a +0 -0
 - data/vendor/local/lib/libgroonga.dll.a +0 -0
 - data/vendor/local/lib/liblz4.a +0 -0
 - data/vendor/local/lib/liblz4.dll +0 -0
 - data/vendor/local/lib/liblz4.dll.1 +0 -0
 - data/vendor/local/lib/liblz4.dll.1.5.0 +0 -0
 - data/vendor/local/lib/libmecab.a +0 -0
 - data/vendor/local/lib/libmecab.dll.a +0 -0
 - data/vendor/local/lib/libmsgpack.a +0 -0
 - data/vendor/local/lib/libmsgpack.dll.a +0 -0
 - data/vendor/local/lib/libmsgpackc.a +0 -0
 - data/vendor/local/lib/libmsgpackc.dll.a +0 -0
 - data/vendor/local/lib/libonig.a +0 -0
 - data/vendor/local/lib/libonig.dll.a +0 -0
 - data/vendor/local/lib/libz.a +0 -0
 - data/vendor/local/lib/libz.dll.a +0 -0
 - data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
 - data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
 - data/vendor/local/sbin/groonga-httpd.exe +0 -0
 - data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
 - data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +129 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +92 -70
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/number_classify.txt +20 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/record_number.txt +23 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/time_classify_day.txt +18 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/time_classify_hour.txt +18 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/time_classify_minute.txt +18 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/time_classify_month.txt +20 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/time_classify_second.txt +18 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/time_classify_week.txt +18 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/time_classify_year.txt +18 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/log.txt +2 -2
 - data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +25 -1
 - data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/client.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/build.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_autotools.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_cmake.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/build/windows_cmake.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/development.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/index.html +20 -11
 - data/vendor/local/share/doc/groonga/en/html/install.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/install/centos.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/debian.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/fedora.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/others.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/solaris.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/windows.html +14 -14
 - data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news.html +286 -148
 - data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/2.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/3.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/4.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
 - data/vendor/local/share/doc/groonga/en/html/reference.html +20 -11
 - data/vendor/local/share/doc/groonga/en/html/reference/alias.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_thread.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/column.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/pretty_print.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/request_timeout.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_copy.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/config_delete.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/config_get.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/config_set.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/database_unmap.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/io_flush.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_acquire.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_release.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_parameters.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_select.html +9 -9
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_shard_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_table_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/object_exist.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/object_inspect.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/object_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/reindex.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/schema.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +115 -94
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_rename.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/thread_limit.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/configuration.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/function.html +20 -11
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +10 -10
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/number_classify.html +156 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/prefix_rk_search.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +41 -41
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +28 -28
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/record_number.html +158 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +28 -28
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_day.html +155 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_hour.html +155 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_minute.html +155 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_month.html +155 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_second.html +155 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_week.html +155 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_year.html +155 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/log.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/operations.html +9 -9
 - data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/operations/prefix_rk_search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/output.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/sharding.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/tables.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/types.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
 - data/vendor/local/share/doc/groonga/en/html/server.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/memcached.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/package.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/spec.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/spec/search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +129 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +92 -70
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/number_classify.txt +20 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/record_number.txt +23 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/time_classify_day.txt +18 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/time_classify_hour.txt +18 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/time_classify_minute.txt +18 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/time_classify_month.txt +20 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/time_classify_second.txt +18 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/time_classify_week.txt +18 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/time_classify_year.txt +18 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/log.txt +2 -2
 - data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +25 -1
 - data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/client.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/build.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_autotools.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_cmake.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/windows_cmake.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/development.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/index.html +23 -14
 - data/vendor/local/share/doc/groonga/ja/html/install.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/install/centos.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/debian.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/others.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/windows.html +14 -14
 - data/vendor/local/share/doc/groonga/ja/html/limitations.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news.html +257 -150
 - data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference.html +23 -14
 - data/vendor/local/share/doc/groonga/ja/html/reference/alias.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_thread.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/column.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/pretty_print.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/request_timeout.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_copy.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_delete.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_get.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_set.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/database_unmap.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/io_flush.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_acquire.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_release.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_parameters.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_select.html +7 -7
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_shard_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_table_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_exist.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_inspect.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/reindex.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/schema.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +108 -87
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_rename.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/thread_limit.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/configuration.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/function.html +20 -11
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +10 -10
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/number_classify.html +157 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/prefix_rk_search.html +32 -32
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +41 -41
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/record_number.html +159 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +32 -32
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_day.html +156 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_hour.html +156 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_minute.html +156 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_month.html +156 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_second.html +156 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_week.html +156 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_year.html +156 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/log.html +62 -55
 - data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/operations/prefix_rk_search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/output.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/scorer.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_at_most.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/sharding.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/reference/types.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/server.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/package.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/spec.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/spec/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
 - data/vendor/local/share/groonga/mruby/LEGAL +4 -0
 - metadata +55 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 2781651e9799537024a1e83c3f45f5244adc119f
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: fc42a29984041ead28e497370b44fedbac341a55
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f5eec9fc6dc6f3330ec63d947973d807c7bfb679eab60599a01f4453c6e451d3d24d7c13e6ea08cdfae5739cd764b61ff65c4b214808294d66d97efec42454e7
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 9278c30f7db23ae2228400609c013a878519aeb7205eebe93bc9e36ed7b995a594b4a9628b70dbabb93142fb5ea383cb3598dee8da755230ab76860088c734f2
         
     | 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- coding: utf-8; mode: ruby -*-
         
     | 
| 
       2 
2 
     | 
    
         
             
            #
         
     | 
| 
       3 
     | 
    
         
            -
            # Copyright (C) 2009- 
     | 
| 
      
 3 
     | 
    
         
            +
            # Copyright (C) 2009-2016  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
       4 
4 
     | 
    
         
             
            #
         
     | 
| 
       5 
5 
     | 
    
         
             
            # This library is free software; you can redistribute it and/or
         
     | 
| 
       6 
6 
     | 
    
         
             
            # modify it under the terms of the GNU Lesser General Public
         
     | 
    
        data/doc/text/news.md
    CHANGED
    
    | 
         @@ -1,6 +1,23 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # NEWS
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            ## 6.0. 
     | 
| 
      
 3 
     | 
    
         
            +
            ## 6.0.4: 2016-06-14 {#version-6-0-4}
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ### Improvements
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
              * Supported Groonga 6.0.4. Groonga 6.0.3 or older aren't supported.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              * {Groonga::WindowFunctionError}: Added a new error class.
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              * {Groonga::ProcedureType::WINDOW_FUNCTION}: Added a new procedure
         
     | 
| 
      
 12 
     | 
    
         
            +
                type for window function.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
              * {Groonga::Object#window_function_procedure?}: Added a new
         
     | 
| 
      
 15 
     | 
    
         
            +
                predicate for window function.
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              * {Groonga::DataColumn#apply_window_function}: Added a new
         
     | 
| 
      
 18 
     | 
    
         
            +
                method to apply a window function.
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            ## 6.0.2: 2016-05-18 {#version-6-0-2}
         
     | 
| 
       4 
21 
     | 
    
         | 
| 
       5 
22 
     | 
    
         
             
            ### Improvements
         
     | 
| 
       6 
23 
     | 
    
         | 
    
        data/ext/groonga/rb-grn-column.c
    CHANGED
    
    | 
         @@ -846,7 +846,6 @@ rb_grn_init_column (VALUE mGrn) 
     | 
|
| 
       846 
846 
     | 
    
         | 
| 
       847 
847 
     | 
    
         
             
                rb_define_method(rb_cGrnColumn, "rename", rb_grn_column_rename, 1);
         
     | 
| 
       848 
848 
     | 
    
         | 
| 
       849 
     | 
    
         
            -
                 
     | 
| 
       850 
     | 
    
         
            -
                rb_grn_init_variable_size_column(mGrn);
         
     | 
| 
      
 849 
     | 
    
         
            +
                rb_grn_init_data_column(mGrn);
         
     | 
| 
       851 
850 
     | 
    
         
             
                rb_grn_init_index_column(mGrn);
         
     | 
| 
       852 
851 
     | 
    
         
             
            }
         
     | 
| 
         @@ -0,0 +1,157 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            /* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
         
     | 
| 
      
 2 
     | 
    
         
            +
            /* vim: set sts=4 sw=4 ts=8 noet: */
         
     | 
| 
      
 3 
     | 
    
         
            +
            /*
         
     | 
| 
      
 4 
     | 
    
         
            +
              Copyright (C) 2016  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              This library is free software; you can redistribute it and/or
         
     | 
| 
      
 7 
     | 
    
         
            +
              modify it under the terms of the GNU Lesser General Public
         
     | 
| 
      
 8 
     | 
    
         
            +
              License version 2.1 as published by the Free Software Foundation.
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              This library is distributed in the hope that it will be useful,
         
     | 
| 
      
 11 
     | 
    
         
            +
              but WITHOUT ANY WARRANTY; without even the implied warranty of
         
     | 
| 
      
 12 
     | 
    
         
            +
              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
         
     | 
| 
      
 13 
     | 
    
         
            +
              Lesser General Public License for more details.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              You should have received a copy of the GNU Lesser General Public
         
     | 
| 
      
 16 
     | 
    
         
            +
              License along with this library; if not, write to the Free Software
         
     | 
| 
      
 17 
     | 
    
         
            +
              Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
         
     | 
| 
      
 18 
     | 
    
         
            +
            */
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            #include "rb-grn.h"
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            #define SELF(object) ((RbGrnColumn *)DATA_PTR(object))
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            VALUE rb_cGrnDataColumn;
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            /*
         
     | 
| 
      
 27 
     | 
    
         
            +
             * Document-class: Groonga::DataColumn < Groonga::Column
         
     | 
| 
      
 28 
     | 
    
         
            +
             *
         
     | 
| 
      
 29 
     | 
    
         
            +
             * The superclass for data columns such as {Groonga::FixSizeColumn}
         
     | 
| 
      
 30 
     | 
    
         
            +
             * and {Groonga::VariableSizeColumn}.
         
     | 
| 
      
 31 
     | 
    
         
            +
             */
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            /*
         
     | 
| 
      
 34 
     | 
    
         
            +
             * Applies the window function to records in the table of the
         
     | 
| 
      
 35 
     | 
    
         
            +
             * column. Results are stored into the column.
         
     | 
| 
      
 36 
     | 
    
         
            +
             *
         
     | 
| 
      
 37 
     | 
    
         
            +
             * @example Set the nth record.
         
     | 
| 
      
 38 
     | 
    
         
            +
             *
         
     | 
| 
      
 39 
     | 
    
         
            +
             *   Groonga::Schema.define do |schema|
         
     | 
| 
      
 40 
     | 
    
         
            +
             *     schema.create_table("Comments") do |table|
         
     | 
| 
      
 41 
     | 
    
         
            +
             *       # The column for storing window function result.
         
     | 
| 
      
 42 
     | 
    
         
            +
             *       table.uint32("nth")
         
     | 
| 
      
 43 
     | 
    
         
            +
             *     end
         
     | 
| 
      
 44 
     | 
    
         
            +
             *   end
         
     | 
| 
      
 45 
     | 
    
         
            +
             *   comments = Groonga["Comments"]
         
     | 
| 
      
 46 
     | 
    
         
            +
             *   nth = Groonga["Comments.nth"]
         
     | 
| 
      
 47 
     | 
    
         
            +
             *
         
     | 
| 
      
 48 
     | 
    
         
            +
             *   5.times do
         
     | 
| 
      
 49 
     | 
    
         
            +
             *     comments.add
         
     | 
| 
      
 50 
     | 
    
         
            +
             *   end
         
     | 
| 
      
 51 
     | 
    
         
            +
             *
         
     | 
| 
      
 52 
     | 
    
         
            +
             *   options = {
         
     | 
| 
      
 53 
     | 
    
         
            +
             *     # Sort by _id in descending order.
         
     | 
| 
      
 54 
     | 
    
         
            +
             *     :sort_keys => [["_id", "desc"]],
         
     | 
| 
      
 55 
     | 
    
         
            +
             *   }
         
     | 
| 
      
 56 
     | 
    
         
            +
             *   nth.apply_window_function(options) do |record|
         
     | 
| 
      
 57 
     | 
    
         
            +
             *     # record_number() returns Nth record in the sorted order.
         
     | 
| 
      
 58 
     | 
    
         
            +
             *     record.call("record_number")
         
     | 
| 
      
 59 
     | 
    
         
            +
             *   end
         
     | 
| 
      
 60 
     | 
    
         
            +
             *
         
     | 
| 
      
 61 
     | 
    
         
            +
             *   comments.each do |comment|
         
     | 
| 
      
 62 
     | 
    
         
            +
             *     p [comment.id, comment.nth]
         
     | 
| 
      
 63 
     | 
    
         
            +
             *       # -> [1, 5]
         
     | 
| 
      
 64 
     | 
    
         
            +
             *       # -> [2, 4]
         
     | 
| 
      
 65 
     | 
    
         
            +
             *       # -> [3, 3]
         
     | 
| 
      
 66 
     | 
    
         
            +
             *       # -> [4, 2]
         
     | 
| 
      
 67 
     | 
    
         
            +
             *       # -> [5, 1]
         
     | 
| 
      
 68 
     | 
    
         
            +
             *   end
         
     | 
| 
      
 69 
     | 
    
         
            +
             *
         
     | 
| 
      
 70 
     | 
    
         
            +
             * @overload apply_window_function(options={}) {|record| }
         
     | 
| 
      
 71 
     | 
    
         
            +
             *   @param options [::Hash] The name and value pairs.
         
     | 
| 
      
 72 
     | 
    
         
            +
             *   @option options [::Array<String>] :sort_keys
         
     | 
| 
      
 73 
     | 
    
         
            +
             *
         
     | 
| 
      
 74 
     | 
    
         
            +
             *   @yield [record]
         
     | 
| 
      
 75 
     | 
    
         
            +
             *     It yields an object that builds expression. The block must
         
     | 
| 
      
 76 
     | 
    
         
            +
             *     build an expression that calls a window function.
         
     | 
| 
      
 77 
     | 
    
         
            +
             *   @yieldparam [Groonga::RecordExpressionBuilder] record
         
     | 
| 
      
 78 
     | 
    
         
            +
             *     The expression builder to create a window function call.
         
     | 
| 
      
 79 
     | 
    
         
            +
             *   @yieldreturn [Groonga::ExpressionBuilder]
         
     | 
| 
      
 80 
     | 
    
         
            +
             *     It must be an expression that calls a window function.
         
     | 
| 
      
 81 
     | 
    
         
            +
             *
         
     | 
| 
      
 82 
     | 
    
         
            +
             * @since 6.0.4
         
     | 
| 
      
 83 
     | 
    
         
            +
             */
         
     | 
| 
      
 84 
     | 
    
         
            +
            static VALUE
         
     | 
| 
      
 85 
     | 
    
         
            +
            rb_grn_data_column_apply_window_function (int argc, VALUE *argv, VALUE self)
         
     | 
| 
      
 86 
     | 
    
         
            +
            {
         
     | 
| 
      
 87 
     | 
    
         
            +
                grn_rc rc;
         
     | 
| 
      
 88 
     | 
    
         
            +
                grn_ctx *context;
         
     | 
| 
      
 89 
     | 
    
         
            +
                grn_obj *column;
         
     | 
| 
      
 90 
     | 
    
         
            +
                grn_obj *table;
         
     | 
| 
      
 91 
     | 
    
         
            +
                VALUE rb_table;
         
     | 
| 
      
 92 
     | 
    
         
            +
                grn_window_definition definition;
         
     | 
| 
      
 93 
     | 
    
         
            +
                grn_obj *window_function_call = NULL;
         
     | 
| 
      
 94 
     | 
    
         
            +
                VALUE rb_options;
         
     | 
| 
      
 95 
     | 
    
         
            +
                VALUE rb_sort_keys;
         
     | 
| 
      
 96 
     | 
    
         
            +
                VALUE rb_builder;
         
     | 
| 
      
 97 
     | 
    
         
            +
                VALUE rb_window_function_call;
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
                rb_grn_column_deconstruct(SELF(self), &column, &context,
         
     | 
| 
      
 100 
     | 
    
         
            +
                                          NULL, &table,
         
     | 
| 
      
 101 
     | 
    
         
            +
                                          NULL, NULL, NULL);
         
     | 
| 
      
 102 
     | 
    
         
            +
                rb_table = GRNOBJECT2RVAL(Qnil, context, table, GRN_FALSE);
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
                memset(&definition, 0, sizeof(grn_window_definition));
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
                rb_scan_args(argc, argv, "01", &rb_options);
         
     | 
| 
      
 107 
     | 
    
         
            +
                rb_grn_scan_options(rb_options,
         
     | 
| 
      
 108 
     | 
    
         
            +
                                    "sort_keys", &rb_sort_keys,
         
     | 
| 
      
 109 
     | 
    
         
            +
                                    NULL);
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
                if (!NIL_P(rb_sort_keys)) {
         
     | 
| 
      
 112 
     | 
    
         
            +
                    VALUE rb_table;
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
                    if (!RVAL2CBOOL(rb_obj_is_kind_of(rb_sort_keys, rb_cArray)))
         
     | 
| 
      
 115 
     | 
    
         
            +
                        rb_raise(rb_eArgError, ":sort_keys should be an array of key: <%s>",
         
     | 
| 
      
 116 
     | 
    
         
            +
                                 rb_grn_inspect(rb_sort_keys));
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
      
 118 
     | 
    
         
            +
                    definition.n_sort_keys = RARRAY_LEN(rb_sort_keys);
         
     | 
| 
      
 119 
     | 
    
         
            +
                    definition.sort_keys = ALLOCA_N(grn_table_sort_key,
         
     | 
| 
      
 120 
     | 
    
         
            +
                                                    definition.n_sort_keys);
         
     | 
| 
      
 121 
     | 
    
         
            +
                    rb_table = GRNOBJECT2RVAL(Qnil, context, table, GRN_FALSE);
         
     | 
| 
      
 122 
     | 
    
         
            +
                    rb_grn_table_sort_keys_fill(context,
         
     | 
| 
      
 123 
     | 
    
         
            +
                                                definition.sort_keys,
         
     | 
| 
      
 124 
     | 
    
         
            +
                                                definition.n_sort_keys,
         
     | 
| 
      
 125 
     | 
    
         
            +
                                                rb_sort_keys,
         
     | 
| 
      
 126 
     | 
    
         
            +
                                                rb_table);
         
     | 
| 
      
 127 
     | 
    
         
            +
                }
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                rb_builder = rb_grn_record_expression_builder_new(rb_table, Qnil);
         
     | 
| 
      
 130 
     | 
    
         
            +
                rb_window_function_call =
         
     | 
| 
      
 131 
     | 
    
         
            +
                    rb_grn_record_expression_builder_build(rb_builder);
         
     | 
| 
      
 132 
     | 
    
         
            +
                rb_grn_object_deconstruct(RB_GRN_OBJECT(DATA_PTR(rb_window_function_call)),
         
     | 
| 
      
 133 
     | 
    
         
            +
                                          &window_function_call, NULL,
         
     | 
| 
      
 134 
     | 
    
         
            +
                                          NULL, NULL, NULL, NULL);
         
     | 
| 
      
 135 
     | 
    
         
            +
             
     | 
| 
      
 136 
     | 
    
         
            +
                rc = grn_table_apply_window_function(context,
         
     | 
| 
      
 137 
     | 
    
         
            +
                                                     table,
         
     | 
| 
      
 138 
     | 
    
         
            +
                                                     column,
         
     | 
| 
      
 139 
     | 
    
         
            +
                                                     &definition,
         
     | 
| 
      
 140 
     | 
    
         
            +
                                                     window_function_call);
         
     | 
| 
      
 141 
     | 
    
         
            +
                rb_grn_context_check(context, self);
         
     | 
| 
      
 142 
     | 
    
         
            +
                rb_grn_rc_check(rc, self);
         
     | 
| 
      
 143 
     | 
    
         
            +
             
     | 
| 
      
 144 
     | 
    
         
            +
                return self;
         
     | 
| 
      
 145 
     | 
    
         
            +
            }
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
            void
         
     | 
| 
      
 148 
     | 
    
         
            +
            rb_grn_init_data_column (VALUE mGrn)
         
     | 
| 
      
 149 
     | 
    
         
            +
            {
         
     | 
| 
      
 150 
     | 
    
         
            +
                rb_cGrnDataColumn = rb_define_class_under(mGrn, "DataColumn", rb_cGrnColumn);
         
     | 
| 
      
 151 
     | 
    
         
            +
             
     | 
| 
      
 152 
     | 
    
         
            +
                rb_define_method(rb_cGrnDataColumn, "apply_window_function",
         
     | 
| 
      
 153 
     | 
    
         
            +
                                 rb_grn_data_column_apply_window_function, -1);
         
     | 
| 
      
 154 
     | 
    
         
            +
             
     | 
| 
      
 155 
     | 
    
         
            +
                rb_grn_init_fix_size_column(mGrn);
         
     | 
| 
      
 156 
     | 
    
         
            +
                rb_grn_init_variable_size_column(mGrn);
         
     | 
| 
      
 157 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -101,6 +101,7 @@ static VALUE eGrnCommandError; 
     | 
|
| 
       101 
101 
     | 
    
         
             
            static VALUE eGrnPluginError;
         
     | 
| 
       102 
102 
     | 
    
         
             
            static VALUE eGrnScorerError;
         
     | 
| 
       103 
103 
     | 
    
         
             
            static VALUE eGrnCancel;
         
     | 
| 
      
 104 
     | 
    
         
            +
            static VALUE eGrnWindowFunctionError;
         
     | 
| 
       104 
105 
     | 
    
         | 
| 
       105 
106 
     | 
    
         
             
            VALUE
         
     | 
| 
       106 
107 
     | 
    
         
             
            rb_grn_rc_to_exception (grn_rc rc)
         
     | 
| 
         @@ -345,6 +346,9 @@ rb_grn_rc_to_exception (grn_rc rc) 
     | 
|
| 
       345 
346 
     | 
    
         
             
                  case GRN_CANCEL:
         
     | 
| 
       346 
347 
     | 
    
         
             
                    exception = eGrnCancel;
         
     | 
| 
       347 
348 
     | 
    
         
             
                    break;
         
     | 
| 
      
 349 
     | 
    
         
            +
                  case GRN_WINDOW_FUNCTION_ERROR:
         
     | 
| 
      
 350 
     | 
    
         
            +
                    exception = eGrnWindowFunctionError;
         
     | 
| 
      
 351 
     | 
    
         
            +
                    break;
         
     | 
| 
       348 
352 
     | 
    
         
             
                }
         
     | 
| 
       349 
353 
     | 
    
         | 
| 
       350 
354 
     | 
    
         
             
                if (NIL_P(exception))
         
     | 
| 
         @@ -596,6 +600,9 @@ rb_grn_rc_to_message (grn_rc rc) 
     | 
|
| 
       596 
600 
     | 
    
         
             
                  case GRN_CANCEL:
         
     | 
| 
       597 
601 
     | 
    
         
             
                    message = "cancel";
         
     | 
| 
       598 
602 
     | 
    
         
             
                    break;
         
     | 
| 
      
 603 
     | 
    
         
            +
                  case GRN_WINDOW_FUNCTION_ERROR:
         
     | 
| 
      
 604 
     | 
    
         
            +
                    message = "window function error";
         
     | 
| 
      
 605 
     | 
    
         
            +
                    break;
         
     | 
| 
       599 
606 
     | 
    
         
             
                }
         
     | 
| 
       600 
607 
     | 
    
         | 
| 
       601 
608 
     | 
    
         
             
                if (!message)
         
     | 
| 
         @@ -1295,4 +1302,14 @@ rb_grn_init_exception (VALUE mGrn) 
     | 
|
| 
       1295 
1302 
     | 
    
         
             
                 */
         
     | 
| 
       1296 
1303 
     | 
    
         
             
                eGrnCancel =
         
     | 
| 
       1297 
1304 
     | 
    
         
             
                    rb_define_class_under(mGrn, "Cancel", rb_eGrnError);
         
     | 
| 
      
 1305 
     | 
    
         
            +
             
     | 
| 
      
 1306 
     | 
    
         
            +
                /*
         
     | 
| 
      
 1307 
     | 
    
         
            +
                 * Document-class: Groonga::WindowFunctionError
         
     | 
| 
      
 1308 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1309 
     | 
    
         
            +
                 * It is used when window function causes an error.
         
     | 
| 
      
 1310 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1311 
     | 
    
         
            +
                 * @since 6.0.4
         
     | 
| 
      
 1312 
     | 
    
         
            +
                 */
         
     | 
| 
      
 1313 
     | 
    
         
            +
                eGrnWindowFunctionError =
         
     | 
| 
      
 1314 
     | 
    
         
            +
                    rb_define_class_under(mGrn, "WindowFunctionError", rb_eGrnError);
         
     | 
| 
       1298 
1315 
     | 
    
         
             
            }
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            /* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
         
     | 
| 
       2 
2 
     | 
    
         
             
            /*
         
     | 
| 
       3 
     | 
    
         
            -
              Copyright (C) 2009- 
     | 
| 
      
 3 
     | 
    
         
            +
              Copyright (C) 2009-2016  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
       4 
4 
     | 
    
         
             
              Copyright (C) 2016  Masafumi Yokoyama <yokoyama@clear-code.com>
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
              This library is free software; you can redistribute it and/or
         
     | 
| 
         @@ -227,7 +227,7 @@ void 
     | 
|
| 
       227 
227 
     | 
    
         
             
            rb_grn_init_fix_size_column (VALUE mGrn)
         
     | 
| 
       228 
228 
     | 
    
         
             
            {
         
     | 
| 
       229 
229 
     | 
    
         
             
                rb_cGrnFixSizeColumn =
         
     | 
| 
       230 
     | 
    
         
            -
                    rb_define_class_under(mGrn, "FixSizeColumn",  
     | 
| 
      
 230 
     | 
    
         
            +
                    rb_define_class_under(mGrn, "FixSizeColumn", rb_cGrnDataColumn);
         
     | 
| 
       231 
231 
     | 
    
         | 
| 
       232 
232 
     | 
    
         
             
                rb_define_method(rb_cGrnFixSizeColumn, "[]",
         
     | 
| 
       233 
233 
     | 
    
         
             
                                 rb_grn_fix_size_column_array_reference, 1);
         
     | 
    
        data/ext/groonga/rb-grn-object.c
    CHANGED
    
    | 
         @@ -1678,6 +1678,33 @@ rb_grn_object_scorer_procedure_p (VALUE self) 
     | 
|
| 
       1678 
1678 
     | 
    
         
             
                return CBOOL2RVAL(scorer_procedure_p);
         
     | 
| 
       1679 
1679 
     | 
    
         
             
            }
         
     | 
| 
       1680 
1680 
     | 
    
         | 
| 
      
 1681 
     | 
    
         
            +
            /*
         
     | 
| 
      
 1682 
     | 
    
         
            +
             * Checks whether the object is windows function procedure or not.
         
     | 
| 
      
 1683 
     | 
    
         
            +
             *
         
     | 
| 
      
 1684 
     | 
    
         
            +
             * @overload window_function_procedure?
         
     | 
| 
      
 1685 
     | 
    
         
            +
             *   @return [Boolean] `true` if the object is window function procedure,
         
     | 
| 
      
 1686 
     | 
    
         
            +
             *     `false` otherwise.
         
     | 
| 
      
 1687 
     | 
    
         
            +
             *
         
     | 
| 
      
 1688 
     | 
    
         
            +
             * @since 6.0.4
         
     | 
| 
      
 1689 
     | 
    
         
            +
             */
         
     | 
| 
      
 1690 
     | 
    
         
            +
            static VALUE
         
     | 
| 
      
 1691 
     | 
    
         
            +
            rb_grn_object_window_function_procedure_p (VALUE self)
         
     | 
| 
      
 1692 
     | 
    
         
            +
            {
         
     | 
| 
      
 1693 
     | 
    
         
            +
                grn_ctx *context;
         
     | 
| 
      
 1694 
     | 
    
         
            +
                grn_obj *object;
         
     | 
| 
      
 1695 
     | 
    
         
            +
                grn_bool window_function_procedure_p = GRN_FALSE;
         
     | 
| 
      
 1696 
     | 
    
         
            +
             
     | 
| 
      
 1697 
     | 
    
         
            +
                rb_grn_object_deconstruct(SELF(self), &object, &context,
         
     | 
| 
      
 1698 
     | 
    
         
            +
                                          NULL, NULL, NULL, NULL);
         
     | 
| 
      
 1699 
     | 
    
         
            +
             
     | 
| 
      
 1700 
     | 
    
         
            +
                if (context && object) {
         
     | 
| 
      
 1701 
     | 
    
         
            +
                    window_function_procedure_p =
         
     | 
| 
      
 1702 
     | 
    
         
            +
                        grn_obj_is_window_function_proc(context, object);
         
     | 
| 
      
 1703 
     | 
    
         
            +
                }
         
     | 
| 
      
 1704 
     | 
    
         
            +
             
     | 
| 
      
 1705 
     | 
    
         
            +
                return CBOOL2RVAL(window_function_procedure_p);
         
     | 
| 
      
 1706 
     | 
    
         
            +
            }
         
     | 
| 
      
 1707 
     | 
    
         
            +
             
     | 
| 
       1681 
1708 
     | 
    
         
             
            /*
         
     | 
| 
       1682 
1709 
     | 
    
         
             
             * Checks whether the object is accessor or not.
         
     | 
| 
       1683 
1710 
     | 
    
         
             
             *
         
     | 
| 
         @@ -1785,6 +1812,8 @@ rb_grn_init_object (VALUE mGrn) 
     | 
|
| 
       1785 
1812 
     | 
    
         
             
                                 rb_grn_object_selector_only_procedure_p, 0);
         
     | 
| 
       1786 
1813 
     | 
    
         
             
                rb_define_method(rb_cGrnObject, "scorer_procedure?",
         
     | 
| 
       1787 
1814 
     | 
    
         
             
                                 rb_grn_object_scorer_procedure_p, 0);
         
     | 
| 
      
 1815 
     | 
    
         
            +
                rb_define_method(rb_cGrnObject, "window_function_procedure?",
         
     | 
| 
      
 1816 
     | 
    
         
            +
                                 rb_grn_object_window_function_procedure_p, 0);
         
     | 
| 
       1788 
1817 
     | 
    
         
             
                rb_define_method(rb_cGrnObject, "accessor?",
         
     | 
| 
       1789 
1818 
     | 
    
         
             
                                 rb_grn_object_accessor_p, 0);
         
     | 
| 
       1790 
1819 
     | 
    
         
             
                rb_define_method(rb_cGrnObject, "key_accessor?",
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            /* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
         
     | 
| 
       2 
2 
     | 
    
         
             
            /*
         
     | 
| 
       3 
     | 
    
         
            -
              Copyright (C) 2014  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
      
 3 
     | 
    
         
            +
              Copyright (C) 2014-2016  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
              This library is free software; you can redistribute it and/or
         
     | 
| 
       6 
6 
     | 
    
         
             
              modify it under the terms of the GNU Lesser General Public
         
     | 
| 
         @@ -41,4 +41,12 @@ rb_grn_init_procedure_type (VALUE mGrn) 
     | 
|
| 
       41 
41 
     | 
    
         
             
                                "TOKEN_FILTER", INT2NUM(GRN_PROC_TOKEN_FILTER));
         
     | 
| 
       42 
42 
     | 
    
         
             
                rb_define_const(rb_mGrnProcedureType,
         
     | 
| 
       43 
43 
     | 
    
         
             
                                "SCORER", INT2NUM(GRN_PROC_SCORER));
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                /*
         
     | 
| 
      
 46 
     | 
    
         
            +
                 * It's a type for window function.
         
     | 
| 
      
 47 
     | 
    
         
            +
                 *
         
     | 
| 
      
 48 
     | 
    
         
            +
                 * @since 6.0.4
         
     | 
| 
      
 49 
     | 
    
         
            +
                 */
         
     | 
| 
      
 50 
     | 
    
         
            +
                rb_define_const(rb_mGrnProcedureType,
         
     | 
| 
      
 51 
     | 
    
         
            +
                                "WINDOW_FUNCTION", INT2NUM(GRN_PROC_WINDOW_FUNCTION));
         
     | 
| 
       44 
52 
     | 
    
         
             
            }
         
     | 
| 
         @@ -0,0 +1,85 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            /* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
         
     | 
| 
      
 2 
     | 
    
         
            +
            /*
         
     | 
| 
      
 3 
     | 
    
         
            +
              Copyright (C) 2009-2016  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              This library is free software; you can redistribute it and/or
         
     | 
| 
      
 6 
     | 
    
         
            +
              modify it under the terms of the GNU Lesser General Public
         
     | 
| 
      
 7 
     | 
    
         
            +
              License version 2.1 as published by the Free Software Foundation.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              This library is distributed in the hope that it will be useful,
         
     | 
| 
      
 10 
     | 
    
         
            +
              but WITHOUT ANY WARRANTY; without even the implied warranty of
         
     | 
| 
      
 11 
     | 
    
         
            +
              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
         
     | 
| 
      
 12 
     | 
    
         
            +
              Lesser General Public License for more details.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
              You should have received a copy of the GNU Lesser General Public
         
     | 
| 
      
 15 
     | 
    
         
            +
              License along with this library; if not, write to the Free Software
         
     | 
| 
      
 16 
     | 
    
         
            +
              Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
         
     | 
| 
      
 17 
     | 
    
         
            +
            */
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            #include "rb-grn.h"
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            void
         
     | 
| 
      
 22 
     | 
    
         
            +
            rb_grn_table_sort_keys_fill (grn_ctx *context,
         
     | 
| 
      
 23 
     | 
    
         
            +
                                         grn_table_sort_key *sort_keys,
         
     | 
| 
      
 24 
     | 
    
         
            +
                                         size_t n_sort_keys,
         
     | 
| 
      
 25 
     | 
    
         
            +
                                         VALUE rb_sort_keys,
         
     | 
| 
      
 26 
     | 
    
         
            +
                                         VALUE rb_table)
         
     | 
| 
      
 27 
     | 
    
         
            +
            {
         
     | 
| 
      
 28 
     | 
    
         
            +
                int i;
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                for (i = 0; i < n_sort_keys; i++) {
         
     | 
| 
      
 31 
     | 
    
         
            +
                    VALUE rb_sort_key;
         
     | 
| 
      
 32 
     | 
    
         
            +
                    VALUE rb_sort_options;
         
     | 
| 
      
 33 
     | 
    
         
            +
                    VALUE rb_key;
         
     | 
| 
      
 34 
     | 
    
         
            +
                    VALUE rb_resolved_key;
         
     | 
| 
      
 35 
     | 
    
         
            +
                    VALUE rb_order;
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                    rb_sort_key = RARRAY_PTR(rb_sort_keys)[i];
         
     | 
| 
      
 38 
     | 
    
         
            +
                    if (RVAL2CBOOL(rb_obj_is_kind_of(rb_sort_key, rb_cHash))) {
         
     | 
| 
      
 39 
     | 
    
         
            +
                        rb_sort_options = rb_sort_key;
         
     | 
| 
      
 40 
     | 
    
         
            +
                    } else if (RVAL2CBOOL(rb_obj_is_kind_of(rb_sort_key, rb_cArray))) {
         
     | 
| 
      
 41 
     | 
    
         
            +
                        rb_sort_options = rb_hash_new();
         
     | 
| 
      
 42 
     | 
    
         
            +
                        rb_hash_aset(rb_sort_options,
         
     | 
| 
      
 43 
     | 
    
         
            +
                                     RB_GRN_INTERN("key"),
         
     | 
| 
      
 44 
     | 
    
         
            +
                                     rb_ary_entry(rb_sort_key, 0));
         
     | 
| 
      
 45 
     | 
    
         
            +
                        rb_hash_aset(rb_sort_options,
         
     | 
| 
      
 46 
     | 
    
         
            +
                                     RB_GRN_INTERN("order"),
         
     | 
| 
      
 47 
     | 
    
         
            +
                                     rb_ary_entry(rb_sort_key, 1));
         
     | 
| 
      
 48 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 49 
     | 
    
         
            +
                        rb_sort_options = rb_hash_new();
         
     | 
| 
      
 50 
     | 
    
         
            +
                        rb_hash_aset(rb_sort_options,
         
     | 
| 
      
 51 
     | 
    
         
            +
                                     RB_GRN_INTERN("key"),
         
     | 
| 
      
 52 
     | 
    
         
            +
                                     rb_sort_key);
         
     | 
| 
      
 53 
     | 
    
         
            +
                    }
         
     | 
| 
      
 54 
     | 
    
         
            +
                    rb_grn_scan_options(rb_sort_options,
         
     | 
| 
      
 55 
     | 
    
         
            +
                                        "key", &rb_key,
         
     | 
| 
      
 56 
     | 
    
         
            +
                                        "order", &rb_order,
         
     | 
| 
      
 57 
     | 
    
         
            +
                                        NULL);
         
     | 
| 
      
 58 
     | 
    
         
            +
                    if (RVAL2CBOOL(rb_obj_is_kind_of(rb_key, rb_cString))) {
         
     | 
| 
      
 59 
     | 
    
         
            +
                        rb_resolved_key = rb_grn_table_get_column(rb_table, rb_key);
         
     | 
| 
      
 60 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 61 
     | 
    
         
            +
                        rb_resolved_key = rb_key;
         
     | 
| 
      
 62 
     | 
    
         
            +
                    }
         
     | 
| 
      
 63 
     | 
    
         
            +
                    sort_keys[i].key = RVAL2GRNOBJECT(rb_resolved_key, &context);
         
     | 
| 
      
 64 
     | 
    
         
            +
                    if (!sort_keys[i].key) {
         
     | 
| 
      
 65 
     | 
    
         
            +
                        rb_raise(rb_eGrnNoSuchColumn,
         
     | 
| 
      
 66 
     | 
    
         
            +
                                 "no such column: <%s>: <%s>",
         
     | 
| 
      
 67 
     | 
    
         
            +
                                 rb_grn_inspect(rb_key),
         
     | 
| 
      
 68 
     | 
    
         
            +
                                 rb_grn_inspect(rb_table));
         
     | 
| 
      
 69 
     | 
    
         
            +
                    }
         
     | 
| 
      
 70 
     | 
    
         
            +
                    if (NIL_P(rb_order) ||
         
     | 
| 
      
 71 
     | 
    
         
            +
                        rb_grn_equal_option(rb_order, "asc") ||
         
     | 
| 
      
 72 
     | 
    
         
            +
                        rb_grn_equal_option(rb_order, "ascending")) {
         
     | 
| 
      
 73 
     | 
    
         
            +
                        sort_keys[i].flags = GRN_TABLE_SORT_ASC;
         
     | 
| 
      
 74 
     | 
    
         
            +
                    } else if (rb_grn_equal_option(rb_order, "desc") ||
         
     | 
| 
      
 75 
     | 
    
         
            +
                               rb_grn_equal_option(rb_order, "descending")) {
         
     | 
| 
      
 76 
     | 
    
         
            +
                        sort_keys[i].flags = GRN_TABLE_SORT_DESC;
         
     | 
| 
      
 77 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 78 
     | 
    
         
            +
                        rb_raise(rb_eArgError,
         
     | 
| 
      
 79 
     | 
    
         
            +
                                 "order should be one of "
         
     | 
| 
      
 80 
     | 
    
         
            +
                                 "[nil, :desc, :descending, :asc, :ascending]: %s",
         
     | 
| 
      
 81 
     | 
    
         
            +
                                 rb_grn_inspect(rb_order));
         
     | 
| 
      
 82 
     | 
    
         
            +
                    }
         
     | 
| 
      
 83 
     | 
    
         
            +
                }
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
            }
         
     | 
    
        data/ext/groonga/rb-grn-table.c
    CHANGED
    
    | 
         @@ -19,12 +19,6 @@ 
     | 
|
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
            #include "rb-grn.h"
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
            grn_obj *grn_table_open(grn_ctx *ctx,
         
     | 
| 
       23 
     | 
    
         
            -
                                    const char *name, unsigned name_size, const char *path);
         
     | 
| 
       24 
     | 
    
         
            -
            grn_obj *grn_column_open(grn_ctx *ctx, grn_obj *table,
         
     | 
| 
       25 
     | 
    
         
            -
                                     const char *name, unsigned name_size,
         
     | 
| 
       26 
     | 
    
         
            -
                                     const char *path, grn_obj *type);
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
22 
     | 
    
         
             
            #define SELF(object) ((RbGrnTable *)DATA_PTR(object))
         
     | 
| 
       29 
23 
     | 
    
         | 
| 
       30 
24 
     | 
    
         
             
            VALUE rb_cGrnTable;
         
     | 
| 
         @@ -1218,11 +1212,10 @@ rb_grn_table_sort (int argc, VALUE *argv, VALUE self) 
     | 
|
| 
       1218 
1212 
     | 
    
         
             
                grn_obj *table;
         
     | 
| 
       1219 
1213 
     | 
    
         
             
                grn_obj *result;
         
     | 
| 
       1220 
1214 
     | 
    
         
             
                grn_table_sort_key *keys;
         
     | 
| 
       1221 
     | 
    
         
            -
                int  
     | 
| 
      
 1215 
     | 
    
         
            +
                int n_keys;
         
     | 
| 
       1222 
1216 
     | 
    
         
             
                int offset = 0, limit = -1;
         
     | 
| 
       1223 
1217 
     | 
    
         
             
                VALUE rb_keys, options;
         
     | 
| 
       1224 
1218 
     | 
    
         
             
                VALUE rb_offset, rb_limit;
         
     | 
| 
       1225 
     | 
    
         
            -
                VALUE *rb_sort_keys;
         
     | 
| 
       1226 
1219 
     | 
    
         
             
                VALUE exception;
         
     | 
| 
       1227 
1220 
     | 
    
         | 
| 
       1228 
1221 
     | 
    
         
             
                rb_grn_table_deconstruct(SELF(self), &table, &context,
         
     | 
| 
         @@ -1237,56 +1230,8 @@ rb_grn_table_sort (int argc, VALUE *argv, VALUE self) 
     | 
|
| 
       1237 
1230 
     | 
    
         
             
                             rb_grn_inspect(rb_keys));
         
     | 
| 
       1238 
1231 
     | 
    
         | 
| 
       1239 
1232 
     | 
    
         
             
                n_keys = RARRAY_LEN(rb_keys);
         
     | 
| 
       1240 
     | 
    
         
            -
                rb_sort_keys = RARRAY_PTR(rb_keys);
         
     | 
| 
       1241 
1233 
     | 
    
         
             
                keys = ALLOCA_N(grn_table_sort_key, n_keys);
         
     | 
| 
       1242 
     | 
    
         
            -
                 
     | 
| 
       1243 
     | 
    
         
            -
                    VALUE rb_sort_options, rb_key, rb_resolved_key, rb_order;
         
     | 
| 
       1244 
     | 
    
         
            -
             
     | 
| 
       1245 
     | 
    
         
            -
                    if (RVAL2CBOOL(rb_obj_is_kind_of(rb_sort_keys[i], rb_cHash))) {
         
     | 
| 
       1246 
     | 
    
         
            -
                        rb_sort_options = rb_sort_keys[i];
         
     | 
| 
       1247 
     | 
    
         
            -
                    } else if (RVAL2CBOOL(rb_obj_is_kind_of(rb_sort_keys[i], rb_cArray))) {
         
     | 
| 
       1248 
     | 
    
         
            -
                        rb_sort_options = rb_hash_new();
         
     | 
| 
       1249 
     | 
    
         
            -
                        rb_hash_aset(rb_sort_options,
         
     | 
| 
       1250 
     | 
    
         
            -
                                     RB_GRN_INTERN("key"),
         
     | 
| 
       1251 
     | 
    
         
            -
                                     rb_ary_entry(rb_sort_keys[i], 0));
         
     | 
| 
       1252 
     | 
    
         
            -
                        rb_hash_aset(rb_sort_options,
         
     | 
| 
       1253 
     | 
    
         
            -
                                     RB_GRN_INTERN("order"),
         
     | 
| 
       1254 
     | 
    
         
            -
                                     rb_ary_entry(rb_sort_keys[i], 1));
         
     | 
| 
       1255 
     | 
    
         
            -
                    } else {
         
     | 
| 
       1256 
     | 
    
         
            -
                        rb_sort_options = rb_hash_new();
         
     | 
| 
       1257 
     | 
    
         
            -
                        rb_hash_aset(rb_sort_options,
         
     | 
| 
       1258 
     | 
    
         
            -
                                     RB_GRN_INTERN("key"),
         
     | 
| 
       1259 
     | 
    
         
            -
                                     rb_sort_keys[i]);
         
     | 
| 
       1260 
     | 
    
         
            -
                    }
         
     | 
| 
       1261 
     | 
    
         
            -
                    rb_grn_scan_options(rb_sort_options,
         
     | 
| 
       1262 
     | 
    
         
            -
                                        "key", &rb_key,
         
     | 
| 
       1263 
     | 
    
         
            -
                                        "order", &rb_order,
         
     | 
| 
       1264 
     | 
    
         
            -
                                        NULL);
         
     | 
| 
       1265 
     | 
    
         
            -
                    if (RVAL2CBOOL(rb_obj_is_kind_of(rb_key, rb_cString))) {
         
     | 
| 
       1266 
     | 
    
         
            -
                        rb_resolved_key = rb_grn_table_get_column(self, rb_key);
         
     | 
| 
       1267 
     | 
    
         
            -
                    } else {
         
     | 
| 
       1268 
     | 
    
         
            -
                        rb_resolved_key = rb_key;
         
     | 
| 
       1269 
     | 
    
         
            -
                    }
         
     | 
| 
       1270 
     | 
    
         
            -
                    keys[i].key = RVAL2GRNOBJECT(rb_resolved_key, &context);
         
     | 
| 
       1271 
     | 
    
         
            -
                    if (!keys[i].key) {
         
     | 
| 
       1272 
     | 
    
         
            -
                        rb_raise(rb_eGrnNoSuchColumn,
         
     | 
| 
       1273 
     | 
    
         
            -
                                 "no such column: <%s>: <%s>",
         
     | 
| 
       1274 
     | 
    
         
            -
                                 rb_grn_inspect(rb_key), rb_grn_inspect(self));
         
     | 
| 
       1275 
     | 
    
         
            -
                    }
         
     | 
| 
       1276 
     | 
    
         
            -
                    if (NIL_P(rb_order) ||
         
     | 
| 
       1277 
     | 
    
         
            -
                        rb_grn_equal_option(rb_order, "asc") ||
         
     | 
| 
       1278 
     | 
    
         
            -
                        rb_grn_equal_option(rb_order, "ascending")) {
         
     | 
| 
       1279 
     | 
    
         
            -
                        keys[i].flags = GRN_TABLE_SORT_ASC;
         
     | 
| 
       1280 
     | 
    
         
            -
                    } else if (rb_grn_equal_option(rb_order, "desc") ||
         
     | 
| 
       1281 
     | 
    
         
            -
                               rb_grn_equal_option(rb_order, "descending")) {
         
     | 
| 
       1282 
     | 
    
         
            -
                        keys[i].flags = GRN_TABLE_SORT_DESC;
         
     | 
| 
       1283 
     | 
    
         
            -
                    } else {
         
     | 
| 
       1284 
     | 
    
         
            -
                        rb_raise(rb_eArgError,
         
     | 
| 
       1285 
     | 
    
         
            -
                                 "order should be one of "
         
     | 
| 
       1286 
     | 
    
         
            -
                                 "[nil, :desc, :descending, :asc, :ascending]: %s",
         
     | 
| 
       1287 
     | 
    
         
            -
                                 rb_grn_inspect(rb_order));
         
     | 
| 
       1288 
     | 
    
         
            -
                    }
         
     | 
| 
       1289 
     | 
    
         
            -
                }
         
     | 
| 
      
 1234 
     | 
    
         
            +
                rb_grn_table_sort_keys_fill(context, keys, n_keys, rb_keys, self);
         
     | 
| 
       1290 
1235 
     | 
    
         | 
| 
       1291 
1236 
     | 
    
         
             
                rb_grn_scan_options(options,
         
     | 
| 
       1292 
1237 
     | 
    
         
             
                                    "offset", &rb_offset,
         
     |