rroonga 4.0.3-x64-mingw32 → 4.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 +13 -5
 - data/Gemfile +1 -1
 - data/README.textile +1 -1
 - data/Rakefile +8 -1
 - data/bin/grndump +1 -1
 - data/bin/grntest-log-analyze +1 -1
 - data/bin/groonga-database-inspect +1 -1
 - data/bin/groonga-index-dump +1 -1
 - data/doc/text/news.textile +28 -0
 - data/ext/groonga/extconf.rb +12 -2
 - data/ext/groonga/rb-grn-accessor.c +2 -1
 - data/ext/groonga/rb-grn-array-cursor.c +1 -1
 - data/ext/groonga/rb-grn-array.c +1 -1
 - data/ext/groonga/rb-grn-column.c +1 -1
 - data/ext/groonga/rb-grn-context.c +7 -5
 - data/ext/groonga/rb-grn-database.c +1 -1
 - data/ext/groonga/rb-grn-double-array-trie-cursor.c +1 -1
 - data/ext/groonga/rb-grn-double-array-trie.c +1 -1
 - data/ext/groonga/rb-grn-encoding-support.c +1 -1
 - data/ext/groonga/rb-grn-encoding.c +1 -1
 - data/ext/groonga/rb-grn-exception.c +1 -1
 - data/ext/groonga/rb-grn-expression-builder.c +1 -1
 - data/ext/groonga/rb-grn-expression.c +1 -1
 - data/ext/groonga/rb-grn-fix-size-column.c +1 -1
 - data/ext/groonga/rb-grn-geo-point.c +1 -1
 - data/ext/groonga/rb-grn-hash-cursor.c +1 -1
 - data/ext/groonga/rb-grn-hash.c +1 -1
 - data/ext/groonga/rb-grn-index-column.c +1 -1
 - data/ext/groonga/rb-grn-index-cursor.c +1 -1
 - data/ext/groonga/rb-grn-logger.c +1 -1
 - data/ext/groonga/rb-grn-normalizer.c +1 -1
 - data/ext/groonga/rb-grn-object.c +71 -45
 - data/ext/groonga/rb-grn-operator.c +1 -1
 - data/ext/groonga/rb-grn-patricia-trie-cursor.c +1 -1
 - data/ext/groonga/rb-grn-patricia-trie.c +1 -1
 - data/ext/groonga/rb-grn-plugin.c +1 -1
 - data/ext/groonga/rb-grn-posting.c +1 -1
 - data/ext/groonga/rb-grn-procedure-type.c +40 -0
 - data/ext/groonga/rb-grn-procedure.c +17 -4
 - data/ext/groonga/rb-grn-query-logger.c +1 -1
 - data/ext/groonga/rb-grn-record.c +1 -1
 - data/ext/groonga/rb-grn-snippet.c +1 -1
 - data/ext/groonga/rb-grn-table-cursor-key-support.c +1 -1
 - data/ext/groonga/rb-grn-table-cursor.c +1 -1
 - data/ext/groonga/rb-grn-table-key-support.c +1 -1
 - data/ext/groonga/rb-grn-table.c +3 -2
 - data/ext/groonga/rb-grn-type.c +1 -1
 - data/ext/groonga/rb-grn-utils.c +1 -1
 - data/ext/groonga/rb-grn-variable-size-column.c +55 -27
 - data/ext/groonga/rb-grn-variable.c +1 -1
 - data/ext/groonga/rb-grn.h +4 -2
 - data/ext/groonga/rb-groonga.c +3 -2
 - data/extconf.rb +1 -1
 - data/lib/1.9/groonga.so +0 -0
 - data/lib/2.0/groonga.so +0 -0
 - data/lib/2.1/groonga.so +0 -0
 - data/lib/groonga/column.rb +1 -1
 - data/lib/groonga/context/command-executor.rb +1 -1
 - data/lib/groonga/context.rb +1 -1
 - data/lib/groonga/database-inspector.rb +1 -1
 - data/lib/groonga/database.rb +1 -1
 - data/lib/groonga/dumper.rb +1 -1
 - data/lib/groonga/expression-builder-19.rb +1 -1
 - data/lib/groonga/expression-builder.rb +1 -1
 - data/lib/groonga/geo-point.rb +1 -1
 - data/lib/groonga/grntest-log.rb +1 -1
 - data/lib/groonga/index-column.rb +1 -1
 - data/lib/groonga/logger.rb +1 -1
 - data/lib/groonga/memory-pool.rb +1 -2
 - data/lib/groonga/pagination.rb +1 -1
 - data/lib/groonga/patricia-trie.rb +1 -1
 - data/lib/groonga/posting.rb +1 -1
 - data/lib/groonga/query-logger.rb +1 -1
 - data/lib/groonga/record.rb +6 -2
 - data/lib/groonga/schema.rb +1 -1
 - data/lib/groonga/statistic-measurer.rb +1 -1
 - data/lib/groonga/sub-records.rb +1 -1
 - data/lib/groonga/table.rb +1 -1
 - data/lib/groonga.rb +1 -1
 - data/misc/grnop2ruby.rb +1 -1
 - data/rroonga-build.rb +4 -4
 - data/rroonga.gemspec +3 -3
 - data/test/groonga-test-utils.rb +4 -4
 - data/test/run-test.rb +1 -1
 - data/test/test-accessor.rb +1 -1
 - data/test/test-array.rb +1 -1
 - data/test/test-column.rb +1 -1
 - data/test/test-command-select.rb +1 -1
 - data/test/test-context.rb +21 -16
 - data/test/test-convert.rb +1 -1
 - data/test/test-database-dumper.rb +1 -1
 - data/test/test-database-inspector.rb +1 -1
 - data/test/test-database.rb +38 -25
 - data/test/test-double-array-trie.rb +1 -1
 - data/test/test-encoding.rb +1 -1
 - data/test/test-exception.rb +12 -7
 - data/test/test-expression-builder.rb +1 -1
 - data/test/test-expression.rb +1 -1
 - data/test/test-fix-size-column.rb +1 -1
 - data/test/test-geo-point.rb +1 -1
 - data/test/test-gqtp.rb +1 -1
 - data/test/test-hash.rb +1 -1
 - data/test/test-index-column.rb +1 -1
 - data/test/test-index-cursor.rb +1 -1
 - data/test/test-lock-timeout.rb +1 -1
 - data/test/test-logger.rb +1 -1
 - data/test/test-memory-pool.rb +1 -1
 - data/test/test-normalizer.rb +1 -1
 - data/test/test-pagination.rb +1 -1
 - data/test/test-patricia-trie.rb +1 -1
 - data/test/test-plugin.rb +1 -1
 - data/test/test-procedure.rb +9 -2
 - data/test/test-record.rb +1 -1
 - data/test/test-remote.rb +1 -1
 - data/test/test-schema-create-table.rb +1 -1
 - data/test/test-schema-dumper.rb +1 -1
 - data/test/test-schema-type.rb +1 -1
 - data/test/test-schema.rb +1 -1
 - data/test/test-snippet.rb +1 -1
 - data/test/test-statistic-measurer.rb +1 -1
 - data/test/test-sub-records.rb +1 -1
 - data/test/test-table-dumper.rb +1 -1
 - data/test/test-table-key-support.rb +1 -1
 - data/test/test-table-offset-and-limit.rb +1 -1
 - data/test/test-table-select-mecab.rb +1 -1
 - data/test/test-table-select-normalize.rb +1 -1
 - data/test/test-table-select-weight.rb +1 -1
 - data/test/test-table-select.rb +1 -1
 - data/test/test-table-traverse.rb +1 -1
 - data/test/test-table.rb +1 -1
 - data/test/test-type.rb +1 -1
 - data/test/test-variable-size-column.rb +136 -67
 - data/test/test-variable.rb +1 -1
 - data/test/test-vector-column.rb +1 -1
 - data/test/test-version.rb +1 -1
 - data/vendor/local/bin/groonga-benchmark.exe +0 -0
 - data/vendor/local/bin/groonga.exe +0 -0
 - data/vendor/local/bin/libgcc_s_seh-1.dll +0 -0
 - data/vendor/local/bin/libgroonga-0.dll +0 -0
 - data/vendor/local/bin/libmecab-1.dll +0 -0
 - data/vendor/local/bin/libmsgpack-3.dll +0 -0
 - data/vendor/local/bin/libmsgpackc-2.dll +0 -0
 - data/vendor/local/bin/libstdc++-6.dll +0 -0
 - data/vendor/local/bin/libwinpthread-1.dll +0 -0
 - data/vendor/local/bin/mecab-config +0 -0
 - data/vendor/local/bin/mecab.exe +0 -0
 - data/vendor/local/include/groonga/groonga/plugin.h +11 -83
 - data/vendor/local/include/groonga/groonga/tokenizer.h +10 -5
 - data/vendor/local/include/groonga/groonga.h +38 -5
 - data/vendor/local/include/msgpack/fbuffer.h +47 -0
 - data/vendor/local/include/msgpack/fbuffer.hpp +56 -0
 - data/vendor/local/include/msgpack/object.hpp +12 -3
 - data/vendor/local/include/msgpack/pack.h +7 -3
 - data/vendor/local/include/msgpack/pack.hpp +26 -7
 - data/vendor/local/include/msgpack/pack_template.h +34 -7
 - data/vendor/local/include/msgpack/sbuffer.h +3 -2
 - data/vendor/local/include/msgpack/sbuffer.hpp +1 -1
 - data/vendor/local/include/msgpack/sysdep.h +27 -14
 - data/vendor/local/include/msgpack/type/define.hpp +747 -561
 - data/vendor/local/include/msgpack/type/float.hpp +24 -4
 - data/vendor/local/include/msgpack/type/int.hpp +78 -13
 - data/vendor/local/include/msgpack/type/tr1/unordered_map.hpp +31 -10
 - data/vendor/local/include/msgpack/type/tr1/unordered_set.hpp +30 -10
 - data/vendor/local/include/msgpack/type.hpp +2 -1
 - data/vendor/local/include/msgpack/unpack.h +9 -9
 - data/vendor/local/include/msgpack/unpack_define.h +16 -14
 - data/vendor/local/include/msgpack/unpack_template.h +19 -8
 - data/vendor/local/include/msgpack/version.h +1 -1
 - data/vendor/local/include/msgpack/vrefbuffer.h +10 -9
 - data/vendor/local/include/msgpack/vrefbuffer.hpp +4 -2
 - data/vendor/local/include/msgpack/zbuffer.h +3 -2
 - data/vendor/local/include/msgpack/zbuffer.hpp +4 -2
 - data/vendor/local/include/msgpack/zone.h +5 -4
 - data/vendor/local/include/msgpack/zone.hpp +10 -1
 - data/vendor/local/include/msgpack.h +1 -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/query_expanders/tsv.la +1 -1
 - 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/suggest/suggest.la +1 -1
 - 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/table/table.la +1 -1
 - 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/plugins/tokenizers/mecab.la +2 -2
 - data/vendor/local/lib/libgroonga.a +0 -0
 - data/vendor/local/lib/libgroonga.dll.a +0 -0
 - data/vendor/local/lib/libgroonga.la +1 -1
 - data/vendor/local/lib/libmecab.a +0 -0
 - data/vendor/local/lib/libmecab.dll.a +0 -0
 - data/vendor/local/lib/libmecab.la +2 -2
 - data/vendor/local/lib/libmsgpack.a +0 -0
 - data/vendor/local/lib/libmsgpack.dll.a +0 -0
 - data/vendor/local/lib/libmsgpack.la +1 -1
 - data/vendor/local/lib/libmsgpackc.a +0 -0
 - data/vendor/local/lib/libmsgpackc.dll.a +0 -0
 - data/vendor/local/lib/libmsgpackc.la +1 -1
 - data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
 - data/vendor/local/lib/pkgconfig/msgpack.pc +10 -0
 - 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-restart +0 -0
 - data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/contribution/documentation/i18n.txt +2 -6
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +7 -26
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +9 -5
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +13 -15
 - 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 +4 -4
 - 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 +5 -5
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
 - data/vendor/local/share/doc/groonga/en/html/_sources/news/1.3.x.txt +49 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/news/2.x.txt +617 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/news/3.x.txt +536 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +149 -1194
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/plugin.txt +122 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/columns/vector.txt +0 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/check.txt +50 -55
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/clearlock.txt +25 -31
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_remove.txt +26 -29
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/define_selector.txt +20 -26
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/defrag.txt +26 -29
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/dump.txt +28 -28
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_level.txt +20 -26
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_put.txt +20 -26
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_reopen.txt +29 -34
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/normalizer_list.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/quit.txt +20 -20
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/register.txt +2 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/shutdown.txt +19 -20
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/status.txt +19 -24
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/suggest.txt +78 -87
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_list.txt +20 -22
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_remove.txt +19 -24
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/tokenize.txt +27 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/tokenizer_list.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-benchmark.txt +17 -5
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-suggest-learner.txt +17 -8
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga.txt +2 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/highlight_full.txt +132 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/highlight_html.txt +100 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/snippet_html.txt +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/server/http/comparison.txt +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/troubleshooting/mmap_cannot_allocate_memory.txt +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +6 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/drilldown.txt +3 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/index.txt +28 -25
 - data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +26 -21
 - data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/network.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/patricia_trie.txt +17 -12
 - data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/search.txt +44 -42
 - data/vendor/local/share/doc/groonga/en/html/_static/basic.css +0 -18
 - data/vendor/local/share/doc/groonga/en/html/_static/groonga.css +2 -0
 - data/vendor/local/share/doc/groonga/en/html/characteristic.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/community.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/development.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution/report.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/contribution.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/development.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/genindex.html +136 -26
 - data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/index.html +56 -56
 - data/vendor/local/share/doc/groonga/en/html/install/centos.html +43 -50
 - data/vendor/local/share/doc/groonga/en/html/install/debian.html +59 -35
 - data/vendor/local/share/doc/groonga/en/html/install/fedora.html +40 -44
 - data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +20 -22
 - data/vendor/local/share/doc/groonga/en/html/install/others.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/install/solaris.html +20 -22
 - data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +33 -35
 - data/vendor/local/share/doc/groonga/en/html/install/windows.html +26 -28
 - data/vendor/local/share/doc/groonga/en/html/install.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/limitations.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/news/0.x.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +160 -0
 - data/vendor/local/share/doc/groonga/en/html/news/2.x.html +804 -0
 - data/vendor/local/share/doc/groonga/en/html/news/3.x.html +727 -0
 - data/vendor/local/share/doc/groonga/en/html/news/senna.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/news.html +320 -1367
 - data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +19 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +23 -25
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +23 -25
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +19 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +28 -30
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +30 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +19 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +40 -42
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +20 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +35 -37
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +25 -27
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +226 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/cast.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/column.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +17 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/command.html +33 -35
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +73 -85
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +50 -62
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +53 -65
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +19 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +45 -57
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +49 -59
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +19 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +47 -51
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +19 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +44 -56
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +45 -57
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +54 -63
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +42 -46
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +20 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +41 -46
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +52 -64
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +201 -213
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +19 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +74 -81
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +42 -54
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +174 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +20 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +31 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +38 -27
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +19 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/executables.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/function.html +25 -25
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +22 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +311 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +278 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +42 -44
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +37 -39
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +53 -55
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +39 -41
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +40 -42
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +39 -41
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/log.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/output.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/tables.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/types.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/reference.html +41 -41
 - data/vendor/local/share/doc/groonga/en/html/search.html +11 -11
 - data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
 - data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/server/http.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/server/package.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/server.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/spec/search.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/spec.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/suggest.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +18 -20
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +28 -29
 - data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +52 -52
 - data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +21 -23
 - data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +57 -56
 - data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +22 -24
 - data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +20 -22
 - data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +46 -44
 - data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +17 -19
 - data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +71 -69
 - data/vendor/local/share/doc/groonga/en/html/tutorial.html +32 -34
 - data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/documentation/i18n.txt +2 -6
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +7 -26
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +9 -5
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +13 -15
 - 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 +4 -4
 - 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 +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.3.x.txt +49 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news/2.x.txt +617 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news/3.x.txt +536 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +149 -1194
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/plugin.txt +122 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/columns/vector.txt +0 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/check.txt +50 -55
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/clearlock.txt +25 -31
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_remove.txt +26 -29
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/define_selector.txt +20 -26
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/defrag.txt +26 -29
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/dump.txt +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_level.txt +20 -26
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_put.txt +20 -26
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_reopen.txt +29 -34
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/normalizer_list.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/quit.txt +20 -20
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/register.txt +2 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/shutdown.txt +19 -20
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/status.txt +19 -24
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/suggest.txt +78 -87
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_list.txt +20 -22
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_remove.txt +19 -24
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/tokenize.txt +27 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/tokenizer_list.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-benchmark.txt +17 -5
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-suggest-learner.txt +17 -8
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga.txt +2 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/highlight_full.txt +132 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/highlight_html.txt +100 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/snippet_html.txt +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/server/http/comparison.txt +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/troubleshooting/mmap_cannot_allocate_memory.txt +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +6 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/drilldown.txt +3 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/index.txt +28 -25
 - data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +26 -21
 - data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/network.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/patricia_trie.txt +17 -12
 - data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/search.txt +44 -42
 - data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +0 -18
 - data/vendor/local/share/doc/groonga/ja/html/_static/groonga.css +2 -0
 - data/vendor/local/share/doc/groonga/ja/html/characteristic.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/community.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/contribution.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/development.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/genindex.html +136 -26
 - data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/index.html +53 -53
 - data/vendor/local/share/doc/groonga/ja/html/install/centos.html +44 -50
 - data/vendor/local/share/doc/groonga/ja/html/install/debian.html +62 -36
 - data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +33 -35
 - data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +20 -22
 - data/vendor/local/share/doc/groonga/ja/html/install/others.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +20 -22
 - data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +34 -36
 - data/vendor/local/share/doc/groonga/ja/html/install/windows.html +26 -28
 - data/vendor/local/share/doc/groonga/ja/html/install.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/limitations.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +180 -0
 - data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +950 -0
 - data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +831 -0
 - data/vendor/local/share/doc/groonga/ja/html/news/senna.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/news.html +354 -1643
 - data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +24 -26
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +23 -25
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +28 -30
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +30 -32
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +40 -42
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +20 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +35 -37
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +25 -27
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +226 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/column.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +17 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/command.html +33 -35
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +73 -85
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +50 -62
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +42 -57
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +53 -65
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +27 -35
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +45 -57
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +49 -59
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +47 -51
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +44 -56
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +45 -57
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +54 -63
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +20 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +27 -30
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +42 -46
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +20 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +41 -46
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +52 -64
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +195 -207
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +74 -81
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +42 -54
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +172 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +26 -29
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +31 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +38 -27
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/function.html +25 -25
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +18 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +22 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +294 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +266 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +42 -44
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +37 -39
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +55 -62
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +39 -41
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +39 -41
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +39 -41
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/log.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/output.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/types.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference.html +41 -41
 - data/vendor/local/share/doc/groonga/ja/html/search.html +11 -11
 - data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/server/http.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/server/package.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/server.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/spec/search.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/spec.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/suggest.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +18 -20
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +24 -26
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +28 -31
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +33 -35
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +20 -22
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +43 -43
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +19 -21
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +21 -23
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +39 -38
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +17 -19
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +68 -64
 - data/vendor/local/share/doc/groonga/ja/html/tutorial.html +29 -31
 - data/vendor/local/share/groonga/examples/dictionary/edict/edict-import.sh +0 -0
 - data/vendor/local/share/groonga/examples/dictionary/edict/edict2grn.rb +2 -2
 - data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro-import.sh +0 -0
 - data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro2grn.rb +0 -0
 - data/vendor/local/share/groonga/examples/dictionary/gene95/gene-import.sh +0 -0
 - data/vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb +0 -0
 - data/vendor/local/share/groonga/examples/dictionary/html/index.html +2 -2
 - data/vendor/local/share/groonga/examples/dictionary/html/js/jquery-1.7.2.min.js +4 -0
 - data/vendor/local/share/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.min.js +356 -0
 - data/vendor/local/share/groonga/examples/dictionary/init-db.sh +0 -0
 - data/vendor/local/share/groonga/examples/dictionary/jmdict/jmdict.rb +0 -0
 - data/vendor/local/share/groonga/html/admin/css/groonga-admin.css +11 -0
 - data/vendor/local/share/groonga/html/admin/index.html +75 -75
 - data/vendor/local/share/groonga/html/admin/index.ja.html +301 -0
 - data/vendor/local/share/groonga/html/admin/js/groonga-admin.ja.js +1372 -0
 - data/vendor/local/share/groonga/html/admin/js/groonga-admin.js +28 -28
 - data/vendor/local/share/license/groonga/README.md +49 -0
 - data/vendor/local/share/man/ja/man1/groonga.1 +1934 -1247
 - data/vendor/local/share/man/man1/groonga.1 +2008 -1240
 - metadata +112 -84
 - data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
 - data/vendor/local/share/groonga/examples/dictionary/html/js/jquery-1.6.0.min.js +0 -16
 - data/vendor/local/share/groonga/examples/dictionary/html/js/jquery-ui-1.8.12.min.js +0 -406
 - data/vendor/local/share/license/groonga/AUTHORS +0 -17
 
| 
         @@ -0,0 +1,1372 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            // -*- js2-basic-offset: 2; indent-tabs-mode: nil -*-
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            "use strict";
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            function prim2html(prim, limit) {
         
     | 
| 
      
 6 
     | 
    
         
            +
              switch(typeof prim) {
         
     | 
| 
      
 7 
     | 
    
         
            +
              case 'undefined':
         
     | 
| 
      
 8 
     | 
    
         
            +
                return 'undefined';
         
     | 
| 
      
 9 
     | 
    
         
            +
              case 'boolean':
         
     | 
| 
      
 10 
     | 
    
         
            +
                return prim ? 'true' : 'false';
         
     | 
| 
      
 11 
     | 
    
         
            +
              case 'number':
         
     | 
| 
      
 12 
     | 
    
         
            +
                return String(prim);
         
     | 
| 
      
 13 
     | 
    
         
            +
              case 'string':
         
     | 
| 
      
 14 
     | 
    
         
            +
                if (prim.length > limit) {
         
     | 
| 
      
 15 
     | 
    
         
            +
                  prim = prim.substring(0, limit) + '...';
         
     | 
| 
      
 16 
     | 
    
         
            +
                }
         
     | 
| 
      
 17 
     | 
    
         
            +
                return escapeHTML(prim);
         
     | 
| 
      
 18 
     | 
    
         
            +
              case 'array':
         
     | 
| 
      
 19 
     | 
    
         
            +
              case 'object':
         
     | 
| 
      
 20 
     | 
    
         
            +
                if (prim == null) {
         
     | 
| 
      
 21 
     | 
    
         
            +
                  return 'null';
         
     | 
| 
      
 22 
     | 
    
         
            +
                } else if ($.isArray(prim)) {
         
     | 
| 
      
 23 
     | 
    
         
            +
                  return 'array'; /* TODO: implement */
         
     | 
| 
      
 24 
     | 
    
         
            +
                } else {
         
     | 
| 
      
 25 
     | 
    
         
            +
                  return 'object'; /* TODO: implement */
         
     | 
| 
      
 26 
     | 
    
         
            +
                }
         
     | 
| 
      
 27 
     | 
    
         
            +
              default:
         
     | 
| 
      
 28 
     | 
    
         
            +
                return 'ERROR';
         
     | 
| 
      
 29 
     | 
    
         
            +
              }
         
     | 
| 
      
 30 
     | 
    
         
            +
            }
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            function escapeHTML(str) {
         
     | 
| 
      
 33 
     | 
    
         
            +
              return str.replace(/&/g, "&")
         
     | 
| 
      
 34 
     | 
    
         
            +
                        .replace(/"/g, """)
         
     | 
| 
      
 35 
     | 
    
         
            +
                        .replace(/</g, "<")
         
     | 
| 
      
 36 
     | 
    
         
            +
                        .replace(/>/g, ">");
         
     | 
| 
      
 37 
     | 
    
         
            +
            }
         
     | 
| 
      
 38 
     | 
    
         
            +
            var Groonga = {
         
     | 
| 
      
 39 
     | 
    
         
            +
              key_type_list: ['Int8', 'UInt8', 'Int16', 'UInt16', 'Int32', 'UInt32',
         
     | 
| 
      
 40 
     | 
    
         
            +
                              'Int64', 'UInt64', 'Float', 'Time', 'ShortText',
         
     | 
| 
      
 41 
     | 
    
         
            +
                              'TokyoGeoPoint', 'WGS84GeoPoint'],
         
     | 
| 
      
 42 
     | 
    
         
            +
              value_type_list: ['Object', 'Bool',
         
     | 
| 
      
 43 
     | 
    
         
            +
                                'Int8', 'UInt8', 'Int16', 'UInt16', 'Int32', 'UInt32',
         
     | 
| 
      
 44 
     | 
    
         
            +
                                'Int64', 'UInt64', 'Float', 'Time'],
         
     | 
| 
      
 45 
     | 
    
         
            +
              column_type_list: ['Object', 'Bool',
         
     | 
| 
      
 46 
     | 
    
         
            +
                                 'Int8', 'UInt8', 'Int16', 'UInt16', 'Int32', 'UInt32',
         
     | 
| 
      
 47 
     | 
    
         
            +
                                 'Int64', 'UInt64', 'Float', 'Time', 'ShortText',
         
     | 
| 
      
 48 
     | 
    
         
            +
                                 'Text', 'LongText', 'TokyoGeoPoint', 'WGS84GeoPoint'],
         
     | 
| 
      
 49 
     | 
    
         
            +
              tokenizer_list: ['TokenDelimit', 'TokenUnigram', 'TokenBigram', 'TokenTrigram', 'TokenMecab'],
         
     | 
| 
      
 50 
     | 
    
         
            +
              GRN_OBJ_PERSISTENT:             (0x01<<15),
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
              GRN_OBJ_TABLE_TYPE_MASK:        (0x07),
         
     | 
| 
      
 53 
     | 
    
         
            +
              GRN_OBJ_TABLE_HASH_KEY:         (0x00),
         
     | 
| 
      
 54 
     | 
    
         
            +
              GRN_OBJ_TABLE_PAT_KEY:          (0x01),
         
     | 
| 
      
 55 
     | 
    
         
            +
              GRN_OBJ_TABLE_NO_KEY:           (0x03),
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
              GRN_OBJ_KEY_WITH_SIS:           (0x01<<6),
         
     | 
| 
      
 58 
     | 
    
         
            +
              GRN_OBJ_KEY_NORMALIZE:          (0x01<<7),
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
              GRN_OBJ_COLUMN_TYPE_MASK:       (0x07),
         
     | 
| 
      
 61 
     | 
    
         
            +
              GRN_OBJ_COLUMN_SCALAR:          (0x00),
         
     | 
| 
      
 62 
     | 
    
         
            +
              GRN_OBJ_COLUMN_VECTOR:          (0x01),
         
     | 
| 
      
 63 
     | 
    
         
            +
              GRN_OBJ_COLUMN_INDEX:           (0x02),
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
              GRN_OBJ_COMPRESS_MASK:          (0x07<<4),
         
     | 
| 
      
 66 
     | 
    
         
            +
              GRN_OBJ_COMPRESS_NONE:          (0x00<<4),
         
     | 
| 
      
 67 
     | 
    
         
            +
              GRN_OBJ_COMPRESS_ZLIB:          (0x01<<4),
         
     | 
| 
      
 68 
     | 
    
         
            +
              GRN_OBJ_COMPRESS_LZO:           (0x02<<4),
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
              GRN_OBJ_WITH_SECTION:           (0x01<<7),
         
     | 
| 
      
 71 
     | 
    
         
            +
              GRN_OBJ_WITH_WEIGHT:            (0x01<<8),
         
     | 
| 
      
 72 
     | 
    
         
            +
              GRN_OBJ_WITH_POSITION:          (0x01<<9)
         
     | 
| 
      
 73 
     | 
    
         
            +
            };
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
            $.widget("ui.paginate", {
         
     | 
| 
      
 76 
     | 
    
         
            +
              version: "1.0",
         
     | 
| 
      
 77 
     | 
    
         
            +
              options: {
         
     | 
| 
      
 78 
     | 
    
         
            +
                total: 0,
         
     | 
| 
      
 79 
     | 
    
         
            +
                nItemsPerPage: 10,
         
     | 
| 
      
 80 
     | 
    
         
            +
                currentPage: 0,
         
     | 
| 
      
 81 
     | 
    
         
            +
                nShowLinks: 10,
         
     | 
| 
      
 82 
     | 
    
         
            +
                callback: null
         
     | 
| 
      
 83 
     | 
    
         
            +
              },
         
     | 
| 
      
 84 
     | 
    
         
            +
              _create: function() {
         
     | 
| 
      
 85 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 86 
     | 
    
         
            +
                var element = this.element;
         
     | 
| 
      
 87 
     | 
    
         
            +
                element.addClass("pager");
         
     | 
| 
      
 88 
     | 
    
         
            +
             
     | 
| 
      
 89 
     | 
    
         
            +
                var total = this.options.total;
         
     | 
| 
      
 90 
     | 
    
         
            +
                var nItemsPerPage = this.options.nItemsPerPage;
         
     | 
| 
      
 91 
     | 
    
         
            +
                var currentPage = this.options.currentPage;
         
     | 
| 
      
 92 
     | 
    
         
            +
                var nShowLinks = this.options.nShowLinks;
         
     | 
| 
      
 93 
     | 
    
         
            +
                var lastPage = Math.floor((total - 1) / nItemsPerPage) + 1;
         
     | 
| 
      
 94 
     | 
    
         
            +
                var start = currentPage - Math.floor(nShowLinks / 2);
         
     | 
| 
      
 95 
     | 
    
         
            +
                start = (start < 1) ? 1 : start;
         
     | 
| 
      
 96 
     | 
    
         
            +
                var end = start + nShowLinks - 1;
         
     | 
| 
      
 97 
     | 
    
         
            +
                end = (end > lastPage) ? lastPage : end;
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
                var callback = this.options.callback;
         
     | 
| 
      
 100 
     | 
    
         
            +
                if (start > 1) {
         
     | 
| 
      
 101 
     | 
    
         
            +
                  element.append($('<span />')
         
     | 
| 
      
 102 
     | 
    
         
            +
                                 .addClass('pager')
         
     | 
| 
      
 103 
     | 
    
         
            +
                                 .append($('<a />')
         
     | 
| 
      
 104 
     | 
    
         
            +
                                         .attr('href', '#')
         
     | 
| 
      
 105 
     | 
    
         
            +
                                         .text('1')
         
     | 
| 
      
 106 
     | 
    
         
            +
                                         .click(function () {callback(0)})));
         
     | 
| 
      
 107 
     | 
    
         
            +
                  element.append($('<span />').text('....'));
         
     | 
| 
      
 108 
     | 
    
         
            +
                }
         
     | 
| 
      
 109 
     | 
    
         
            +
                for (var i = start; i <= end; i++) {
         
     | 
| 
      
 110 
     | 
    
         
            +
                  var page = $('<span />').append($('<a />')
         
     | 
| 
      
 111 
     | 
    
         
            +
                                                  .attr('href', '#')
         
     | 
| 
      
 112 
     | 
    
         
            +
                                                  .text(String(i))
         
     | 
| 
      
 113 
     | 
    
         
            +
                                                  .click(function () {
         
     | 
| 
      
 114 
     | 
    
         
            +
                                                    callback(Number($(this).text()) - 1);
         
     | 
| 
      
 115 
     | 
    
         
            +
                                                  }));
         
     | 
| 
      
 116 
     | 
    
         
            +
                  if (i == currentPage) {
         
     | 
| 
      
 117 
     | 
    
         
            +
                    page.addClass('pager-current');
         
     | 
| 
      
 118 
     | 
    
         
            +
                  } else {
         
     | 
| 
      
 119 
     | 
    
         
            +
                    page.addClass('pager');
         
     | 
| 
      
 120 
     | 
    
         
            +
                  }
         
     | 
| 
      
 121 
     | 
    
         
            +
                  element.append(page);
         
     | 
| 
      
 122 
     | 
    
         
            +
                }
         
     | 
| 
      
 123 
     | 
    
         
            +
                if (end < lastPage) {
         
     | 
| 
      
 124 
     | 
    
         
            +
                  element.append($('<span />')
         
     | 
| 
      
 125 
     | 
    
         
            +
                                 .text('....'));
         
     | 
| 
      
 126 
     | 
    
         
            +
                  element.append($('<span />')
         
     | 
| 
      
 127 
     | 
    
         
            +
                                 .addClass('pager')
         
     | 
| 
      
 128 
     | 
    
         
            +
                                 .append($('<a />')
         
     | 
| 
      
 129 
     | 
    
         
            +
                                         .attr('href', '#')
         
     | 
| 
      
 130 
     | 
    
         
            +
                                         .text(String(lastPage))
         
     | 
| 
      
 131 
     | 
    
         
            +
                                         .click(function () {callback(lastPage - 1);})));
         
     | 
| 
      
 132 
     | 
    
         
            +
                }
         
     | 
| 
      
 133 
     | 
    
         
            +
              }
         
     | 
| 
      
 134 
     | 
    
         
            +
            });
         
     | 
| 
      
 135 
     | 
    
         
            +
             
     | 
| 
      
 136 
     | 
    
         
            +
            function GroongaAdmin() {
         
     | 
| 
      
 137 
     | 
    
         
            +
              this.current_table = null;
         
     | 
| 
      
 138 
     | 
    
         
            +
              this.statusTimer = null;
         
     | 
| 
      
 139 
     | 
    
         
            +
              this.semaphore = new Array();
         
     | 
| 
      
 140 
     | 
    
         
            +
              this.current_status = 0;
         
     | 
| 
      
 141 
     | 
    
         
            +
              this.reload_record_func = function(){};
         
     | 
| 
      
 142 
     | 
    
         
            +
             
     | 
| 
      
 143 
     | 
    
         
            +
              var that = this;
         
     | 
| 
      
 144 
     | 
    
         
            +
              this._initializeTabs();
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
              $('#tab-tablelist-link').click(function() {
         
     | 
| 
      
 147 
     | 
    
         
            +
                that.tablelist();
         
     | 
| 
      
 148 
     | 
    
         
            +
              });
         
     | 
| 
      
 149 
     | 
    
         
            +
              $('#tab-columnlist-link').click(function() {
         
     | 
| 
      
 150 
     | 
    
         
            +
                that.columnlist(that.current_table);
         
     | 
| 
      
 151 
     | 
    
         
            +
              });
         
     | 
| 
      
 152 
     | 
    
         
            +
              $('#tab-createrecord-link').click(function() {
         
     | 
| 
      
 153 
     | 
    
         
            +
                that.update_createrecord(that.current_table);
         
     | 
| 
      
 154 
     | 
    
         
            +
              });
         
     | 
| 
      
 155 
     | 
    
         
            +
              $('#tab-recordlist-link').click(function() {
         
     | 
| 
      
 156 
     | 
    
         
            +
                that.reload_record_func();
         
     | 
| 
      
 157 
     | 
    
         
            +
              });
         
     | 
| 
      
 158 
     | 
    
         
            +
              $('#createtable-add-table').click(function() {
         
     | 
| 
      
 159 
     | 
    
         
            +
                that.createtable();
         
     | 
| 
      
 160 
     | 
    
         
            +
              });
         
     | 
| 
      
 161 
     | 
    
         
            +
              $('#createrecord-add-record').click(function() {
         
     | 
| 
      
 162 
     | 
    
         
            +
                that.createrecord();
         
     | 
| 
      
 163 
     | 
    
         
            +
              });
         
     | 
| 
      
 164 
     | 
    
         
            +
              $('#createcolumn-add-column').click(function() {
         
     | 
| 
      
 165 
     | 
    
         
            +
                that.createcolumn();
         
     | 
| 
      
 166 
     | 
    
         
            +
              });
         
     | 
| 
      
 167 
     | 
    
         
            +
              $('#recordlist-remove-record').click(function() {
         
     | 
| 
      
 168 
     | 
    
         
            +
                that.removerecord();
         
     | 
| 
      
 169 
     | 
    
         
            +
              });
         
     | 
| 
      
 170 
     | 
    
         
            +
              $('#columnlist-remove-column').click(function() {
         
     | 
| 
      
 171 
     | 
    
         
            +
                that.removecolumn();
         
     | 
| 
      
 172 
     | 
    
         
            +
              });
         
     | 
| 
      
 173 
     | 
    
         
            +
              $('#tablelist-remove-table').click(function() {
         
     | 
| 
      
 174 
     | 
    
         
            +
                that.removetable();
         
     | 
| 
      
 175 
     | 
    
         
            +
              });
         
     | 
| 
      
 176 
     | 
    
         
            +
              $('#tab-recordlist-form').submit(function() {
         
     | 
| 
      
 177 
     | 
    
         
            +
                if ($('#table-tab-recordlist-full-checkbox').attr('checked')) {
         
     | 
| 
      
 178 
     | 
    
         
            +
                  // full
         
     | 
| 
      
 179 
     | 
    
         
            +
                  var d = {
         
     | 
| 
      
 180 
     | 
    
         
            +
                    'table': that.current_table
         
     | 
| 
      
 181 
     | 
    
         
            +
                  }
         
     | 
| 
      
 182 
     | 
    
         
            +
                  $.each(that.SELECT_PARAMS, function(i, val) {
         
     | 
| 
      
 183 
     | 
    
         
            +
                    var e = $('#tab-recordlist-' + val);
         
     | 
| 
      
 184 
     | 
    
         
            +
                    if (e.val()) {
         
     | 
| 
      
 185 
     | 
    
         
            +
                      d[val] = e.val();
         
     | 
| 
      
 186 
     | 
    
         
            +
                    }
         
     | 
| 
      
 187 
     | 
    
         
            +
                  });
         
     | 
| 
      
 188 
     | 
    
         
            +
                  that.recordlist(d, true);
         
     | 
| 
      
 189 
     | 
    
         
            +
                } else {
         
     | 
| 
      
 190 
     | 
    
         
            +
                  // simple
         
     | 
| 
      
 191 
     | 
    
         
            +
                  that.recordlist_simple(
         
     | 
| 
      
 192 
     | 
    
         
            +
                    that.current_table,
         
     | 
| 
      
 193 
     | 
    
         
            +
                    $('#tab-recordlist-simplequery').val(),
         
     | 
| 
      
 194 
     | 
    
         
            +
                    $('#tab-recordlist-simplequerytype').val(),
         
     | 
| 
      
 195 
     | 
    
         
            +
                    1);
         
     | 
| 
      
 196 
     | 
    
         
            +
                }
         
     | 
| 
      
 197 
     | 
    
         
            +
                return false;
         
     | 
| 
      
 198 
     | 
    
         
            +
              });
         
     | 
| 
      
 199 
     | 
    
         
            +
              this._initializeSideMenu();
         
     | 
| 
      
 200 
     | 
    
         
            +
              this.update_tablelist();
         
     | 
| 
      
 201 
     | 
    
         
            +
             
     | 
| 
      
 202 
     | 
    
         
            +
              var e1 = $('#createtable-key-type-builtin');
         
     | 
| 
      
 203 
     | 
    
         
            +
              $.each(Groonga.key_type_list, function(i, val) {
         
     | 
| 
      
 204 
     | 
    
         
            +
                e1.append($('<option />').val(val).text(val));
         
     | 
| 
      
 205 
     | 
    
         
            +
              });
         
     | 
| 
      
 206 
     | 
    
         
            +
             
     | 
| 
      
 207 
     | 
    
         
            +
              e1 = $('#createtable-value-type-builtin');
         
     | 
| 
      
 208 
     | 
    
         
            +
              e1.append($('<option />').val('').text('なし'));
         
     | 
| 
      
 209 
     | 
    
         
            +
              $.each(Groonga.value_type_list, function(i, val) {
         
     | 
| 
      
 210 
     | 
    
         
            +
                e1.append($('<option />').val(val).text(val));
         
     | 
| 
      
 211 
     | 
    
         
            +
              });
         
     | 
| 
      
 212 
     | 
    
         
            +
             
     | 
| 
      
 213 
     | 
    
         
            +
              e1 = $('#createtable-default-tokenizer-builtin');
         
     | 
| 
      
 214 
     | 
    
         
            +
              e1.append($('<option />').val('').text('なし'));
         
     | 
| 
      
 215 
     | 
    
         
            +
              $.each(Groonga.tokenizer_list, function(i, val) {
         
     | 
| 
      
 216 
     | 
    
         
            +
                e1.append($('<option />').val(val).text(val));
         
     | 
| 
      
 217 
     | 
    
         
            +
              });
         
     | 
| 
      
 218 
     | 
    
         
            +
             
     | 
| 
      
 219 
     | 
    
         
            +
              e1 = $('#createcolumn-type-builtin');
         
     | 
| 
      
 220 
     | 
    
         
            +
              $.each(Groonga.column_type_list, function(i, val) {
         
     | 
| 
      
 221 
     | 
    
         
            +
                e1.append($('<option />').val(val).text(val));
         
     | 
| 
      
 222 
     | 
    
         
            +
              });
         
     | 
| 
      
 223 
     | 
    
         
            +
             
     | 
| 
      
 224 
     | 
    
         
            +
              $('#tab-recordlist-simplequerytype').change(function() {
         
     | 
| 
      
 225 
     | 
    
         
            +
                if ($(this).val() == 'scorer') {
         
     | 
| 
      
 226 
     | 
    
         
            +
                  $('#tab-recordlist-incremental').hide();
         
     | 
| 
      
 227 
     | 
    
         
            +
                  $('#tab-recordlist-incremental-label').hide();
         
     | 
| 
      
 228 
     | 
    
         
            +
                } else {
         
     | 
| 
      
 229 
     | 
    
         
            +
                  $('#tab-recordlist-incremental').show();
         
     | 
| 
      
 230 
     | 
    
         
            +
                  $('#tab-recordlist-incremental-label').show();
         
     | 
| 
      
 231 
     | 
    
         
            +
                }
         
     | 
| 
      
 232 
     | 
    
         
            +
                $('#tab-recordlist-incremental').change();
         
     | 
| 
      
 233 
     | 
    
         
            +
             
     | 
| 
      
 234 
     | 
    
         
            +
                var selectedOption = $(this).find(':selected');
         
     | 
| 
      
 235 
     | 
    
         
            +
                $('#tab-recordlist-simplequery').attr(
         
     | 
| 
      
 236 
     | 
    
         
            +
                  'placeholder', selectedOption.data('placeholder')
         
     | 
| 
      
 237 
     | 
    
         
            +
                );
         
     | 
| 
      
 238 
     | 
    
         
            +
              }).change();
         
     | 
| 
      
 239 
     | 
    
         
            +
             
     | 
| 
      
 240 
     | 
    
         
            +
              $('#table-tab-recordlist-full-checkbox').change(function() {
         
     | 
| 
      
 241 
     | 
    
         
            +
                if ($(this).attr('checked')) {
         
     | 
| 
      
 242 
     | 
    
         
            +
                  $('#table-tab-recordlist-form-simple').hide();
         
     | 
| 
      
 243 
     | 
    
         
            +
                  $('#table-tab-recordlist-form-full').show();
         
     | 
| 
      
 244 
     | 
    
         
            +
                } else {
         
     | 
| 
      
 245 
     | 
    
         
            +
                  $('#table-tab-recordlist-form-simple').show();
         
     | 
| 
      
 246 
     | 
    
         
            +
                  $('#table-tab-recordlist-form-full').hide();
         
     | 
| 
      
 247 
     | 
    
         
            +
                }
         
     | 
| 
      
 248 
     | 
    
         
            +
              }).change();
         
     | 
| 
      
 249 
     | 
    
         
            +
             
     | 
| 
      
 250 
     | 
    
         
            +
              $('#tab-recordlist-incremental').change(function() {
         
     | 
| 
      
 251 
     | 
    
         
            +
                $('#tab-recordlist-simplequery').unbind('keyup');
         
     | 
| 
      
 252 
     | 
    
         
            +
                if ($(this).attr('checked') &&
         
     | 
| 
      
 253 
     | 
    
         
            +
                    $('#tab-recordlist-simplequerytype').val() != 'scorer') {
         
     | 
| 
      
 254 
     | 
    
         
            +
                  $('#tab-recordlist-simplequery').keyup(function(e) {
         
     | 
| 
      
 255 
     | 
    
         
            +
                    that.recordlist_simple(
         
     | 
| 
      
 256 
     | 
    
         
            +
                      that.current_table,
         
     | 
| 
      
 257 
     | 
    
         
            +
                      $('#tab-recordlist-simplequery').val(),
         
     | 
| 
      
 258 
     | 
    
         
            +
                      $('#tab-recordlist-simplequerytype').val(),
         
     | 
| 
      
 259 
     | 
    
         
            +
                      1,
         
     | 
| 
      
 260 
     | 
    
         
            +
                      true);
         
     | 
| 
      
 261 
     | 
    
         
            +
                  });
         
     | 
| 
      
 262 
     | 
    
         
            +
                }
         
     | 
| 
      
 263 
     | 
    
         
            +
              }).change();
         
     | 
| 
      
 264 
     | 
    
         
            +
             
     | 
| 
      
 265 
     | 
    
         
            +
              $('#createcolumn-type').change(function(e) {
         
     | 
| 
      
 266 
     | 
    
         
            +
                var s = $('#createcolumn-type-table option:selected');
         
     | 
| 
      
 267 
     | 
    
         
            +
                var cs = $('#createcolumn-source');
         
     | 
| 
      
 268 
     | 
    
         
            +
                if (s.length > 0) {
         
     | 
| 
      
 269 
     | 
    
         
            +
                  cs.empty().removeAttr('disabled');
         
     | 
| 
      
 270 
     | 
    
         
            +
                  that.showloading(
         
     | 
| 
      
 271 
     | 
    
         
            +
                    $.ajax({
         
     | 
| 
      
 272 
     | 
    
         
            +
                      url: '/d/column_list',
         
     | 
| 
      
 273 
     | 
    
         
            +
                      data: {'table': s.val()},
         
     | 
| 
      
 274 
     | 
    
         
            +
                      dataType: 'json',
         
     | 
| 
      
 275 
     | 
    
         
            +
                      success: function(d) {
         
     | 
| 
      
 276 
     | 
    
         
            +
                        if(that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 277 
     | 
    
         
            +
                        var idx;
         
     | 
| 
      
 278 
     | 
    
         
            +
                        var b = d[1];
         
     | 
| 
      
 279 
     | 
    
         
            +
                        $.each(b[0], function(i, val) {
         
     | 
| 
      
 280 
     | 
    
         
            +
                          if (val[0] == 'name') { idx = i; }
         
     | 
| 
      
 281 
     | 
    
         
            +
                        });
         
     | 
| 
      
 282 
     | 
    
         
            +
                        if (idx) {
         
     | 
| 
      
 283 
     | 
    
         
            +
                          b.shift();
         
     | 
| 
      
 284 
     | 
    
         
            +
                          $.each(b, function(i, val) {
         
     | 
| 
      
 285 
     | 
    
         
            +
                            cs.append($('<option />').val(val[idx]).text(val[idx]));
         
     | 
| 
      
 286 
     | 
    
         
            +
                          });
         
     | 
| 
      
 287 
     | 
    
         
            +
                        }
         
     | 
| 
      
 288 
     | 
    
         
            +
                        that.hideloading();
         
     | 
| 
      
 289 
     | 
    
         
            +
                      },
         
     | 
| 
      
 290 
     | 
    
         
            +
                      error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 291 
     | 
    
         
            +
                        that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 292 
     | 
    
         
            +
                      }
         
     | 
| 
      
 293 
     | 
    
         
            +
                    })
         
     | 
| 
      
 294 
     | 
    
         
            +
                  );
         
     | 
| 
      
 295 
     | 
    
         
            +
                } else {
         
     | 
| 
      
 296 
     | 
    
         
            +
                  cs.empty().attr('disabled', 'disabled');
         
     | 
| 
      
 297 
     | 
    
         
            +
                }
         
     | 
| 
      
 298 
     | 
    
         
            +
              });
         
     | 
| 
      
 299 
     | 
    
         
            +
             
     | 
| 
      
 300 
     | 
    
         
            +
              this.recordlist_count = 30;
         
     | 
| 
      
 301 
     | 
    
         
            +
            };
         
     | 
| 
      
 302 
     | 
    
         
            +
             
     | 
| 
      
 303 
     | 
    
         
            +
            jQuery.extend(GroongaAdmin.prototype, {
         
     | 
| 
      
 304 
     | 
    
         
            +
              SELECT_PARAMS: [
         
     | 
| 
      
 305 
     | 
    
         
            +
                'match_columns', 'query', 'filter',
         
     | 
| 
      
 306 
     | 
    
         
            +
                'scorer',
         
     | 
| 
      
 307 
     | 
    
         
            +
                'output_columns',
         
     | 
| 
      
 308 
     | 
    
         
            +
                'sortby', 'offset', 'limit',
         
     | 
| 
      
 309 
     | 
    
         
            +
                'drilldown',
         
     | 
| 
      
 310 
     | 
    
         
            +
                'drilldown_output_columns',
         
     | 
| 
      
 311 
     | 
    
         
            +
                'drilldown_sortby', 'drilldown_offset', 'drilldown_limit'
         
     | 
| 
      
 312 
     | 
    
         
            +
              ],
         
     | 
| 
      
 313 
     | 
    
         
            +
              _initializeTabs: function() {
         
     | 
| 
      
 314 
     | 
    
         
            +
                this._initializeDatabaseTab();
         
     | 
| 
      
 315 
     | 
    
         
            +
                this._initializeTableTab();
         
     | 
| 
      
 316 
     | 
    
         
            +
                this._initializeSuggestTab();
         
     | 
| 
      
 317 
     | 
    
         
            +
                this._selectTab("database");
         
     | 
| 
      
 318 
     | 
    
         
            +
              },
         
     | 
| 
      
 319 
     | 
    
         
            +
              _initializeDatabaseTab: function() {
         
     | 
| 
      
 320 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 321 
     | 
    
         
            +
             
     | 
| 
      
 322 
     | 
    
         
            +
                this._$databaseTabs = $('#database-tabs').tabs({
         
     | 
| 
      
 323 
     | 
    
         
            +
                  show: function(e, ui) {
         
     | 
| 
      
 324 
     | 
    
         
            +
            	that.stop_status_timer();
         
     | 
| 
      
 325 
     | 
    
         
            +
            	if (ui.panel.id == 'database-tab-summary') {
         
     | 
| 
      
 326 
     | 
    
         
            +
                      that.start_status_timer();
         
     | 
| 
      
 327 
     | 
    
         
            +
            	}
         
     | 
| 
      
 328 
     | 
    
         
            +
                  }
         
     | 
| 
      
 329 
     | 
    
         
            +
                });
         
     | 
| 
      
 330 
     | 
    
         
            +
              },
         
     | 
| 
      
 331 
     | 
    
         
            +
              _initializeTableTab: function() {
         
     | 
| 
      
 332 
     | 
    
         
            +
                this._$tableTabs = $('#table-tabs').tabs({
         
     | 
| 
      
 333 
     | 
    
         
            +
                  show: function(e, ui) {
         
     | 
| 
      
 334 
     | 
    
         
            +
                  }
         
     | 
| 
      
 335 
     | 
    
         
            +
                });
         
     | 
| 
      
 336 
     | 
    
         
            +
              },
         
     | 
| 
      
 337 
     | 
    
         
            +
              _initializeSuggestTab: function() {
         
     | 
| 
      
 338 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 339 
     | 
    
         
            +
             
     | 
| 
      
 340 
     | 
    
         
            +
                this._$suggestTabs = $('#suggest-tabs').tabs({
         
     | 
| 
      
 341 
     | 
    
         
            +
                  show: function(e, ui) {
         
     | 
| 
      
 342 
     | 
    
         
            +
                  }
         
     | 
| 
      
 343 
     | 
    
         
            +
                });
         
     | 
| 
      
 344 
     | 
    
         
            +
             
     | 
| 
      
 345 
     | 
    
         
            +
                this._initializeSuggestDatasetComplete();
         
     | 
| 
      
 346 
     | 
    
         
            +
                this._initializeSuggestQueryComplete();
         
     | 
| 
      
 347 
     | 
    
         
            +
                this._initializeSuggestSubmit();
         
     | 
| 
      
 348 
     | 
    
         
            +
                this._initializeSuggestResult();
         
     | 
| 
      
 349 
     | 
    
         
            +
              },
         
     | 
| 
      
 350 
     | 
    
         
            +
              _initializeSuggestDatasetComplete: function() {
         
     | 
| 
      
 351 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 352 
     | 
    
         
            +
                var $dataset = $("#suggest-dataset");
         
     | 
| 
      
 353 
     | 
    
         
            +
                this._$suggestDataset = $dataset;
         
     | 
| 
      
 354 
     | 
    
         
            +
                $dataset.autocomplete({
         
     | 
| 
      
 355 
     | 
    
         
            +
                  minLength: 0,
         
     | 
| 
      
 356 
     | 
    
         
            +
                  source: function (request, response) {
         
     | 
| 
      
 357 
     | 
    
         
            +
            	var datasets = [];
         
     | 
| 
      
 358 
     | 
    
         
            +
            	$.each(that._tables, function(i, table_name) {
         
     | 
| 
      
 359 
     | 
    
         
            +
                      var suggestTableMatch = /^item_(.+)$/.exec(table_name);
         
     | 
| 
      
 360 
     | 
    
         
            +
                      if (suggestTableMatch) {
         
     | 
| 
      
 361 
     | 
    
         
            +
                        var dataset = suggestTableMatch[1];
         
     | 
| 
      
 362 
     | 
    
         
            +
                        datasets.push(dataset);
         
     | 
| 
      
 363 
     | 
    
         
            +
                      }
         
     | 
| 
      
 364 
     | 
    
         
            +
                    });
         
     | 
| 
      
 365 
     | 
    
         
            +
             
     | 
| 
      
 366 
     | 
    
         
            +
                    datasets = $.ui.autocomplete.filter(datasets, request.term);
         
     | 
| 
      
 367 
     | 
    
         
            +
                    response(datasets);
         
     | 
| 
      
 368 
     | 
    
         
            +
                  }
         
     | 
| 
      
 369 
     | 
    
         
            +
                });
         
     | 
| 
      
 370 
     | 
    
         
            +
                $dataset.focus(function (event) {
         
     | 
| 
      
 371 
     | 
    
         
            +
                  $dataset.autocomplete("search", $dataset.val());
         
     | 
| 
      
 372 
     | 
    
         
            +
                });
         
     | 
| 
      
 373 
     | 
    
         
            +
              },
         
     | 
| 
      
 374 
     | 
    
         
            +
              _suggestParameters: function(query, dataset, type) {
         
     | 
| 
      
 375 
     | 
    
         
            +
                var nItemsPerPage = 30;
         
     | 
| 
      
 376 
     | 
    
         
            +
                return {
         
     | 
| 
      
 377 
     | 
    
         
            +
                  query: query,
         
     | 
| 
      
 378 
     | 
    
         
            +
                  types: type,
         
     | 
| 
      
 379 
     | 
    
         
            +
                  table: "item_" + dataset,
         
     | 
| 
      
 380 
     | 
    
         
            +
                  column: "kana",
         
     | 
| 
      
 381 
     | 
    
         
            +
                  offset: 0,
         
     | 
| 
      
 382 
     | 
    
         
            +
                  limit: nItemsPerPage,
         
     | 
| 
      
 383 
     | 
    
         
            +
                };
         
     | 
| 
      
 384 
     | 
    
         
            +
              },
         
     | 
| 
      
 385 
     | 
    
         
            +
              _initializeSuggestQueryComplete: function() {
         
     | 
| 
      
 386 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 387 
     | 
    
         
            +
                this._$suggestQuery = $("#suggest-query").autocomplete({
         
     | 
| 
      
 388 
     | 
    
         
            +
                  source: function (request, response) {
         
     | 
| 
      
 389 
     | 
    
         
            +
                    var $dataset = $("#suggest-dataset");
         
     | 
| 
      
 390 
     | 
    
         
            +
                    var dataset = $dataset.val();
         
     | 
| 
      
 391 
     | 
    
         
            +
                    $("#suggest-submit").click();
         
     | 
| 
      
 392 
     | 
    
         
            +
                    $.ajax({
         
     | 
| 
      
 393 
     | 
    
         
            +
                      url: "/d/suggest",
         
     | 
| 
      
 394 
     | 
    
         
            +
                      data: that._suggestParameters(request.term, dataset, "complete"),
         
     | 
| 
      
 395 
     | 
    
         
            +
                      dataType: "jsonp",
         
     | 
| 
      
 396 
     | 
    
         
            +
                      success: function (data, textStatus, jqXHR) {
         
     | 
| 
      
 397 
     | 
    
         
            +
                        var completions = data[1]["complete"];
         
     | 
| 
      
 398 
     | 
    
         
            +
                        var items = [];
         
     | 
| 
      
 399 
     | 
    
         
            +
                        if (completions && completions.length > 2) {
         
     | 
| 
      
 400 
     | 
    
         
            +
                          completions.shift();
         
     | 
| 
      
 401 
     | 
    
         
            +
                          completions.shift();
         
     | 
| 
      
 402 
     | 
    
         
            +
                          $.each(completions, function(i, item) {
         
     | 
| 
      
 403 
     | 
    
         
            +
                            var key = item[0];
         
     | 
| 
      
 404 
     | 
    
         
            +
                            items.push(key);
         
     | 
| 
      
 405 
     | 
    
         
            +
                            if (items.length >= 3) {
         
     | 
| 
      
 406 
     | 
    
         
            +
                              return false;
         
     | 
| 
      
 407 
     | 
    
         
            +
                            }
         
     | 
| 
      
 408 
     | 
    
         
            +
                            return true;
         
     | 
| 
      
 409 
     | 
    
         
            +
                          });
         
     | 
| 
      
 410 
     | 
    
         
            +
                        }
         
     | 
| 
      
 411 
     | 
    
         
            +
                        response(items);
         
     | 
| 
      
 412 
     | 
    
         
            +
                      },
         
     | 
| 
      
 413 
     | 
    
         
            +
                      error: function(jqXHR, textStatus, errorThrown) {
         
     | 
| 
      
 414 
     | 
    
         
            +
                      }
         
     | 
| 
      
 415 
     | 
    
         
            +
            	});
         
     | 
| 
      
 416 
     | 
    
         
            +
                  }
         
     | 
| 
      
 417 
     | 
    
         
            +
                });
         
     | 
| 
      
 418 
     | 
    
         
            +
              },
         
     | 
| 
      
 419 
     | 
    
         
            +
              _initializeSuggestSubmit: function() {
         
     | 
| 
      
 420 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 421 
     | 
    
         
            +
                $("#suggest-submit").click(function (event) {
         
     | 
| 
      
 422 
     | 
    
         
            +
                  var dataset = $("#suggest-dataset").val();
         
     | 
| 
      
 423 
     | 
    
         
            +
                  var query = $("#suggest-query").val();
         
     | 
| 
      
 424 
     | 
    
         
            +
                  var type = that._suggestResultType;
         
     | 
| 
      
 425 
     | 
    
         
            +
                  var parameters = that._suggestParameters(query, dataset, type);
         
     | 
| 
      
 426 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 427 
     | 
    
         
            +
                    url: "/d/suggest",
         
     | 
| 
      
 428 
     | 
    
         
            +
                    data: parameters,
         
     | 
| 
      
 429 
     | 
    
         
            +
                    dataType: "jsonp",
         
     | 
| 
      
 430 
     | 
    
         
            +
                    success: function (data, textStatus, jqXHR) {
         
     | 
| 
      
 431 
     | 
    
         
            +
                      var response = data[1][type];
         
     | 
| 
      
 432 
     | 
    
         
            +
                      response.shift();
         
     | 
| 
      
 433 
     | 
    
         
            +
                      var $result = $("#suggest-result-tab-" + type);
         
     | 
| 
      
 434 
     | 
    
         
            +
                      $result
         
     | 
| 
      
 435 
     | 
    
         
            +
                        .empty()
         
     | 
| 
      
 436 
     | 
    
         
            +
                        .append($("<div/>").append(that._createResultTable(response)));
         
     | 
| 
      
 437 
     | 
    
         
            +
                    },
         
     | 
| 
      
 438 
     | 
    
         
            +
                    error: function(jqXHR, textStatus, errorThrown) {
         
     | 
| 
      
 439 
     | 
    
         
            +
                    }
         
     | 
| 
      
 440 
     | 
    
         
            +
                  });
         
     | 
| 
      
 441 
     | 
    
         
            +
                });
         
     | 
| 
      
 442 
     | 
    
         
            +
              },
         
     | 
| 
      
 443 
     | 
    
         
            +
              _initializeSuggestResult: function() {
         
     | 
| 
      
 444 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 445 
     | 
    
         
            +
                $("#suggest-result-tabs").tabs({
         
     | 
| 
      
 446 
     | 
    
         
            +
                  show: function (event, ui) {
         
     | 
| 
      
 447 
     | 
    
         
            +
                    that._suggestResultType = ui.panel.id.replace(/^suggest-result-tab-/, "");
         
     | 
| 
      
 448 
     | 
    
         
            +
                    $("#suggest-submit").click();
         
     | 
| 
      
 449 
     | 
    
         
            +
                  }
         
     | 
| 
      
 450 
     | 
    
         
            +
                });
         
     | 
| 
      
 451 
     | 
    
         
            +
              },
         
     | 
| 
      
 452 
     | 
    
         
            +
              _selectTab: function(name) {
         
     | 
| 
      
 453 
     | 
    
         
            +
                this.stop_status_timer();
         
     | 
| 
      
 454 
     | 
    
         
            +
                this._$databaseTabs.hide();
         
     | 
| 
      
 455 
     | 
    
         
            +
                this._$tableTabs.hide();
         
     | 
| 
      
 456 
     | 
    
         
            +
                this._$suggestTabs.hide();
         
     | 
| 
      
 457 
     | 
    
         
            +
                switch (name) {
         
     | 
| 
      
 458 
     | 
    
         
            +
                case "table":
         
     | 
| 
      
 459 
     | 
    
         
            +
                  this._$tableTabs.show();
         
     | 
| 
      
 460 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 461 
     | 
    
         
            +
                case "suggest":
         
     | 
| 
      
 462 
     | 
    
         
            +
                  this._$suggestTabs.show();
         
     | 
| 
      
 463 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 464 
     | 
    
         
            +
                case "database":
         
     | 
| 
      
 465 
     | 
    
         
            +
                default:
         
     | 
| 
      
 466 
     | 
    
         
            +
                  this._$databaseTabs.show();
         
     | 
| 
      
 467 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 468 
     | 
    
         
            +
                }
         
     | 
| 
      
 469 
     | 
    
         
            +
              },
         
     | 
| 
      
 470 
     | 
    
         
            +
              _initializeSideMenu: function () {
         
     | 
| 
      
 471 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 472 
     | 
    
         
            +
                $('#side-menu-summary').click(function() {
         
     | 
| 
      
 473 
     | 
    
         
            +
                  that.current_table = null;
         
     | 
| 
      
 474 
     | 
    
         
            +
                  that._selectTab("database");
         
     | 
| 
      
 475 
     | 
    
         
            +
                  that._$databaseTabs.tabs("select", "#database-tab-summary");
         
     | 
| 
      
 476 
     | 
    
         
            +
                });
         
     | 
| 
      
 477 
     | 
    
         
            +
                $('#side-menu-suggest').click(function() {
         
     | 
| 
      
 478 
     | 
    
         
            +
                  that.current_table = null;
         
     | 
| 
      
 479 
     | 
    
         
            +
                  that._selectTab("suggest");
         
     | 
| 
      
 480 
     | 
    
         
            +
                });
         
     | 
| 
      
 481 
     | 
    
         
            +
              },
         
     | 
| 
      
 482 
     | 
    
         
            +
              start_status_timer: function() {
         
     | 
| 
      
 483 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 484 
     | 
    
         
            +
                this.stop_status_timer();
         
     | 
| 
      
 485 
     | 
    
         
            +
                this.status();
         
     | 
| 
      
 486 
     | 
    
         
            +
                this.statusTimer = setInterval(function() {that.status()}, 1000);
         
     | 
| 
      
 487 
     | 
    
         
            +
              },
         
     | 
| 
      
 488 
     | 
    
         
            +
              change_status_timer: function(time) {
         
     | 
| 
      
 489 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 490 
     | 
    
         
            +
                this.stop_status_timer();
         
     | 
| 
      
 491 
     | 
    
         
            +
                this.statusTimer = setInterval(function() {that.status()}, time);
         
     | 
| 
      
 492 
     | 
    
         
            +
              },
         
     | 
| 
      
 493 
     | 
    
         
            +
              stop_status_timer: function() {
         
     | 
| 
      
 494 
     | 
    
         
            +
                if (this.statusTimer) {
         
     | 
| 
      
 495 
     | 
    
         
            +
                  clearInterval(this.statusTimer);
         
     | 
| 
      
 496 
     | 
    
         
            +
                  this.statusTimer = null;
         
     | 
| 
      
 497 
     | 
    
         
            +
                }
         
     | 
| 
      
 498 
     | 
    
         
            +
              },
         
     | 
| 
      
 499 
     | 
    
         
            +
              _createResultTable: function (result, options) {
         
     | 
| 
      
 500 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 501 
     | 
    
         
            +
                if (!options) {
         
     | 
| 
      
 502 
     | 
    
         
            +
                  options = {};
         
     | 
| 
      
 503 
     | 
    
         
            +
                }
         
     | 
| 
      
 504 
     | 
    
         
            +
                var table = $('<table class="records"/>');
         
     | 
| 
      
 505 
     | 
    
         
            +
                if ($.isArray(result)) {
         
     | 
| 
      
 506 
     | 
    
         
            +
                  var nEntries = result.length;
         
     | 
| 
      
 507 
     | 
    
         
            +
                  if (nEntries >= 1) {
         
     | 
| 
      
 508 
     | 
    
         
            +
                    var thead = $('<thead/>');
         
     | 
| 
      
 509 
     | 
    
         
            +
                    table.append(thead);
         
     | 
| 
      
 510 
     | 
    
         
            +
                    var line = result[0];
         
     | 
| 
      
 511 
     | 
    
         
            +
                    if ($.isArray(line)) {
         
     | 
| 
      
 512 
     | 
    
         
            +
                      var tr = $('<tr/>');
         
     | 
| 
      
 513 
     | 
    
         
            +
                      thead.append(tr);
         
     | 
| 
      
 514 
     | 
    
         
            +
                      var m = line.length;
         
     | 
| 
      
 515 
     | 
    
         
            +
                      if (options.check) {
         
     | 
| 
      
 516 
     | 
    
         
            +
                        tr.append($('<th/>'));
         
     | 
| 
      
 517 
     | 
    
         
            +
                      }
         
     | 
| 
      
 518 
     | 
    
         
            +
                      for (var j = 0; j < m; j++) {
         
     | 
| 
      
 519 
     | 
    
         
            +
                        var th = $('<th/>');
         
     | 
| 
      
 520 
     | 
    
         
            +
                        tr.append(th);
         
     | 
| 
      
 521 
     | 
    
         
            +
                        th.append(prim2html(line[j][0], 128));
         
     | 
| 
      
 522 
     | 
    
         
            +
                        th.append($('<br />'));
         
     | 
| 
      
 523 
     | 
    
         
            +
                        th.append(prim2html(line[j][1], 128));
         
     | 
| 
      
 524 
     | 
    
         
            +
                      }
         
     | 
| 
      
 525 
     | 
    
         
            +
                      if (options.button) {
         
     | 
| 
      
 526 
     | 
    
         
            +
                        tr.append($('<th/>'));
         
     | 
| 
      
 527 
     | 
    
         
            +
                      }
         
     | 
| 
      
 528 
     | 
    
         
            +
                    }
         
     | 
| 
      
 529 
     | 
    
         
            +
                    var tbody = $('<tbody>');
         
     | 
| 
      
 530 
     | 
    
         
            +
                    table.append(tbody);
         
     | 
| 
      
 531 
     | 
    
         
            +
                    for (var i = 1; i < nEntries; i++) {
         
     | 
| 
      
 532 
     | 
    
         
            +
                      line = result[i];
         
     | 
| 
      
 533 
     | 
    
         
            +
                      if ($.isArray(line)) {
         
     | 
| 
      
 534 
     | 
    
         
            +
                        var tr = $('<tr>');
         
     | 
| 
      
 535 
     | 
    
         
            +
                        table.append(tr);
         
     | 
| 
      
 536 
     | 
    
         
            +
                        var m = line.length;
         
     | 
| 
      
 537 
     | 
    
         
            +
                        switch(options.check) {// チェックボックスの値を何にするか
         
     | 
| 
      
 538 
     | 
    
         
            +
                        case 1: // 1番目の要素(レコード一覧の_id等)
         
     | 
| 
      
 539 
     | 
    
         
            +
                        case 2: // 2番目の要素(テーブル・カラム一覧のname等)
         
     | 
| 
      
 540 
     | 
    
         
            +
                          var td = $('<td/>');
         
     | 
| 
      
 541 
     | 
    
         
            +
                          tr.append(td);
         
     | 
| 
      
 542 
     | 
    
         
            +
                          td.append($('<input/>')
         
     | 
| 
      
 543 
     | 
    
         
            +
                                    .attr("type", "checkbox")
         
     | 
| 
      
 544 
     | 
    
         
            +
                                    .attr("value", line[options.check-1]));
         
     | 
| 
      
 545 
     | 
    
         
            +
                          break;
         
     | 
| 
      
 546 
     | 
    
         
            +
                        }
         
     | 
| 
      
 547 
     | 
    
         
            +
                        for (var j = 0; j < m; j++) {
         
     | 
| 
      
 548 
     | 
    
         
            +
                          var td = $('<td/>');
         
     | 
| 
      
 549 
     | 
    
         
            +
                          tr.append(td);
         
     | 
| 
      
 550 
     | 
    
         
            +
                          td.append(prim2html(line[j], 128));
         
     | 
| 
      
 551 
     | 
    
         
            +
                        }
         
     | 
| 
      
 552 
     | 
    
         
            +
                        switch(options.button) {
         
     | 
| 
      
 553 
     | 
    
         
            +
                        case 1: // Edit record
         
     | 
| 
      
 554 
     | 
    
         
            +
                          var td = $('<td/>');
         
     | 
| 
      
 555 
     | 
    
         
            +
                          tr.append(td);
         
     | 
| 
      
 556 
     | 
    
         
            +
                          td.append($('<input/>')
         
     | 
| 
      
 557 
     | 
    
         
            +
                                    .attr("type", "button")
         
     | 
| 
      
 558 
     | 
    
         
            +
                                    .attr("value", "編集")
         
     | 
| 
      
 559 
     | 
    
         
            +
                                    .attr("data-record-id", line[0])
         
     | 
| 
      
 560 
     | 
    
         
            +
                                    .click(function () {
         
     | 
| 
      
 561 
     | 
    
         
            +
                                      that.show_edit_record($(this).attr("data-record-id"));
         
     | 
| 
      
 562 
     | 
    
         
            +
                                    }));
         
     | 
| 
      
 563 
     | 
    
         
            +
                          break;
         
     | 
| 
      
 564 
     | 
    
         
            +
                        case 2: // Table
         
     | 
| 
      
 565 
     | 
    
         
            +
                          var td = $('<td/>');
         
     | 
| 
      
 566 
     | 
    
         
            +
                          tr.append(td);
         
     | 
| 
      
 567 
     | 
    
         
            +
                          td.append($('<input/>')
         
     | 
| 
      
 568 
     | 
    
         
            +
                                    .attr("type", "button")
         
     | 
| 
      
 569 
     | 
    
         
            +
                                    .attr("value", "詳細")
         
     | 
| 
      
 570 
     | 
    
         
            +
                                    .attr("data-table-name", line[1])
         
     | 
| 
      
 571 
     | 
    
         
            +
                                    .click(function () {
         
     | 
| 
      
 572 
     | 
    
         
            +
                                      var tableName = $(this).attr("data-table-name");
         
     | 
| 
      
 573 
     | 
    
         
            +
                                      $("#side-menu-tablelist-link-" + tableName).click();
         
     | 
| 
      
 574 
     | 
    
         
            +
                                    }));
         
     | 
| 
      
 575 
     | 
    
         
            +
                          break;
         
     | 
| 
      
 576 
     | 
    
         
            +
                        }
         
     | 
| 
      
 577 
     | 
    
         
            +
                      }
         
     | 
| 
      
 578 
     | 
    
         
            +
                    }
         
     | 
| 
      
 579 
     | 
    
         
            +
                  }
         
     | 
| 
      
 580 
     | 
    
         
            +
                }
         
     | 
| 
      
 581 
     | 
    
         
            +
                return table;
         
     | 
| 
      
 582 
     | 
    
         
            +
              },
         
     | 
| 
      
 583 
     | 
    
         
            +
              show_edit_record: function(id) {
         
     | 
| 
      
 584 
     | 
    
         
            +
                $('#table-tabs').tabs('select', 2);
         
     | 
| 
      
 585 
     | 
    
         
            +
                this.update_createrecord(this.current_table, id);
         
     | 
| 
      
 586 
     | 
    
         
            +
              },
         
     | 
| 
      
 587 
     | 
    
         
            +
              format_unix_time: function(unix_time) {
         
     | 
| 
      
 588 
     | 
    
         
            +
                var date = new Date();
         
     | 
| 
      
 589 
     | 
    
         
            +
                date.setTime(unix_time * 1000);
         
     | 
| 
      
 590 
     | 
    
         
            +
                return date.toLocaleString();
         
     | 
| 
      
 591 
     | 
    
         
            +
              },
         
     | 
| 
      
 592 
     | 
    
         
            +
              format_duration: function(duration_in_seconds) {
         
     | 
| 
      
 593 
     | 
    
         
            +
                var duration = "";
         
     | 
| 
      
 594 
     | 
    
         
            +
                var days = Math.floor(duration_in_seconds / 3600 / 24);
         
     | 
| 
      
 595 
     | 
    
         
            +
                var hours = Math.floor(duration_in_seconds / 3600 % 24);
         
     | 
| 
      
 596 
     | 
    
         
            +
                var minutes = Math.floor(duration_in_seconds / 60 % 60);
         
     | 
| 
      
 597 
     | 
    
         
            +
                var seconds = Math.floor(duration_in_seconds % 60);
         
     | 
| 
      
 598 
     | 
    
         
            +
             
     | 
| 
      
 599 
     | 
    
         
            +
                if (days > 0) {
         
     | 
| 
      
 600 
     | 
    
         
            +
                  duration += days;
         
     | 
| 
      
 601 
     | 
    
         
            +
                  if (days == 1) {
         
     | 
| 
      
 602 
     | 
    
         
            +
                    duration += " day, ";
         
     | 
| 
      
 603 
     | 
    
         
            +
                  } else {
         
     | 
| 
      
 604 
     | 
    
         
            +
                    duration += " days, ";
         
     | 
| 
      
 605 
     | 
    
         
            +
                  }
         
     | 
| 
      
 606 
     | 
    
         
            +
                }
         
     | 
| 
      
 607 
     | 
    
         
            +
                if (days > 0 || hours > 0) {
         
     | 
| 
      
 608 
     | 
    
         
            +
                  duration += hours + ":" + minutes + ":" + seconds;
         
     | 
| 
      
 609 
     | 
    
         
            +
                } else if (minutes > 0) {
         
     | 
| 
      
 610 
     | 
    
         
            +
                  duration += minutes + ":" + seconds;
         
     | 
| 
      
 611 
     | 
    
         
            +
                } else {
         
     | 
| 
      
 612 
     | 
    
         
            +
                  duration += seconds;
         
     | 
| 
      
 613 
     | 
    
         
            +
                }
         
     | 
| 
      
 614 
     | 
    
         
            +
             
     | 
| 
      
 615 
     | 
    
         
            +
                return duration;
         
     | 
| 
      
 616 
     | 
    
         
            +
              },
         
     | 
| 
      
 617 
     | 
    
         
            +
              maxThroughput: 0,
         
     | 
| 
      
 618 
     | 
    
         
            +
              lastNQueries: -1,
         
     | 
| 
      
 619 
     | 
    
         
            +
              keepLastNData: 100,
         
     | 
| 
      
 620 
     | 
    
         
            +
              throughputData: [],
         
     | 
| 
      
 621 
     | 
    
         
            +
              throughputChart: null,
         
     | 
| 
      
 622 
     | 
    
         
            +
              updateThroughputChart: function(statusData) {
         
     | 
| 
      
 623 
     | 
    
         
            +
                var maxThroughputUpdated = false;
         
     | 
| 
      
 624 
     | 
    
         
            +
                if (this.lastNQueries >= 0) {
         
     | 
| 
      
 625 
     | 
    
         
            +
                  var throughput = statusData.n_queries - this.lastNQueries;
         
     | 
| 
      
 626 
     | 
    
         
            +
                  this.throughputData.push(throughput);
         
     | 
| 
      
 627 
     | 
    
         
            +
                  if (this.maxThroughput < throughput) {
         
     | 
| 
      
 628 
     | 
    
         
            +
                    this.maxThroughput = throughput;
         
     | 
| 
      
 629 
     | 
    
         
            +
                    maxThroughputUpdated = true;
         
     | 
| 
      
 630 
     | 
    
         
            +
                  }
         
     | 
| 
      
 631 
     | 
    
         
            +
                }
         
     | 
| 
      
 632 
     | 
    
         
            +
                if (this.throughputData.length > this.keepLastNData) {
         
     | 
| 
      
 633 
     | 
    
         
            +
                   this.throughputData.shift();
         
     | 
| 
      
 634 
     | 
    
         
            +
                }
         
     | 
| 
      
 635 
     | 
    
         
            +
                if (!this.throughputChart) {
         
     | 
| 
      
 636 
     | 
    
         
            +
                  this.throughputChart = $.plot($("#throughput-chart"),
         
     | 
| 
      
 637 
     | 
    
         
            +
                                                [[]],
         
     | 
| 
      
 638 
     | 
    
         
            +
                                                {xaxis: {min: -(this.keepLastNData - 1),
         
     | 
| 
      
 639 
     | 
    
         
            +
                                                         max: 0},
         
     | 
| 
      
 640 
     | 
    
         
            +
                                                 yaxis: {min: 0}});
         
     | 
| 
      
 641 
     | 
    
         
            +
                }
         
     | 
| 
      
 642 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 643 
     | 
    
         
            +
                var chartSeries = $.map(this.throughputData, function(n, i) {
         
     | 
| 
      
 644 
     | 
    
         
            +
                                     return [[-(that.throughputData.length - i) + 1, n]];
         
     | 
| 
      
 645 
     | 
    
         
            +
                                  });
         
     | 
| 
      
 646 
     | 
    
         
            +
                this.throughputChart.setData([chartSeries]);
         
     | 
| 
      
 647 
     | 
    
         
            +
                if (maxThroughputUpdated) {
         
     | 
| 
      
 648 
     | 
    
         
            +
                  this.throughputChart.setupGrid();
         
     | 
| 
      
 649 
     | 
    
         
            +
                }
         
     | 
| 
      
 650 
     | 
    
         
            +
                this.throughputChart.draw();
         
     | 
| 
      
 651 
     | 
    
         
            +
                this.lastNQueries = statusData.n_queries;
         
     | 
| 
      
 652 
     | 
    
         
            +
              },
         
     | 
| 
      
 653 
     | 
    
         
            +
              status: function() {
         
     | 
| 
      
 654 
     | 
    
         
            +
                if (this.current_status > 0) { return; }
         
     | 
| 
      
 655 
     | 
    
         
            +
                this.current_status++;
         
     | 
| 
      
 656 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 657 
     | 
    
         
            +
                $.ajax({
         
     | 
| 
      
 658 
     | 
    
         
            +
                  url: '/d/status',
         
     | 
| 
      
 659 
     | 
    
         
            +
                  data: {},
         
     | 
| 
      
 660 
     | 
    
         
            +
                  dataType: 'json',
         
     | 
| 
      
 661 
     | 
    
         
            +
                  success: function(b) {
         
     | 
| 
      
 662 
     | 
    
         
            +
                    that.current_status--;
         
     | 
| 
      
 663 
     | 
    
         
            +
                    if (!b) {
         
     | 
| 
      
 664 
     | 
    
         
            +
                      that.change_status_timer(10000);
         
     | 
| 
      
 665 
     | 
    
         
            +
                      return;
         
     | 
| 
      
 666 
     | 
    
         
            +
                    }
         
     | 
| 
      
 667 
     | 
    
         
            +
                    var d = b[1];
         
     | 
| 
      
 668 
     | 
    
         
            +
                    $('#status-starttime').text(that.format_unix_time(d.starttime));
         
     | 
| 
      
 669 
     | 
    
         
            +
                    $('#status-uptime').text(that.format_duration(d.uptime));
         
     | 
| 
      
 670 
     | 
    
         
            +
                    $('#status-n-queries').text(d.n_queries);
         
     | 
| 
      
 671 
     | 
    
         
            +
                    $('#status-cache-hit-rate').text(d.cache_hit_rate);
         
     | 
| 
      
 672 
     | 
    
         
            +
                    that.updateThroughputChart(d);
         
     | 
| 
      
 673 
     | 
    
         
            +
                    that.change_status_timer(1000);
         
     | 
| 
      
 674 
     | 
    
         
            +
                  },
         
     | 
| 
      
 675 
     | 
    
         
            +
                  error: function() {
         
     | 
| 
      
 676 
     | 
    
         
            +
                    that.current_status--;
         
     | 
| 
      
 677 
     | 
    
         
            +
                    that.change_status_timer(10000);
         
     | 
| 
      
 678 
     | 
    
         
            +
                  }
         
     | 
| 
      
 679 
     | 
    
         
            +
                });
         
     | 
| 
      
 680 
     | 
    
         
            +
              },
         
     | 
| 
      
 681 
     | 
    
         
            +
              update_tablelist: function() {
         
     | 
| 
      
 682 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 683 
     | 
    
         
            +
                this._tables = [];
         
     | 
| 
      
 684 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 685 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 686 
     | 
    
         
            +
                    url: '/d/table_list',
         
     | 
| 
      
 687 
     | 
    
         
            +
                    data: {},
         
     | 
| 
      
 688 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 689 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 690 
     | 
    
         
            +
                      if (that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 691 
     | 
    
         
            +
                      d.shift();
         
     | 
| 
      
 692 
     | 
    
         
            +
                      var tl = $('#side-menu-tablelist').empty();
         
     | 
| 
      
 693 
     | 
    
         
            +
                      var tt = $('#createtable-key-type-table').empty();
         
     | 
| 
      
 694 
     | 
    
         
            +
                      var vt = $('#createtable-value-type-table').empty();
         
     | 
| 
      
 695 
     | 
    
         
            +
                      var ct = $('#createcolumn-type-table').empty();
         
     | 
| 
      
 696 
     | 
    
         
            +
                      var b = d.shift();
         
     | 
| 
      
 697 
     | 
    
         
            +
                      b.shift();
         
     | 
| 
      
 698 
     | 
    
         
            +
                      $.each(b, function(i, val) {
         
     | 
| 
      
 699 
     | 
    
         
            +
                        var table_name = val[1];
         
     | 
| 
      
 700 
     | 
    
         
            +
            	    that._tables.push(table_name);
         
     | 
| 
      
 701 
     | 
    
         
            +
                        tl.append(
         
     | 
| 
      
 702 
     | 
    
         
            +
                          $('<li />').append(
         
     | 
| 
      
 703 
     | 
    
         
            +
                            $('<a />')
         
     | 
| 
      
 704 
     | 
    
         
            +
                              .attr('id', 'side-menu-tablelist-link-' + table_name)
         
     | 
| 
      
 705 
     | 
    
         
            +
                              .attr('href', '#side-menu-tablelist-' + table_name)
         
     | 
| 
      
 706 
     | 
    
         
            +
                              .text(table_name)
         
     | 
| 
      
 707 
     | 
    
         
            +
                              .click(function() {
         
     | 
| 
      
 708 
     | 
    
         
            +
                                that.current_table = table_name;
         
     | 
| 
      
 709 
     | 
    
         
            +
                                $('#database-tabs').hide();
         
     | 
| 
      
 710 
     | 
    
         
            +
                                $('#suggest-tabs').hide();
         
     | 
| 
      
 711 
     | 
    
         
            +
                                that.stop_status_timer();
         
     | 
| 
      
 712 
     | 
    
         
            +
                                $('#table-tabs').show();
         
     | 
| 
      
 713 
     | 
    
         
            +
                                that.columnlist(table_name);
         
     | 
| 
      
 714 
     | 
    
         
            +
                                $('#tab-recordlist-simplequery').val('');
         
     | 
| 
      
 715 
     | 
    
         
            +
                                that.recordlist_simple(table_name, null, null, 1);
         
     | 
| 
      
 716 
     | 
    
         
            +
                                that.update_createrecord(that.current_table);
         
     | 
| 
      
 717 
     | 
    
         
            +
                              })
         
     | 
| 
      
 718 
     | 
    
         
            +
                          )
         
     | 
| 
      
 719 
     | 
    
         
            +
                        );
         
     | 
| 
      
 720 
     | 
    
         
            +
                        tt.append($('<option />').val(val[1]).text(val[1]));
         
     | 
| 
      
 721 
     | 
    
         
            +
                        vt.append($('<option />').val(val[1]).text(val[1]));
         
     | 
| 
      
 722 
     | 
    
         
            +
                        ct.append($('<option />').val(val[1]).text(val[1]));
         
     | 
| 
      
 723 
     | 
    
         
            +
                      });
         
     | 
| 
      
 724 
     | 
    
         
            +
                      that.hideloading();
         
     | 
| 
      
 725 
     | 
    
         
            +
                    },
         
     | 
| 
      
 726 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 727 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 728 
     | 
    
         
            +
                    }
         
     | 
| 
      
 729 
     | 
    
         
            +
                  })
         
     | 
| 
      
 730 
     | 
    
         
            +
                );
         
     | 
| 
      
 731 
     | 
    
         
            +
              },
         
     | 
| 
      
 732 
     | 
    
         
            +
              tablelist: function() {
         
     | 
| 
      
 733 
     | 
    
         
            +
                $('#tab-tablelist-table').empty();
         
     | 
| 
      
 734 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 735 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 736 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 737 
     | 
    
         
            +
                    url: '/d/table_list',
         
     | 
| 
      
 738 
     | 
    
         
            +
                    data: {},
         
     | 
| 
      
 739 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 740 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 741 
     | 
    
         
            +
                      if (that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 742 
     | 
    
         
            +
                      var b = d[1];
         
     | 
| 
      
 743 
     | 
    
         
            +
                      var table = that._createResultTable(b, {check: 2, button: 2});
         
     | 
| 
      
 744 
     | 
    
         
            +
                      $('#tab-tablelist-table').append($('<h1 />').text('テーブル一覧')).append(table);
         
     | 
| 
      
 745 
     | 
    
         
            +
                      that.hideloading();
         
     | 
| 
      
 746 
     | 
    
         
            +
                    },
         
     | 
| 
      
 747 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 748 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 749 
     | 
    
         
            +
                    }
         
     | 
| 
      
 750 
     | 
    
         
            +
                  })
         
     | 
| 
      
 751 
     | 
    
         
            +
                );
         
     | 
| 
      
 752 
     | 
    
         
            +
              },
         
     | 
| 
      
 753 
     | 
    
         
            +
              recordlist_simple: function(table_name, simplequery, simplequery_type, page, hide_dialog) {
         
     | 
| 
      
 754 
     | 
    
         
            +
                var d = {
         
     | 
| 
      
 755 
     | 
    
         
            +
                  'table': table_name,
         
     | 
| 
      
 756 
     | 
    
         
            +
                  'offset': (page - 1) * this.recordlist_count,
         
     | 
| 
      
 757 
     | 
    
         
            +
                  'limit': this.recordlist_count
         
     | 
| 
      
 758 
     | 
    
         
            +
                }
         
     | 
| 
      
 759 
     | 
    
         
            +
                switch (simplequery_type) {
         
     | 
| 
      
 760 
     | 
    
         
            +
                case 'query':
         
     | 
| 
      
 761 
     | 
    
         
            +
                case 'filter':
         
     | 
| 
      
 762 
     | 
    
         
            +
                case null:
         
     | 
| 
      
 763 
     | 
    
         
            +
                  if (simplequery) {
         
     | 
| 
      
 764 
     | 
    
         
            +
                    d[simplequery_type] = simplequery;
         
     | 
| 
      
 765 
     | 
    
         
            +
                  }
         
     | 
| 
      
 766 
     | 
    
         
            +
                  this.recordlist(d, true, hide_dialog);
         
     | 
| 
      
 767 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 768 
     | 
    
         
            +
                }
         
     | 
| 
      
 769 
     | 
    
         
            +
              },
         
     | 
| 
      
 770 
     | 
    
         
            +
              recordlist: function(params, show_pager, hide_dialog) {
         
     | 
| 
      
 771 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 772 
     | 
    
         
            +
                this.reload_record_func = function(){
         
     | 
| 
      
 773 
     | 
    
         
            +
                  that.recordlist(params, show_pager, hide_dialog);
         
     | 
| 
      
 774 
     | 
    
         
            +
                };
         
     | 
| 
      
 775 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 776 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 777 
     | 
    
         
            +
                    url: '/d/select',
         
     | 
| 
      
 778 
     | 
    
         
            +
                    data: params,
         
     | 
| 
      
 779 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 780 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 781 
     | 
    
         
            +
                      if (that.validateajax(d, hide_dialog) < 0) { return; }
         
     | 
| 
      
 782 
     | 
    
         
            +
                      var rc = d.shift();
         
     | 
| 
      
 783 
     | 
    
         
            +
                      if (rc[0] != 0) {
         
     | 
| 
      
 784 
     | 
    
         
            +
                        alert('error: ' + rc[3]);
         
     | 
| 
      
 785 
     | 
    
         
            +
                        that.hideloading();
         
     | 
| 
      
 786 
     | 
    
         
            +
                        return false;
         
     | 
| 
      
 787 
     | 
    
         
            +
                      }
         
     | 
| 
      
 788 
     | 
    
         
            +
                      var body = d.shift();
         
     | 
| 
      
 789 
     | 
    
         
            +
                      var recs = body.shift();
         
     | 
| 
      
 790 
     | 
    
         
            +
                      var all_count = recs.shift()[0];
         
     | 
| 
      
 791 
     | 
    
         
            +
                      var pager;
         
     | 
| 
      
 792 
     | 
    
         
            +
                      if (show_pager) {
         
     | 
| 
      
 793 
     | 
    
         
            +
                        var offset = params['offset'] || 0;
         
     | 
| 
      
 794 
     | 
    
         
            +
                        var rows = params['limit'] || 10;
         
     | 
| 
      
 795 
     | 
    
         
            +
                        if (rows < 0){
         
     | 
| 
      
 796 
     | 
    
         
            +
                          rows = all_count + parseInt(rows) + 1;
         
     | 
| 
      
 797 
     | 
    
         
            +
                        }
         
     | 
| 
      
 798 
     | 
    
         
            +
                        if (rows != '' && !parseInt(rows)) {
         
     | 
| 
      
 799 
     | 
    
         
            +
                          pager = $('<span />');
         
     | 
| 
      
 800 
     | 
    
         
            +
                        } else {
         
     | 
| 
      
 801 
     | 
    
         
            +
                          pager = $("<div/>");
         
     | 
| 
      
 802 
     | 
    
         
            +
                          pager.paginate({
         
     | 
| 
      
 803 
     | 
    
         
            +
                            total: all_count,
         
     | 
| 
      
 804 
     | 
    
         
            +
                            nItemsPerPage: rows,
         
     | 
| 
      
 805 
     | 
    
         
            +
                            currentPage: Math.floor(offset/rows)+1,
         
     | 
| 
      
 806 
     | 
    
         
            +
                            callback: function(page) {
         
     | 
| 
      
 807 
     | 
    
         
            +
                              params['offset'] = page * rows;
         
     | 
| 
      
 808 
     | 
    
         
            +
                              that.recordlist(params, true, false);
         
     | 
| 
      
 809 
     | 
    
         
            +
                              return false;
         
     | 
| 
      
 810 
     | 
    
         
            +
                            }
         
     | 
| 
      
 811 
     | 
    
         
            +
                          });
         
     | 
| 
      
 812 
     | 
    
         
            +
                        }
         
     | 
| 
      
 813 
     | 
    
         
            +
                      } else {
         
     | 
| 
      
 814 
     | 
    
         
            +
                        pager = $('<span />');
         
     | 
| 
      
 815 
     | 
    
         
            +
                      }
         
     | 
| 
      
 816 
     | 
    
         
            +
                      $('#tab-recordlist-table')
         
     | 
| 
      
 817 
     | 
    
         
            +
                        .empty()
         
     | 
| 
      
 818 
     | 
    
         
            +
                        .append($('<h1 />').text('レコード一覧: ' + params['table']))
         
     | 
| 
      
 819 
     | 
    
         
            +
                        .append($('<p />').text('総件数: ' + all_count))
         
     | 
| 
      
 820 
     | 
    
         
            +
                        .append(pager.clone(true))
         
     | 
| 
      
 821 
     | 
    
         
            +
                        .append($('<div />').append(that._createResultTable(recs, {check: 1, button: 1})))
         
     | 
| 
      
 822 
     | 
    
         
            +
                        .append(pager);
         
     | 
| 
      
 823 
     | 
    
         
            +
                      that.hideloading();
         
     | 
| 
      
 824 
     | 
    
         
            +
                    },
         
     | 
| 
      
 825 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 826 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest, hide_dialog);
         
     | 
| 
      
 827 
     | 
    
         
            +
                    }
         
     | 
| 
      
 828 
     | 
    
         
            +
                  })
         
     | 
| 
      
 829 
     | 
    
         
            +
                ,hide_dialog);
         
     | 
| 
      
 830 
     | 
    
         
            +
              },
         
     | 
| 
      
 831 
     | 
    
         
            +
              columnlist: function(table_name) {
         
     | 
| 
      
 832 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 833 
     | 
    
         
            +
                $('#tab-columnlist-table').empty();
         
     | 
| 
      
 834 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 835 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 836 
     | 
    
         
            +
                    url: '/d/column_list',
         
     | 
| 
      
 837 
     | 
    
         
            +
                    data: {'table': table_name},
         
     | 
| 
      
 838 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 839 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 840 
     | 
    
         
            +
                      if (that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 841 
     | 
    
         
            +
                      var b = d[1];
         
     | 
| 
      
 842 
     | 
    
         
            +
                      var table = that._createResultTable(b, {check: 2});
         
     | 
| 
      
 843 
     | 
    
         
            +
                      $('#tab-columnlist-table')
         
     | 
| 
      
 844 
     | 
    
         
            +
                        .append($('<h1 />').text('カラム一覧: ' + table_name))
         
     | 
| 
      
 845 
     | 
    
         
            +
                        .append(table);
         
     | 
| 
      
 846 
     | 
    
         
            +
                      that.hideloading();
         
     | 
| 
      
 847 
     | 
    
         
            +
                    },
         
     | 
| 
      
 848 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 849 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 850 
     | 
    
         
            +
                    }
         
     | 
| 
      
 851 
     | 
    
         
            +
                  })
         
     | 
| 
      
 852 
     | 
    
         
            +
                );
         
     | 
| 
      
 853 
     | 
    
         
            +
              },
         
     | 
| 
      
 854 
     | 
    
         
            +
              add_record_inputbox: function(type, value) {
         
     | 
| 
      
 855 
     | 
    
         
            +
                var inputbox = null;
         
     | 
| 
      
 856 
     | 
    
         
            +
                switch(type){
         
     | 
| 
      
 857 
     | 
    
         
            +
                case "Bool":
         
     | 
| 
      
 858 
     | 
    
         
            +
                  inputbox = $('<input />')
         
     | 
| 
      
 859 
     | 
    
         
            +
                      .attr("type","checkbox")
         
     | 
| 
      
 860 
     | 
    
         
            +
                      .attr("value","true");
         
     | 
| 
      
 861 
     | 
    
         
            +
                  if (value) {
         
     | 
| 
      
 862 
     | 
    
         
            +
                    inputbox.attr("checked","");
         
     | 
| 
      
 863 
     | 
    
         
            +
                  }
         
     | 
| 
      
 864 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 865 
     | 
    
         
            +
                case "UInt8":
         
     | 
| 
      
 866 
     | 
    
         
            +
                case "UInt16":
         
     | 
| 
      
 867 
     | 
    
         
            +
                case "UInt32":
         
     | 
| 
      
 868 
     | 
    
         
            +
                case "UInt64":
         
     | 
| 
      
 869 
     | 
    
         
            +
                case "Int8":
         
     | 
| 
      
 870 
     | 
    
         
            +
                case "Int16":
         
     | 
| 
      
 871 
     | 
    
         
            +
                case "Int32":
         
     | 
| 
      
 872 
     | 
    
         
            +
                case "Int64":
         
     | 
| 
      
 873 
     | 
    
         
            +
                case "Float":
         
     | 
| 
      
 874 
     | 
    
         
            +
                  inputbox = $('<input />')
         
     | 
| 
      
 875 
     | 
    
         
            +
                      .attr("type", "text")
         
     | 
| 
      
 876 
     | 
    
         
            +
                      .val(isNaN(value) ? "" : value);
         
     | 
| 
      
 877 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 878 
     | 
    
         
            +
                case "Text":
         
     | 
| 
      
 879 
     | 
    
         
            +
                case "ShortText":
         
     | 
| 
      
 880 
     | 
    
         
            +
                case "LongText":
         
     | 
| 
      
 881 
     | 
    
         
            +
                  inputbox = $('<textarea />')
         
     | 
| 
      
 882 
     | 
    
         
            +
                      .attr("cols", "50")
         
     | 
| 
      
 883 
     | 
    
         
            +
                      .attr("rows", "2")
         
     | 
| 
      
 884 
     | 
    
         
            +
                      .text(value ? value : "");
         
     | 
| 
      
 885 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 886 
     | 
    
         
            +
                case "TokyoGeoPoint":
         
     | 
| 
      
 887 
     | 
    
         
            +
                case "WGS84GeoPoint":
         
     | 
| 
      
 888 
     | 
    
         
            +
                case "Time":
         
     | 
| 
      
 889 
     | 
    
         
            +
                  inputbox = $('<input />')
         
     | 
| 
      
 890 
     | 
    
         
            +
                      .attr("type", "text")
         
     | 
| 
      
 891 
     | 
    
         
            +
                      .attr("size", "40")
         
     | 
| 
      
 892 
     | 
    
         
            +
                      .val(value ? value : "");
         
     | 
| 
      
 893 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 894 
     | 
    
         
            +
                case "Object":
         
     | 
| 
      
 895 
     | 
    
         
            +
                  inputbox = $('<input />')
         
     | 
| 
      
 896 
     | 
    
         
            +
                      .attr("type", "text")
         
     | 
| 
      
 897 
     | 
    
         
            +
                      .attr("disabled", "disabled");
         
     | 
| 
      
 898 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 899 
     | 
    
         
            +
                default:
         
     | 
| 
      
 900 
     | 
    
         
            +
                  inputbox = $('<input />')
         
     | 
| 
      
 901 
     | 
    
         
            +
                      .attr("type", "text")
         
     | 
| 
      
 902 
     | 
    
         
            +
                      .val(value ? value : "");
         
     | 
| 
      
 903 
     | 
    
         
            +
                }
         
     | 
| 
      
 904 
     | 
    
         
            +
                inputbox.addClass('column_values');
         
     | 
| 
      
 905 
     | 
    
         
            +
                return inputbox;
         
     | 
| 
      
 906 
     | 
    
         
            +
              },
         
     | 
| 
      
 907 
     | 
    
         
            +
              add_record_deletebutton: function(){
         
     | 
| 
      
 908 
     | 
    
         
            +
                var ret =
         
     | 
| 
      
 909 
     | 
    
         
            +
                  $('<span />')
         
     | 
| 
      
 910 
     | 
    
         
            +
                    .append("[×]")
         
     | 
| 
      
 911 
     | 
    
         
            +
                    .css('cursor', 'pointer')
         
     | 
| 
      
 912 
     | 
    
         
            +
                    .click(function() {
         
     | 
| 
      
 913 
     | 
    
         
            +
                      $(this).prev().remove();
         
     | 
| 
      
 914 
     | 
    
         
            +
                      $(this).next().remove();
         
     | 
| 
      
 915 
     | 
    
         
            +
                      $(this).remove();
         
     | 
| 
      
 916 
     | 
    
         
            +
                    });
         
     | 
| 
      
 917 
     | 
    
         
            +
                return ret;
         
     | 
| 
      
 918 
     | 
    
         
            +
              },
         
     | 
| 
      
 919 
     | 
    
         
            +
              update_createrecord_loadcomplete: function(d_sel, d_col) {
         
     | 
| 
      
 920 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 921 
     | 
    
         
            +
                var b = d_sel[1][0];
         
     | 
| 
      
 922 
     | 
    
         
            +
                var columns = $('<tbody />');
         
     | 
| 
      
 923 
     | 
    
         
            +
                var listofs = b[1].length - (d_col[1].length - 1);
         
     | 
| 
      
 924 
     | 
    
         
            +
                for (var i = 1; i < b[1].length; i++) {
         
     | 
| 
      
 925 
     | 
    
         
            +
                  var line = b[1][i];
         
     | 
| 
      
 926 
     | 
    
         
            +
                  var value = null;
         
     | 
| 
      
 927 
     | 
    
         
            +
                  if (b[2]) value = b[2][i];
         
     | 
| 
      
 928 
     | 
    
         
            +
                  if ($.isArray(line)) {
         
     | 
| 
      
 929 
     | 
    
         
            +
                    var tr = $('<tr/ >')
         
     | 
| 
      
 930 
     | 
    
         
            +
                      .addClass('create-record-columns')
         
     | 
| 
      
 931 
     | 
    
         
            +
                      .append(
         
     | 
| 
      
 932 
     | 
    
         
            +
                        $('<td />')
         
     | 
| 
      
 933 
     | 
    
         
            +
                          .addClass('columnname')
         
     | 
| 
      
 934 
     | 
    
         
            +
                          .append(prim2html(line[0], 128))
         
     | 
| 
      
 935 
     | 
    
         
            +
                      )
         
     | 
| 
      
 936 
     | 
    
         
            +
                      .append(
         
     | 
| 
      
 937 
     | 
    
         
            +
                        $('<td />')
         
     | 
| 
      
 938 
     | 
    
         
            +
                          .addClass('columntype')
         
     | 
| 
      
 939 
     | 
    
         
            +
                          .append("(")
         
     | 
| 
      
 940 
     | 
    
         
            +
                          .append($('<span />')
         
     | 
| 
      
 941 
     | 
    
         
            +
                            .append(prim2html(line[1], 128))
         
     | 
| 
      
 942 
     | 
    
         
            +
                          )
         
     | 
| 
      
 943 
     | 
    
         
            +
                          .append(")")
         
     | 
| 
      
 944 
     | 
    
         
            +
                      );
         
     | 
| 
      
 945 
     | 
    
         
            +
                    var inputtd = $('<td />').addClass('columnval');
         
     | 
| 
      
 946 
     | 
    
         
            +
                    if (i >= listofs && d_col[1][i - listofs + 1][4].indexOf("COLUMN_VECTOR") >= 0){
         
     | 
| 
      
 947 
     | 
    
         
            +
                      var type = line[1];
         
     | 
| 
      
 948 
     | 
    
         
            +
                      if (value != null) {
         
     | 
| 
      
 949 
     | 
    
         
            +
                        for (var j = 0; j < value.length; j++) {
         
     | 
| 
      
 950 
     | 
    
         
            +
                          inputtd
         
     | 
| 
      
 951 
     | 
    
         
            +
                            .append(this.add_record_inputbox(line[1], value[j]))
         
     | 
| 
      
 952 
     | 
    
         
            +
                            .append(this.add_record_deletebutton())
         
     | 
| 
      
 953 
     | 
    
         
            +
                            .append('<br />');
         
     | 
| 
      
 954 
     | 
    
         
            +
                        }
         
     | 
| 
      
 955 
     | 
    
         
            +
                      }
         
     | 
| 
      
 956 
     | 
    
         
            +
                      inputtd
         
     | 
| 
      
 957 
     | 
    
         
            +
                        .append($('<span />')
         
     | 
| 
      
 958 
     | 
    
         
            +
                          .append("[値を追加]")
         
     | 
| 
      
 959 
     | 
    
         
            +
                          .css('cursor', 'pointer')
         
     | 
| 
      
 960 
     | 
    
         
            +
                          .click(function() {
         
     | 
| 
      
 961 
     | 
    
         
            +
                            var target = $(this).parent();
         
     | 
| 
      
 962 
     | 
    
         
            +
                            target
         
     | 
| 
      
 963 
     | 
    
         
            +
                              .append(that.add_record_inputbox($(this).parent().prev().children().text()))
         
     | 
| 
      
 964 
     | 
    
         
            +
                              .append(that.add_record_deletebutton())
         
     | 
| 
      
 965 
     | 
    
         
            +
                              .append("<br />");
         
     | 
| 
      
 966 
     | 
    
         
            +
                            $(this).appendTo(target);
         
     | 
| 
      
 967 
     | 
    
         
            +
                          })
         
     | 
| 
      
 968 
     | 
    
         
            +
                        );
         
     | 
| 
      
 969 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 970 
     | 
    
         
            +
                      inputtd.append(this.add_record_inputbox(line[1], value));
         
     | 
| 
      
 971 
     | 
    
         
            +
                      if (line[0] == "_key" && value != null) {
         
     | 
| 
      
 972 
     | 
    
         
            +
                        inputtd.children().attr("disabled", "disabled");
         
     | 
| 
      
 973 
     | 
    
         
            +
                      }
         
     | 
| 
      
 974 
     | 
    
         
            +
                    }
         
     | 
| 
      
 975 
     | 
    
         
            +
                    tr.append(inputtd);
         
     | 
| 
      
 976 
     | 
    
         
            +
                    columns.append(tr);
         
     | 
| 
      
 977 
     | 
    
         
            +
                  }
         
     | 
| 
      
 978 
     | 
    
         
            +
                }
         
     | 
| 
      
 979 
     | 
    
         
            +
                $("#table-createrecord").append(columns);
         
     | 
| 
      
 980 
     | 
    
         
            +
                this.hideloading();
         
     | 
| 
      
 981 
     | 
    
         
            +
              },
         
     | 
| 
      
 982 
     | 
    
         
            +
              update_createrecord: function(table_name, id) {
         
     | 
| 
      
 983 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 984 
     | 
    
         
            +
                var d_sel = null;
         
     | 
| 
      
 985 
     | 
    
         
            +
                var d_col = null;
         
     | 
| 
      
 986 
     | 
    
         
            +
                $('#table-createrecord').empty();
         
     | 
| 
      
 987 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 988 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 989 
     | 
    
         
            +
                    url: '/d/select',
         
     | 
| 
      
 990 
     | 
    
         
            +
                    data: {
         
     | 
| 
      
 991 
     | 
    
         
            +
                      'table' : table_name,
         
     | 
| 
      
 992 
     | 
    
         
            +
                      'limit' : 1,
         
     | 
| 
      
 993 
     | 
    
         
            +
                      'query' : '_id:' + id
         
     | 
| 
      
 994 
     | 
    
         
            +
                    },
         
     | 
| 
      
 995 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 996 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 997 
     | 
    
         
            +
                      if (that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 998 
     | 
    
         
            +
                      d_sel = d;
         
     | 
| 
      
 999 
     | 
    
         
            +
                      if (d_col) {
         
     | 
| 
      
 1000 
     | 
    
         
            +
                        that.update_createrecord_loadcomplete(d_sel, d_col);
         
     | 
| 
      
 1001 
     | 
    
         
            +
                      }
         
     | 
| 
      
 1002 
     | 
    
         
            +
                    },
         
     | 
| 
      
 1003 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 1004 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 1005 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1006 
     | 
    
         
            +
                  })
         
     | 
| 
      
 1007 
     | 
    
         
            +
                );
         
     | 
| 
      
 1008 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 1009 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 1010 
     | 
    
         
            +
                    url: '/d/column_list',
         
     | 
| 
      
 1011 
     | 
    
         
            +
                    data: {
         
     | 
| 
      
 1012 
     | 
    
         
            +
                      'table' : table_name
         
     | 
| 
      
 1013 
     | 
    
         
            +
                    },
         
     | 
| 
      
 1014 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 1015 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 1016 
     | 
    
         
            +
                      if (that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 1017 
     | 
    
         
            +
                      d_col = d;
         
     | 
| 
      
 1018 
     | 
    
         
            +
                      if (d_sel) {
         
     | 
| 
      
 1019 
     | 
    
         
            +
                        that.update_createrecord_loadcomplete(d_sel, d_col);
         
     | 
| 
      
 1020 
     | 
    
         
            +
                      }
         
     | 
| 
      
 1021 
     | 
    
         
            +
                    },
         
     | 
| 
      
 1022 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 1023 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 1024 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1025 
     | 
    
         
            +
                  })
         
     | 
| 
      
 1026 
     | 
    
         
            +
                );
         
     | 
| 
      
 1027 
     | 
    
         
            +
              },
         
     | 
| 
      
 1028 
     | 
    
         
            +
              createtable: function() {
         
     | 
| 
      
 1029 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 1030 
     | 
    
         
            +
                var flags = 0;
         
     | 
| 
      
 1031 
     | 
    
         
            +
                $('#createtable-flags>input:checked').each(function() {
         
     | 
| 
      
 1032 
     | 
    
         
            +
                  flags |= Groonga[$(this).val()];
         
     | 
| 
      
 1033 
     | 
    
         
            +
                });
         
     | 
| 
      
 1034 
     | 
    
         
            +
                flags |= Groonga[$('#createtable-key-index').val()];
         
     | 
| 
      
 1035 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 1036 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 1037 
     | 
    
         
            +
                    url: '/d/table_create',
         
     | 
| 
      
 1038 
     | 
    
         
            +
                    data: {
         
     | 
| 
      
 1039 
     | 
    
         
            +
                      name: $('#createtable-name').val(),
         
     | 
| 
      
 1040 
     | 
    
         
            +
                      'flags': flags,
         
     | 
| 
      
 1041 
     | 
    
         
            +
                      key_type: $('#createtable-key-type').val(),
         
     | 
| 
      
 1042 
     | 
    
         
            +
                      value_type: $('#createtable-value-type').val(),
         
     | 
| 
      
 1043 
     | 
    
         
            +
                      default_tokenizer: $('#createtable-default-tokenizer').val()
         
     | 
| 
      
 1044 
     | 
    
         
            +
                    },
         
     | 
| 
      
 1045 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 1046 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 1047 
     | 
    
         
            +
                      if (that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 1048 
     | 
    
         
            +
                      that.hideloading();
         
     | 
| 
      
 1049 
     | 
    
         
            +
                      alert('テーブルを作成しました。');
         
     | 
| 
      
 1050 
     | 
    
         
            +
                      that.update_tablelist();
         
     | 
| 
      
 1051 
     | 
    
         
            +
                    },
         
     | 
| 
      
 1052 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 1053 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 1054 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1055 
     | 
    
         
            +
                  })
         
     | 
| 
      
 1056 
     | 
    
         
            +
                );
         
     | 
| 
      
 1057 
     | 
    
         
            +
              },
         
     | 
| 
      
 1058 
     | 
    
         
            +
              createcolumn: function() {
         
     | 
| 
      
 1059 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 1060 
     | 
    
         
            +
                var flags = 0;
         
     | 
| 
      
 1061 
     | 
    
         
            +
                $('#createcolumn-flags>input:checked').each(function() {
         
     | 
| 
      
 1062 
     | 
    
         
            +
                  flags |= Groonga[$(this).val()];
         
     | 
| 
      
 1063 
     | 
    
         
            +
                });
         
     | 
| 
      
 1064 
     | 
    
         
            +
                $('#createcolumn-ii-flags>input:checked').each(function() {
         
     | 
| 
      
 1065 
     | 
    
         
            +
                  flags |= Groonga[$(this).val()];
         
     | 
| 
      
 1066 
     | 
    
         
            +
                });
         
     | 
| 
      
 1067 
     | 
    
         
            +
                flags |= Groonga[$('#createcolumn-column-type').val()];
         
     | 
| 
      
 1068 
     | 
    
         
            +
                flags |= Groonga[$('#createcolumn-column-compress').val()];
         
     | 
| 
      
 1069 
     | 
    
         
            +
                var d = {
         
     | 
| 
      
 1070 
     | 
    
         
            +
                  table: this.current_table,
         
     | 
| 
      
 1071 
     | 
    
         
            +
                  name: $('#createcolumn-name').val(),
         
     | 
| 
      
 1072 
     | 
    
         
            +
                  'flags': flags,
         
     | 
| 
      
 1073 
     | 
    
         
            +
                  type: $('#createcolumn-type').val()
         
     | 
| 
      
 1074 
     | 
    
         
            +
                };
         
     | 
| 
      
 1075 
     | 
    
         
            +
                if ($('#createcolumn-source').val()) {
         
     | 
| 
      
 1076 
     | 
    
         
            +
                  d['source'] = $('#createcolumn-source').val();
         
     | 
| 
      
 1077 
     | 
    
         
            +
                }
         
     | 
| 
      
 1078 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 1079 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 1080 
     | 
    
         
            +
                    url: '/d/column_create',
         
     | 
| 
      
 1081 
     | 
    
         
            +
                    data: d,
         
     | 
| 
      
 1082 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 1083 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 1084 
     | 
    
         
            +
                      if (that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 1085 
     | 
    
         
            +
                      that.hideloading();
         
     | 
| 
      
 1086 
     | 
    
         
            +
                      alert('カラムを作成しました。');
         
     | 
| 
      
 1087 
     | 
    
         
            +
                    },
         
     | 
| 
      
 1088 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 1089 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 1090 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1091 
     | 
    
         
            +
                  })
         
     | 
| 
      
 1092 
     | 
    
         
            +
                );
         
     | 
| 
      
 1093 
     | 
    
         
            +
              },
         
     | 
| 
      
 1094 
     | 
    
         
            +
              createrecord_getvalue: function(type, inputbox) {
         
     | 
| 
      
 1095 
     | 
    
         
            +
                switch(type){
         
     | 
| 
      
 1096 
     | 
    
         
            +
                case "Bool":
         
     | 
| 
      
 1097 
     | 
    
         
            +
                  if (inputbox.is('input:checked')) {
         
     | 
| 
      
 1098 
     | 
    
         
            +
                    return true;
         
     | 
| 
      
 1099 
     | 
    
         
            +
                  } else {
         
     | 
| 
      
 1100 
     | 
    
         
            +
                    return false;
         
     | 
| 
      
 1101 
     | 
    
         
            +
                  }
         
     | 
| 
      
 1102 
     | 
    
         
            +
                default:
         
     | 
| 
      
 1103 
     | 
    
         
            +
                  return inputbox.val();
         
     | 
| 
      
 1104 
     | 
    
         
            +
                }
         
     | 
| 
      
 1105 
     | 
    
         
            +
              },
         
     | 
| 
      
 1106 
     | 
    
         
            +
              createrecord: function() {
         
     | 
| 
      
 1107 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 1108 
     | 
    
         
            +
                var d = {};
         
     | 
| 
      
 1109 
     | 
    
         
            +
                $('.create-record-columns').each(function() {
         
     | 
| 
      
 1110 
     | 
    
         
            +
                  if (!$(this).children('.columnval').children().attr('disabled')
         
     | 
| 
      
 1111 
     | 
    
         
            +
                    || $(this).children('.columnname').text() == "_key") {
         
     | 
| 
      
 1112 
     | 
    
         
            +
                    var type = $(this).children('.columntype').children().text();
         
     | 
| 
      
 1113 
     | 
    
         
            +
                    if ($(this).children('.columnval').children('span').length) {
         
     | 
| 
      
 1114 
     | 
    
         
            +
                      var arr = [];
         
     | 
| 
      
 1115 
     | 
    
         
            +
                      $(this).children('.columnval').children('.column_values').each(function() {
         
     | 
| 
      
 1116 
     | 
    
         
            +
                        arr.push(that.createrecord_getvalue(type, $(this)));
         
     | 
| 
      
 1117 
     | 
    
         
            +
                      });
         
     | 
| 
      
 1118 
     | 
    
         
            +
                      d[$(this).children('.columnname').text()] = arr;
         
     | 
| 
      
 1119 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 1120 
     | 
    
         
            +
                      d[$(this).children('.columnname').text()] =
         
     | 
| 
      
 1121 
     | 
    
         
            +
                        that.createrecord_getvalue(type, $(this).children('.columnval').children());
         
     | 
| 
      
 1122 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1123 
     | 
    
         
            +
                  }
         
     | 
| 
      
 1124 
     | 
    
         
            +
                });
         
     | 
| 
      
 1125 
     | 
    
         
            +
                this.showloading(
         
     | 
| 
      
 1126 
     | 
    
         
            +
                  $.ajax({
         
     | 
| 
      
 1127 
     | 
    
         
            +
                    url: '/d/load',
         
     | 
| 
      
 1128 
     | 
    
         
            +
                    data: {
         
     | 
| 
      
 1129 
     | 
    
         
            +
                      "table" : this.current_table,
         
     | 
| 
      
 1130 
     | 
    
         
            +
                      "input_type" : "json",
         
     | 
| 
      
 1131 
     | 
    
         
            +
                      "output_type" : "json",
         
     | 
| 
      
 1132 
     | 
    
         
            +
                      "values" : JSON.stringify([d])
         
     | 
| 
      
 1133 
     | 
    
         
            +
                    },
         
     | 
| 
      
 1134 
     | 
    
         
            +
                    dataType: 'json',
         
     | 
| 
      
 1135 
     | 
    
         
            +
                    success: function(d) {
         
     | 
| 
      
 1136 
     | 
    
         
            +
                      if (that.validateajax(d) < 0) { return; }
         
     | 
| 
      
 1137 
     | 
    
         
            +
                      that.hideloading();
         
     | 
| 
      
 1138 
     | 
    
         
            +
                      alert('レコードを作成しました。');
         
     | 
| 
      
 1139 
     | 
    
         
            +
                    },
         
     | 
| 
      
 1140 
     | 
    
         
            +
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 1141 
     | 
    
         
            +
                      that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 1142 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1143 
     | 
    
         
            +
                  })
         
     | 
| 
      
 1144 
     | 
    
         
            +
                );
         
     | 
| 
      
 1145 
     | 
    
         
            +
              },
         
     | 
| 
      
 1146 
     | 
    
         
            +
              removerecord: function() {
         
     | 
| 
      
 1147 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 1148 
     | 
    
         
            +
                var checklist = $("#tab-recordlist-table").find("input:checked");
         
     | 
| 
      
 1149 
     | 
    
         
            +
                var completecount = checklist.length;
         
     | 
| 
      
 1150 
     | 
    
         
            +
                if (completecount > 0) {
         
     | 
| 
      
 1151 
     | 
    
         
            +
                  $('<div />')
         
     | 
| 
      
 1152 
     | 
    
         
            +
                    .append("選択した" + completecount + "件のレコードを削除しますか?")
         
     | 
| 
      
 1153 
     | 
    
         
            +
                    .dialog({
         
     | 
| 
      
 1154 
     | 
    
         
            +
                      modal: true,
         
     | 
| 
      
 1155 
     | 
    
         
            +
                      buttons: {
         
     | 
| 
      
 1156 
     | 
    
         
            +
                        'いいえ': function() {
         
     | 
| 
      
 1157 
     | 
    
         
            +
                          $(this).dialog('close');
         
     | 
| 
      
 1158 
     | 
    
         
            +
                        },
         
     | 
| 
      
 1159 
     | 
    
         
            +
                        'はい': function() {
         
     | 
| 
      
 1160 
     | 
    
         
            +
                          $(this).dialog('close');
         
     | 
| 
      
 1161 
     | 
    
         
            +
                          checklist.each(function(i, val) {
         
     | 
| 
      
 1162 
     | 
    
         
            +
                            that.showloading(
         
     | 
| 
      
 1163 
     | 
    
         
            +
                              $.ajax({
         
     | 
| 
      
 1164 
     | 
    
         
            +
                                url: '/d/delete',
         
     | 
| 
      
 1165 
     | 
    
         
            +
                                data: {
         
     | 
| 
      
 1166 
     | 
    
         
            +
                                  "table" : that.current_table,
         
     | 
| 
      
 1167 
     | 
    
         
            +
                                  "id" : val.value
         
     | 
| 
      
 1168 
     | 
    
         
            +
                                },
         
     | 
| 
      
 1169 
     | 
    
         
            +
                                dataType: 'json',
         
     | 
| 
      
 1170 
     | 
    
         
            +
                                success: function() {
         
     | 
| 
      
 1171 
     | 
    
         
            +
                                  if (--completecount == 0) {
         
     | 
| 
      
 1172 
     | 
    
         
            +
                                    $('#tab-recordlist-form').submit();
         
     | 
| 
      
 1173 
     | 
    
         
            +
                                    alert('レコードを削除しました。');
         
     | 
| 
      
 1174 
     | 
    
         
            +
                                  } else if (completecount < 0){
         
     | 
| 
      
 1175 
     | 
    
         
            +
                                    that.hideloading();
         
     | 
| 
      
 1176 
     | 
    
         
            +
                                  }
         
     | 
| 
      
 1177 
     | 
    
         
            +
                                },
         
     | 
| 
      
 1178 
     | 
    
         
            +
                                error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 1179 
     | 
    
         
            +
                                  completecount = 0;
         
     | 
| 
      
 1180 
     | 
    
         
            +
                                  that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 1181 
     | 
    
         
            +
                                }
         
     | 
| 
      
 1182 
     | 
    
         
            +
                              })
         
     | 
| 
      
 1183 
     | 
    
         
            +
                            );
         
     | 
| 
      
 1184 
     | 
    
         
            +
                          });
         
     | 
| 
      
 1185 
     | 
    
         
            +
                        }
         
     | 
| 
      
 1186 
     | 
    
         
            +
                      }
         
     | 
| 
      
 1187 
     | 
    
         
            +
                    });
         
     | 
| 
      
 1188 
     | 
    
         
            +
                }
         
     | 
| 
      
 1189 
     | 
    
         
            +
              },
         
     | 
| 
      
 1190 
     | 
    
         
            +
              removecolumn: function() {
         
     | 
| 
      
 1191 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 1192 
     | 
    
         
            +
                var checklist = $("#tab-columnlist-table").find("input:checked");
         
     | 
| 
      
 1193 
     | 
    
         
            +
                var completecount = checklist.length;
         
     | 
| 
      
 1194 
     | 
    
         
            +
                if (completecount) {
         
     | 
| 
      
 1195 
     | 
    
         
            +
                  $('<div />')
         
     | 
| 
      
 1196 
     | 
    
         
            +
                    .append("選択した" + completecount + "件のカラムを削除しますか?")
         
     | 
| 
      
 1197 
     | 
    
         
            +
                    .dialog({
         
     | 
| 
      
 1198 
     | 
    
         
            +
                      modal: true,
         
     | 
| 
      
 1199 
     | 
    
         
            +
                      buttons: {
         
     | 
| 
      
 1200 
     | 
    
         
            +
                        'いいえ': function() {
         
     | 
| 
      
 1201 
     | 
    
         
            +
                          $(this).dialog('close');
         
     | 
| 
      
 1202 
     | 
    
         
            +
                        },
         
     | 
| 
      
 1203 
     | 
    
         
            +
                        'はい': function() {
         
     | 
| 
      
 1204 
     | 
    
         
            +
                          $(this).dialog('close');
         
     | 
| 
      
 1205 
     | 
    
         
            +
                          checklist.each(function(i, val) {
         
     | 
| 
      
 1206 
     | 
    
         
            +
                            that.showloading(
         
     | 
| 
      
 1207 
     | 
    
         
            +
                              $.ajax({
         
     | 
| 
      
 1208 
     | 
    
         
            +
                                url: '/d/column_remove',
         
     | 
| 
      
 1209 
     | 
    
         
            +
                                data: {
         
     | 
| 
      
 1210 
     | 
    
         
            +
                                  "table" : that.current_table,
         
     | 
| 
      
 1211 
     | 
    
         
            +
                                  "name" : val.value
         
     | 
| 
      
 1212 
     | 
    
         
            +
                                },
         
     | 
| 
      
 1213 
     | 
    
         
            +
                                dataType: 'json',
         
     | 
| 
      
 1214 
     | 
    
         
            +
                                success: function() {
         
     | 
| 
      
 1215 
     | 
    
         
            +
                                  if (!(--completecount)) {
         
     | 
| 
      
 1216 
     | 
    
         
            +
                                    that.columnlist(that.current_table);
         
     | 
| 
      
 1217 
     | 
    
         
            +
                                    alert('カラムを削除しました。');
         
     | 
| 
      
 1218 
     | 
    
         
            +
                                  } else if (completecount < 0){
         
     | 
| 
      
 1219 
     | 
    
         
            +
                                    that.hideloading();
         
     | 
| 
      
 1220 
     | 
    
         
            +
                                  }
         
     | 
| 
      
 1221 
     | 
    
         
            +
                                },
         
     | 
| 
      
 1222 
     | 
    
         
            +
                                error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 1223 
     | 
    
         
            +
                                  completecount = 0;
         
     | 
| 
      
 1224 
     | 
    
         
            +
                                  that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 1225 
     | 
    
         
            +
                                }
         
     | 
| 
      
 1226 
     | 
    
         
            +
                              })
         
     | 
| 
      
 1227 
     | 
    
         
            +
                            );
         
     | 
| 
      
 1228 
     | 
    
         
            +
                          });
         
     | 
| 
      
 1229 
     | 
    
         
            +
                        }
         
     | 
| 
      
 1230 
     | 
    
         
            +
                      }
         
     | 
| 
      
 1231 
     | 
    
         
            +
                    });
         
     | 
| 
      
 1232 
     | 
    
         
            +
                }
         
     | 
| 
      
 1233 
     | 
    
         
            +
              },
         
     | 
| 
      
 1234 
     | 
    
         
            +
              removetable: function() {
         
     | 
| 
      
 1235 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 1236 
     | 
    
         
            +
                var checklist = $("#tab-tablelist-table").find("input:checked");
         
     | 
| 
      
 1237 
     | 
    
         
            +
                var completecount = checklist.length;
         
     | 
| 
      
 1238 
     | 
    
         
            +
                if (completecount > 0) {
         
     | 
| 
      
 1239 
     | 
    
         
            +
                  $('<div />')
         
     | 
| 
      
 1240 
     | 
    
         
            +
                    .append("選択した" + completecount + "件のテーブルを削除しますか?")
         
     | 
| 
      
 1241 
     | 
    
         
            +
                    .dialog({
         
     | 
| 
      
 1242 
     | 
    
         
            +
                      modal: true,
         
     | 
| 
      
 1243 
     | 
    
         
            +
                      buttons: {
         
     | 
| 
      
 1244 
     | 
    
         
            +
                        'いいえ': function() {
         
     | 
| 
      
 1245 
     | 
    
         
            +
                          $(this).dialog('close');
         
     | 
| 
      
 1246 
     | 
    
         
            +
                        },
         
     | 
| 
      
 1247 
     | 
    
         
            +
                        'はい': function() {
         
     | 
| 
      
 1248 
     | 
    
         
            +
                          $(this).dialog('close');
         
     | 
| 
      
 1249 
     | 
    
         
            +
                          checklist.each(function(i, val) {
         
     | 
| 
      
 1250 
     | 
    
         
            +
                            that.showloading(
         
     | 
| 
      
 1251 
     | 
    
         
            +
                              $.ajax({
         
     | 
| 
      
 1252 
     | 
    
         
            +
                                url: '/d/table_remove',
         
     | 
| 
      
 1253 
     | 
    
         
            +
                                data: {
         
     | 
| 
      
 1254 
     | 
    
         
            +
                                  "name" : val.value
         
     | 
| 
      
 1255 
     | 
    
         
            +
                                },
         
     | 
| 
      
 1256 
     | 
    
         
            +
                                dataType: 'json',
         
     | 
| 
      
 1257 
     | 
    
         
            +
                                success: function() {
         
     | 
| 
      
 1258 
     | 
    
         
            +
                                  if (--completecount == 0) {
         
     | 
| 
      
 1259 
     | 
    
         
            +
                                    that.tablelist();
         
     | 
| 
      
 1260 
     | 
    
         
            +
                                    that.update_tablelist();
         
     | 
| 
      
 1261 
     | 
    
         
            +
                                    alert('テーブルを削除しました。');
         
     | 
| 
      
 1262 
     | 
    
         
            +
                                  } else if (completecount < 0){
         
     | 
| 
      
 1263 
     | 
    
         
            +
                                    that.hideloading();
         
     | 
| 
      
 1264 
     | 
    
         
            +
                                  }
         
     | 
| 
      
 1265 
     | 
    
         
            +
                                },
         
     | 
| 
      
 1266 
     | 
    
         
            +
                                error: function(XMLHttpRequest, textStatus, errorThrown) {
         
     | 
| 
      
 1267 
     | 
    
         
            +
                                  completecount = 0;
         
     | 
| 
      
 1268 
     | 
    
         
            +
                                  that.errorloading(XMLHttpRequest);
         
     | 
| 
      
 1269 
     | 
    
         
            +
                                }
         
     | 
| 
      
 1270 
     | 
    
         
            +
                              })
         
     | 
| 
      
 1271 
     | 
    
         
            +
                            );
         
     | 
| 
      
 1272 
     | 
    
         
            +
                          });
         
     | 
| 
      
 1273 
     | 
    
         
            +
                        }
         
     | 
| 
      
 1274 
     | 
    
         
            +
                      }
         
     | 
| 
      
 1275 
     | 
    
         
            +
                    });
         
     | 
| 
      
 1276 
     | 
    
         
            +
                }
         
     | 
| 
      
 1277 
     | 
    
         
            +
              },
         
     | 
| 
      
 1278 
     | 
    
         
            +
              showloading: function(obj, hide_dialog) {
         
     | 
| 
      
 1279 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 1280 
     | 
    
         
            +
                if (obj == null) { return; }
         
     | 
| 
      
 1281 
     | 
    
         
            +
                this.semaphore[this.semaphore.length] = obj;
         
     | 
| 
      
 1282 
     | 
    
         
            +
                if ( $("#loadingdialog").size() > 0 || hide_dialog) { return; }
         
     | 
| 
      
 1283 
     | 
    
         
            +
                $("<div />")
         
     | 
| 
      
 1284 
     | 
    
         
            +
                  .attr("id", "loadingdialog")
         
     | 
| 
      
 1285 
     | 
    
         
            +
                  .attr("style", "text-align: center;")
         
     | 
| 
      
 1286 
     | 
    
         
            +
                  .append($("<img />").attr("src", "images/loading.gif"))
         
     | 
| 
      
 1287 
     | 
    
         
            +
                  .append(" Loading...")
         
     | 
| 
      
 1288 
     | 
    
         
            +
                  .dialog({
         
     | 
| 
      
 1289 
     | 
    
         
            +
                    title: "",
         
     | 
| 
      
 1290 
     | 
    
         
            +
                    width: 200,
         
     | 
| 
      
 1291 
     | 
    
         
            +
                    height: 110,
         
     | 
| 
      
 1292 
     | 
    
         
            +
                    minHeight: 110,
         
     | 
| 
      
 1293 
     | 
    
         
            +
                    modal: true,
         
     | 
| 
      
 1294 
     | 
    
         
            +
                    resizable: false,
         
     | 
| 
      
 1295 
     | 
    
         
            +
                    draggable: false,
         
     | 
| 
      
 1296 
     | 
    
         
            +
                    position: ["right", "bottom"],
         
     | 
| 
      
 1297 
     | 
    
         
            +
                    autoOpen: false,
         
     | 
| 
      
 1298 
     | 
    
         
            +
                    buttons: {
         
     | 
| 
      
 1299 
     | 
    
         
            +
                      '中止': function() {
         
     | 
| 
      
 1300 
     | 
    
         
            +
                        if (obj) { obj.abort(); }
         
     | 
| 
      
 1301 
     | 
    
         
            +
                        that.hideloading();
         
     | 
| 
      
 1302 
     | 
    
         
            +
                      }
         
     | 
| 
      
 1303 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1304 
     | 
    
         
            +
                  });
         
     | 
| 
      
 1305 
     | 
    
         
            +
                $("#loadingdialog").parents(".ui-dialog").children(".ui-dialog-titlebar").remove();
         
     | 
| 
      
 1306 
     | 
    
         
            +
                $("#loadingdialog").dialog("open");
         
     | 
| 
      
 1307 
     | 
    
         
            +
                $(".ui-widget-overlay").css("opacity", "0.0");
         
     | 
| 
      
 1308 
     | 
    
         
            +
              },
         
     | 
| 
      
 1309 
     | 
    
         
            +
              hideloading: function() {
         
     | 
| 
      
 1310 
     | 
    
         
            +
                for (var i = 0; i < this.semaphore.length; i++) {
         
     | 
| 
      
 1311 
     | 
    
         
            +
                  if ( this.semaphore[i].readyState == 4) {
         
     | 
| 
      
 1312 
     | 
    
         
            +
                    this.semaphore.splice(i, 1);
         
     | 
| 
      
 1313 
     | 
    
         
            +
                    i--;
         
     | 
| 
      
 1314 
     | 
    
         
            +
                  }
         
     | 
| 
      
 1315 
     | 
    
         
            +
                }
         
     | 
| 
      
 1316 
     | 
    
         
            +
                if ( this.semaphore.length == 0) {
         
     | 
| 
      
 1317 
     | 
    
         
            +
                  $("#loadingdialog").dialog("close");
         
     | 
| 
      
 1318 
     | 
    
         
            +
                  $("#loadingdialog").remove();
         
     | 
| 
      
 1319 
     | 
    
         
            +
                }
         
     | 
| 
      
 1320 
     | 
    
         
            +
              },
         
     | 
| 
      
 1321 
     | 
    
         
            +
              errorloading: function(ajax, hide_dialog) {
         
     | 
| 
      
 1322 
     | 
    
         
            +
                var that = this;
         
     | 
| 
      
 1323 
     | 
    
         
            +
                var json = null;
         
     | 
| 
      
 1324 
     | 
    
         
            +
                if (ajax) {
         
     | 
| 
      
 1325 
     | 
    
         
            +
                  json = JSON.parse(ajax.responseText);
         
     | 
| 
      
 1326 
     | 
    
         
            +
                }
         
     | 
| 
      
 1327 
     | 
    
         
            +
                this.hideloading();
         
     | 
| 
      
 1328 
     | 
    
         
            +
                for (var i = 0; i < this.semaphore.length; i++) {
         
     | 
| 
      
 1329 
     | 
    
         
            +
                  this.semaphore[i].abort();
         
     | 
| 
      
 1330 
     | 
    
         
            +
                  this.semaphore.splice(i, 1);
         
     | 
| 
      
 1331 
     | 
    
         
            +
                  i--;
         
     | 
| 
      
 1332 
     | 
    
         
            +
                }
         
     | 
| 
      
 1333 
     | 
    
         
            +
                if ( $("#loadingdialog").size() == 0 && !hide_dialog) {
         
     | 
| 
      
 1334 
     | 
    
         
            +
                  var error_label;
         
     | 
| 
      
 1335 
     | 
    
         
            +
                  var error_message;
         
     | 
| 
      
 1336 
     | 
    
         
            +
                  if (json){
         
     | 
| 
      
 1337 
     | 
    
         
            +
                    error_label = "groongaでエラーが発生しました。";
         
     | 
| 
      
 1338 
     | 
    
         
            +
                    error_message = json[0][3] + "(" + json[0][0] + ")";
         
     | 
| 
      
 1339 
     | 
    
         
            +
                  } else if (ajax) {
         
     | 
| 
      
 1340 
     | 
    
         
            +
                    error_label = "通信エラーが発生しました。";
         
     | 
| 
      
 1341 
     | 
    
         
            +
                    error_message = "" + ajax.status + ": " + ajax.statusText;
         
     | 
| 
      
 1342 
     | 
    
         
            +
                  } else {
         
     | 
| 
      
 1343 
     | 
    
         
            +
                    error_label = "通信エラーが発生しました。";
         
     | 
| 
      
 1344 
     | 
    
         
            +
                    error_message = "";
         
     | 
| 
      
 1345 
     | 
    
         
            +
                  }
         
     | 
| 
      
 1346 
     | 
    
         
            +
                  $("<div />")
         
     | 
| 
      
 1347 
     | 
    
         
            +
                    .append($("<div />").text(error_label))
         
     | 
| 
      
 1348 
     | 
    
         
            +
                    .append($("<div />").text(error_message))
         
     | 
| 
      
 1349 
     | 
    
         
            +
                    .attr("id", "loadingdialog")
         
     | 
| 
      
 1350 
     | 
    
         
            +
                    .dialog({
         
     | 
| 
      
 1351 
     | 
    
         
            +
                      title: "",
         
     | 
| 
      
 1352 
     | 
    
         
            +
                      width: 340,
         
     | 
| 
      
 1353 
     | 
    
         
            +
                      height: 160,
         
     | 
| 
      
 1354 
     | 
    
         
            +
                      minHeight: 160,
         
     | 
| 
      
 1355 
     | 
    
         
            +
                      modal: true,
         
     | 
| 
      
 1356 
     | 
    
         
            +
                      resizable: false,
         
     | 
| 
      
 1357 
     | 
    
         
            +
                      draggable: false,
         
     | 
| 
      
 1358 
     | 
    
         
            +
                      open: function() {
         
     | 
| 
      
 1359 
     | 
    
         
            +
                        $(this).parents(".ui-dialog").children(".ui-dialog-titlebar").remove();
         
     | 
| 
      
 1360 
     | 
    
         
            +
                      },
         
     | 
| 
      
 1361 
     | 
    
         
            +
                      buttons: { OK: function() { that.hideloading(); } }
         
     | 
| 
      
 1362 
     | 
    
         
            +
                    });
         
     | 
| 
      
 1363 
     | 
    
         
            +
                }
         
     | 
| 
      
 1364 
     | 
    
         
            +
              },
         
     | 
| 
      
 1365 
     | 
    
         
            +
              validateajax: function(d, hide_dialog) {
         
     | 
| 
      
 1366 
     | 
    
         
            +
                if (!d) {
         
     | 
| 
      
 1367 
     | 
    
         
            +
                  this.errorloading(null, hide_dialog);
         
     | 
| 
      
 1368 
     | 
    
         
            +
                  return -1;
         
     | 
| 
      
 1369 
     | 
    
         
            +
                }
         
     | 
| 
      
 1370 
     | 
    
         
            +
                return 0;
         
     | 
| 
      
 1371 
     | 
    
         
            +
              }
         
     | 
| 
      
 1372 
     | 
    
         
            +
            });
         
     |