rroonga 2.0.2-x86-mingw32 → 2.0.3-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +5 -0
- data/Gemfile +1 -12
- data/README.textile +73 -0
- data/Rakefile +4 -57
- data/bin/grndump +11 -1
- data/ext/groonga/extconf.rb +125 -54
- data/ext/groonga/rb-grn-context.c +25 -7
- data/ext/groonga/rb-grn-database.c +25 -0
- data/ext/groonga/rb-grn-object.c +19 -7
- data/ext/groonga/rb-grn-table.c +8 -10
- data/ext/groonga/rb-grn.h +9 -2
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/lib/groonga/dumper.rb +2 -2
- data/lib/groonga/expression-builder.rb +33 -18
- data/rroonga-build.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_sjlj-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/mecab-config +0 -0
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/include/groonga/groonga.h +5 -5
- 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 +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +0 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +0 -0
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmecab.la +0 -0
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +0 -0
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +4 -4
- 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/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/commands/select.txt +349 -109
- data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +41 -10
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +71 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/jquery.js +154 -4
- data/vendor/local/share/doc/groonga/en/html/_static/underscore.js +21 -29
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/select.html +683 -162
- data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +170 -12
- data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/index.html +23 -16
- data/vendor/local/share/doc/groonga/en/html/indexing.html +95 -14
- data/vendor/local/share/doc/groonga/en/html/install.html +67 -37
- data/vendor/local/share/doc/groonga/en/html/limitations.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/log.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news.html +161 -25
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/output.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +22 -22
- data/vendor/local/share/doc/groonga/en/html/spec.html +13 -11
- data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +33 -6
- data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +33 -6
- data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +37 -6
- data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +293 -29
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +340 -27
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +282 -24
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +524 -15
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +103 -8
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +128 -13
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +155 -17
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/type.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/commands/select.txt +349 -109
- data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +41 -10
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +71 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/jquery.js +154 -4
- data/vendor/local/share/doc/groonga/ja/html/_static/underscore.js +21 -29
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/select.html +601 -162
- data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +170 -12
- data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/index.html +23 -16
- data/vendor/local/share/doc/groonga/ja/html/indexing.html +95 -14
- data/vendor/local/share/doc/groonga/ja/html/install.html +66 -37
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/log.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news.html +147 -25
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/output.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +22 -22
- data/vendor/local/share/doc/groonga/ja/html/spec.html +13 -11
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +33 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +33 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +37 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +292 -28
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +340 -27
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +282 -24
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +524 -15
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +103 -8
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +128 -13
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +155 -17
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/type.html +5 -5
- data/vendor/local/share/doc/groonga/source/commands/select.txt +349 -109
- data/vendor/local/share/doc/groonga/source/commands/suggest-completion.log +28 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-correction.log +28 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-learn-completion.log +1 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-learn-correction.log +1 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-learn-suggestion.log +1 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-mixed.log +74 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-suggestion.log +32 -1
- data/vendor/local/share/doc/groonga/source/conf.py +3 -3
- data/vendor/local/share/doc/groonga/source/example/completion-1.log +28 -1
- data/vendor/local/share/doc/groonga/source/example/correction-1.log +28 -1
- data/vendor/local/share/doc/groonga/source/example/suggestion-1.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +1 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +38 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +46 -4
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-4.log +38 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-5.log +38 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-6.log +38 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-7.log +40 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-8.log +48 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-1.log +6 -6
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-2.log +100 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-3.log +5 -5
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-4.log +80 -2
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-5.log +75 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-6.log +31 -4
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-7.log +38 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-1.log +7 -7
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-2.log +132 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-3.log +6 -6
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-4.log +132 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-1.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-10.log +95 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-2.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-3.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-4.log +86 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-5.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-6.log +70 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-7.log +51 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-8.log +55 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-9.log +34 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/network-1.log +18 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/network-3.log +80 -2
- data/vendor/local/share/doc/groonga/source/example/tutorial/patricia_trie-1.log +34 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/patricia_trie-2.log +89 -5
- data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-1.log +8 -8
- data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-2.log +66 -2
- data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-3.log +76 -2
- data/vendor/local/share/doc/groonga/source/install.txt +41 -10
- data/vendor/local/share/doc/groonga/source/news.txt +71 -0
- data/vendor/local/share/doc/groonga/source/tutorial/data.txt +1 -1
- data/vendor/local/share/groonga/examples/dictionary/edict/edict-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/edict/edict2grn.rb +1 -1
- data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro2grn.rb +1 -1
- data/vendor/local/share/groonga/examples/dictionary/gene95/gene-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb +1 -1
- data/vendor/local/share/groonga/examples/dictionary/init-db.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/jmdict/jmdict.rb +1 -1
- data/vendor/local/share/groonga/html/admin/css/{admin.css → groonga-admin.css} +5 -4
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_ffd27a_256x240.png → redmond/images/ui-icons_217bc0_256x240.png} +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_222222_256x240.png → redmond/images/ui-icons_2e83ff_256x240.png} +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_228ef1_256x240.png → redmond/images/ui-icons_469bdd_256x240.png} +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_ef8c08_256x240.png → redmond/images/ui-icons_d8e7f3_256x240.png} +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/jquery-ui-1.8.1.custom.css → redmond/jquery-ui-1.8.18.custom.css} +169 -90
- data/vendor/local/share/groonga/html/admin/images/groonga.svg +121 -0
- data/vendor/local/share/groonga/html/admin/index.html +44 -1145
- data/vendor/local/share/groonga/html/admin/js/groonga-admin.js +1354 -0
- data/vendor/local/share/groonga/html/admin/js/jquery-1.7.2.min.js +4 -0
- data/vendor/local/share/groonga/html/admin/js/jquery-ui-1.8.18.custom.min.js +356 -0
- data/vendor/local/share/man/ja/man1/groonga.1 +2813 -331
- data/vendor/local/share/man/man1/groonga.1 +2898 -337
- data/vendor/local/share/mecab/dic/naist-jdic/sys.dic +0 -0
- data/vendor/local/share/mecab/dic/naist-jdic/unk.dic +0 -0
- metadata +988 -921
- data/test/groonga-test-utils.rb +0 -139
- data/test/run-test.rb +0 -60
- data/test/test-accessor.rb +0 -36
- data/test/test-array.rb +0 -123
- data/test/test-column.rb +0 -350
- data/test/test-command-select.rb +0 -147
- data/test/test-context.rb +0 -130
- data/test/test-database-dumper.rb +0 -259
- data/test/test-database.rb +0 -148
- data/test/test-double-array-trie.rb +0 -164
- data/test/test-encoding.rb +0 -33
- data/test/test-exception.rb +0 -96
- data/test/test-expression-builder.rb +0 -269
- data/test/test-expression.rb +0 -134
- data/test/test-fix-size-column.rb +0 -77
- data/test/test-gqtp.rb +0 -70
- data/test/test-hash.rb +0 -344
- data/test/test-index-column.rb +0 -180
- data/test/test-index-cursor.rb +0 -93
- data/test/test-logger.rb +0 -37
- data/test/test-pagination.rb +0 -249
- data/test/test-patricia-trie.rb +0 -415
- data/test/test-plugin.rb +0 -35
- data/test/test-procedure.rb +0 -37
- data/test/test-query-log.rb +0 -258
- data/test/test-record.rb +0 -569
- data/test/test-remote.rb +0 -63
- data/test/test-schema-create-table.rb +0 -267
- data/test/test-schema-dumper.rb +0 -235
- data/test/test-schema-type.rb +0 -208
- data/test/test-schema-view.rb +0 -90
- data/test/test-schema.rb +0 -886
- data/test/test-snippet.rb +0 -130
- data/test/test-table-cursor.rb +0 -187
- data/test/test-table-dumper.rb +0 -83
- data/test/test-table-offset-and-limit.rb +0 -100
- data/test/test-table-select-mecab.rb +0 -80
- data/test/test-table-select-normalize.rb +0 -57
- data/test/test-table-select-weight.rb +0 -123
- data/test/test-table-select.rb +0 -191
- data/test/test-table.rb +0 -675
- data/test/test-type.rb +0 -79
- data/test/test-variable-size-column.rb +0 -147
- data/test/test-variable.rb +0 -28
- data/test/test-vector-column.rb +0 -76
- data/test/test-version.rb +0 -61
- data/test/test-view.rb +0 -72
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/vendor/local/share/groonga/html/admin/js/jquery-1.4.2.min.js +0 -154
- data/vendor/local/share/groonga/html/admin/js/jquery-ui-1.8.1.custom.min.js +0 -756
@@ -9,12 +9,13 @@
|
|
9
9
|
<title>groonga admin</title>
|
10
10
|
<link rel="shortcut icon" href="favicon.ico">
|
11
11
|
<link rel="icon" href="favicon.png">
|
12
|
-
<link rel="stylesheet" type="text/css" href="css/admin.css">
|
13
|
-
<link rel="stylesheet" type="text/css" href="css/
|
14
|
-
<script type="text/javascript" src="js/jquery-1.
|
15
|
-
<script type="text/javascript" src="js/jquery-ui-1.8.
|
12
|
+
<link rel="stylesheet" type="text/css" href="css/groonga-admin.css">
|
13
|
+
<link rel="stylesheet" type="text/css" href="css/redmond/jquery-ui-1.8.18.custom.css">
|
14
|
+
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
|
15
|
+
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>
|
16
16
|
<script type="text/javascript" src="js/jquery.json-2.2.min.js"></script>
|
17
17
|
<script type="text/javascript" src="js/jquery.flot-0.7.min.js"></script>
|
18
|
+
<script type="text/javascript" src="js/groonga-admin.js"></script>
|
18
19
|
</head>
|
19
20
|
<body>
|
20
21
|
<div id="header">
|
@@ -24,7 +25,12 @@
|
|
24
25
|
<tr>
|
25
26
|
<td id="left-column">
|
26
27
|
<div id="side-menu">
|
27
|
-
|
28
|
+
<h2>画面一覧</h2>
|
29
|
+
<ul id="side-menu-view-list">
|
30
|
+
<li><a href="#side-menu-summary" id="side-menu-summary">サマリー</a></li>
|
31
|
+
<li><a href="#side-menu-suggest" id="side-menu-suggest">サジェスト</a></li>
|
32
|
+
</ul>
|
33
|
+
<h2>テーブル一覧</h2>
|
28
34
|
<ul id="side-menu-tablelist" />
|
29
35
|
</div>
|
30
36
|
</td>
|
@@ -238,6 +244,37 @@
|
|
238
244
|
<input type="button" id="createcolumn-add-column" value="カラム追加">
|
239
245
|
</div>
|
240
246
|
</div>
|
247
|
+
|
248
|
+
<!-- suggest view -->
|
249
|
+
<div id="suggest-tabs">
|
250
|
+
<ul>
|
251
|
+
<li><a href="#suggest-tab-search">検索</a></li>
|
252
|
+
</ul>
|
253
|
+
<div id="suggest-tab-search">
|
254
|
+
<form id="suggest-tab-search-form">
|
255
|
+
<p>
|
256
|
+
<label for="suggest-dataset">データセット: </label>
|
257
|
+
<input type="text" id="suggest-dataset">
|
258
|
+
</p>
|
259
|
+
<label for="suggest-query">検索クエリ: </label>
|
260
|
+
<input type="text" id="suggest-query">
|
261
|
+
<input type="button" id="suggest-submit" value="検索" />
|
262
|
+
</form>
|
263
|
+
<div id="suggest-result-tabs">
|
264
|
+
<ul>
|
265
|
+
<li><a href="#suggest-result-tab-suggest">提案</a></li>
|
266
|
+
<li><a href="#suggest-result-tab-complete">補完</a></li>
|
267
|
+
<li><a href="#suggest-result-tab-correct">補正</a></li>
|
268
|
+
</ul>
|
269
|
+
<div id="suggest-result-tab-suggest">
|
270
|
+
</div>
|
271
|
+
<div id="suggest-result-tab-complete">
|
272
|
+
</div>
|
273
|
+
<div id="suggest-result-tab-correct">
|
274
|
+
</div>
|
275
|
+
</div>
|
276
|
+
</div>
|
277
|
+
</div>
|
241
278
|
</td>
|
242
279
|
</tr>
|
243
280
|
</table>
|
@@ -246,1147 +283,9 @@
|
|
246
283
|
Powered by <a href="http://jquery.com/">jQuery</a> and <a href="http://jqueryui.com/">jQuery UI</a>.
|
247
284
|
</div>
|
248
285
|
<script type="text/javascript">
|
249
|
-
function prim2html(prim, limit) {
|
250
|
-
switch(typeof prim) {
|
251
|
-
case 'undefined':
|
252
|
-
return 'undefined';
|
253
|
-
case 'boolean':
|
254
|
-
return prim ? 'true' : 'false';
|
255
|
-
case 'number':
|
256
|
-
return String(prim);
|
257
|
-
case 'string':
|
258
|
-
if (prim.length > limit) {
|
259
|
-
prim = prim.substring(0, limit) + '...';
|
260
|
-
}
|
261
|
-
return escapeHTML(prim);
|
262
|
-
case 'array':
|
263
|
-
case 'object':
|
264
|
-
if (prim == null) {
|
265
|
-
return 'null';
|
266
|
-
} else if ($.isArray(prim)) {
|
267
|
-
return 'array'; /* TODO: implement */
|
268
|
-
} else {
|
269
|
-
return 'object'; /* TODO: implement */
|
270
|
-
}
|
271
|
-
default:
|
272
|
-
return 'ERROR';
|
273
|
-
}
|
274
|
-
}
|
275
|
-
|
276
|
-
function escapeHTML(str) {
|
277
|
-
return str.replace(/&/g, "&")
|
278
|
-
.replace(/"/g, """)
|
279
|
-
.replace(/</g, "<")
|
280
|
-
.replace(/>/g, ">");
|
281
|
-
}
|
282
|
-
Groonga = {
|
283
|
-
key_type_list: ['Int8', 'UInt8', 'Int16', 'UInt16', 'Int32', 'UInt32',
|
284
|
-
'Int64', 'UInt64', 'Float', 'Time', 'ShortText',
|
285
|
-
'TokyoGeoPoint', 'WGS84GeoPoint'],
|
286
|
-
value_type_list: ['Object', 'Bool',
|
287
|
-
'Int8', 'UInt8', 'Int16', 'UInt16', 'Int32', 'UInt32',
|
288
|
-
'Int64', 'UInt64', 'Float', 'Time'],
|
289
|
-
column_type_list: ['Object', 'Bool',
|
290
|
-
'Int8', 'UInt8', 'Int16', 'UInt16', 'Int32', 'UInt32',
|
291
|
-
'Int64', 'UInt64', 'Float', 'Time', 'ShortText',
|
292
|
-
'Text', 'LongText', 'TokyoGeoPoint', 'WGS84GeoPoint'],
|
293
|
-
tokenizer_list: ['TokenDelimit', 'TokenUnigram', 'TokenBigram', 'TokenTrigram', 'TokenMecab'],
|
294
|
-
GRN_OBJ_PERSISTENT: (0x01<<15),
|
295
|
-
|
296
|
-
GRN_OBJ_TABLE_TYPE_MASK: (0x07),
|
297
|
-
GRN_OBJ_TABLE_HASH_KEY: (0x00),
|
298
|
-
GRN_OBJ_TABLE_PAT_KEY: (0x01),
|
299
|
-
GRN_OBJ_TABLE_NO_KEY: (0x03),
|
300
|
-
|
301
|
-
GRN_OBJ_KEY_WITH_SIS: (0x01<<6),
|
302
|
-
GRN_OBJ_KEY_NORMALIZE: (0x01<<7),
|
303
|
-
|
304
|
-
GRN_OBJ_COLUMN_TYPE_MASK: (0x07),
|
305
|
-
GRN_OBJ_COLUMN_SCALAR: (0x00),
|
306
|
-
GRN_OBJ_COLUMN_VECTOR: (0x01),
|
307
|
-
GRN_OBJ_COLUMN_INDEX: (0x02),
|
308
|
-
|
309
|
-
GRN_OBJ_COMPRESS_MASK: (0x07<<4),
|
310
|
-
GRN_OBJ_COMPRESS_NONE: (0x00<<4),
|
311
|
-
GRN_OBJ_COMPRESS_ZLIB: (0x01<<4),
|
312
|
-
GRN_OBJ_COMPRESS_LZO: (0x02<<4),
|
313
|
-
|
314
|
-
GRN_OBJ_WITH_SECTION: (0x01<<7),
|
315
|
-
GRN_OBJ_WITH_WEIGHT: (0x01<<8),
|
316
|
-
GRN_OBJ_WITH_POSITION: (0x01<<9)
|
317
|
-
};
|
318
|
-
GroongaAdmin = {
|
319
|
-
SELECT_PARAMS_LIST: ['match_columns', 'query', 'filter', 'scorer', 'sortby', 'output_columns', 'offset', 'limit', 'drilldown', 'drilldown_sortby', 'drilldown_output_columns', 'drilldown_offset', 'drilldown_limit'],
|
320
|
-
initialize: function() {
|
321
|
-
GroongaAdmin.current_table = null;
|
322
|
-
GroongaAdmin.statusTimer = null;
|
323
|
-
GroongaAdmin.semaphore = new Array();
|
324
|
-
GroongaAdmin.current_status = 0;
|
325
|
-
GroongaAdmin.reload_record_func = function(){};
|
326
|
-
|
327
|
-
GroongaAdmin.database_tabs = $('#database-tabs').tabs({
|
328
|
-
show: function(e, ui) {
|
329
|
-
GroongaAdmin.stop_status_timer();
|
330
|
-
if (ui.panel.id == 'database-tab-summary') {
|
331
|
-
GroongaAdmin.start_status_timer();
|
332
|
-
}
|
333
|
-
}
|
334
|
-
});
|
335
|
-
GroongaAdmin.table_tabs = $('#table-tabs').tabs({
|
336
|
-
show: function(e, ui) {
|
337
|
-
}
|
338
|
-
});
|
339
|
-
$('#tab-tablelist-link').click(function() {
|
340
|
-
GroongaAdmin.tablelist();
|
341
|
-
});
|
342
|
-
$('#tab-columnlist-link').click(function() {
|
343
|
-
GroongaAdmin.columnlist(GroongaAdmin.current_table);
|
344
|
-
});
|
345
|
-
$('#tab-createrecord-link').click(function() {
|
346
|
-
GroongaAdmin.update_createrecord(GroongaAdmin.current_table);
|
347
|
-
});
|
348
|
-
$('#tab-recordlist-link').click(function() {
|
349
|
-
GroongaAdmin.reload_record_func();
|
350
|
-
});
|
351
|
-
$('#createtable-add-table').click(function() {
|
352
|
-
GroongaAdmin.createtable();
|
353
|
-
});
|
354
|
-
$('#createrecord-add-record').click(function() {
|
355
|
-
GroongaAdmin.createrecord();
|
356
|
-
});
|
357
|
-
$('#createcolumn-add-column').click(function() {
|
358
|
-
GroongaAdmin.createcolumn();
|
359
|
-
});
|
360
|
-
$('#recordlist-remove-record').click(function() {
|
361
|
-
GroongaAdmin.removerecord();
|
362
|
-
});
|
363
|
-
$('#columnlist-remove-column').click(function() {
|
364
|
-
GroongaAdmin.removecolumn();
|
365
|
-
});
|
366
|
-
$('#tablelist-remove-table').click(function() {
|
367
|
-
GroongaAdmin.removetable();
|
368
|
-
});
|
369
|
-
$('#tab-recordlist-submit').click(function() {
|
370
|
-
if ($('#table-tab-recordlist-full-checkbox').attr('checked')) {
|
371
|
-
// full
|
372
|
-
var d = {
|
373
|
-
'table': GroongaAdmin.current_table
|
374
|
-
}
|
375
|
-
$.each(GroongaAdmin.SELECT_PARAMS_LIST, function(i, val) {
|
376
|
-
var e = $('#tab-recordlist-' + val);
|
377
|
-
if (e.val()) {
|
378
|
-
d[val] = e.val();
|
379
|
-
}
|
380
|
-
});
|
381
|
-
GroongaAdmin.recordlist(d, true);
|
382
|
-
} else {
|
383
|
-
// simple
|
384
|
-
GroongaAdmin.recordlist_simple(
|
385
|
-
GroongaAdmin.current_table,
|
386
|
-
$('#tab-recordlist-simplequery').val(),
|
387
|
-
$('#tab-recordlist-simplequerytype').val(),
|
388
|
-
1);
|
389
|
-
}
|
390
|
-
});
|
391
|
-
GroongaAdmin.update_tablelist();
|
392
|
-
|
393
|
-
var e1 = $('#createtable-key-type-builtin');
|
394
|
-
$.each(Groonga.key_type_list, function(i, val) {
|
395
|
-
e1.append($('<option />').val(val).text(val));
|
396
|
-
});
|
397
|
-
|
398
|
-
e1 = $('#createtable-value-type-builtin');
|
399
|
-
e1.append($('<option />').val('').text('なし'));
|
400
|
-
$.each(Groonga.value_type_list, function(i, val) {
|
401
|
-
e1.append($('<option />').val(val).text(val));
|
402
|
-
});
|
403
|
-
|
404
|
-
e1 = $('#createtable-default-tokenizer-builtin');
|
405
|
-
e1.append($('<option />').val('').text('なし'));
|
406
|
-
$.each(Groonga.tokenizer_list, function(i, val) {
|
407
|
-
e1.append($('<option />').val(val).text(val));
|
408
|
-
});
|
409
|
-
|
410
|
-
e1 = $('#createcolumn-type-builtin');
|
411
|
-
$.each(Groonga.column_type_list, function(i, val) {
|
412
|
-
e1.append($('<option />').val(val).text(val));
|
413
|
-
});
|
414
|
-
|
415
|
-
$('#tab-recordlist-simplequerytype').change(function() {
|
416
|
-
if ($(this).val() == 'scorer') {
|
417
|
-
$('#tab-recordlist-incremental').hide();
|
418
|
-
$('#tab-recordlist-incremental-label').hide();
|
419
|
-
} else {
|
420
|
-
$('#tab-recordlist-incremental').show();
|
421
|
-
$('#tab-recordlist-incremental-label').show();
|
422
|
-
}
|
423
|
-
$('#tab-recordlist-incremental').change();
|
424
|
-
}).change();
|
425
|
-
|
426
|
-
$('#table-tab-recordlist-full-checkbox').change(function() {
|
427
|
-
if ($(this).attr('checked')) {
|
428
|
-
$('#table-tab-recordlist-form-simple').hide();
|
429
|
-
$('#table-tab-recordlist-form-full').show();
|
430
|
-
} else {
|
431
|
-
$('#table-tab-recordlist-form-simple').show();
|
432
|
-
$('#table-tab-recordlist-form-full').hide();
|
433
|
-
}
|
434
|
-
}).change();
|
435
|
-
|
436
|
-
$('#tab-recordlist-incremental').change(function() {
|
437
|
-
$('#tab-recordlist-simplequery').unbind('keyup');
|
438
|
-
if ($(this).attr('checked') &&
|
439
|
-
$('#tab-recordlist-simplequerytype').val() != 'scorer') {
|
440
|
-
$('#tab-recordlist-simplequery').keyup(function(e) {
|
441
|
-
GroongaAdmin.recordlist_simple(
|
442
|
-
GroongaAdmin.current_table,
|
443
|
-
$('#tab-recordlist-simplequery').val(),
|
444
|
-
$('#tab-recordlist-simplequerytype').val(),
|
445
|
-
1,
|
446
|
-
true);
|
447
|
-
});
|
448
|
-
}
|
449
|
-
}).change();
|
450
|
-
|
451
|
-
$('#createcolumn-type').change(function(e) {
|
452
|
-
var s = $('#createcolumn-type-table option:selected');
|
453
|
-
var cs = $('#createcolumn-source');
|
454
|
-
if (s.length > 0) {
|
455
|
-
cs.empty().removeAttr('disabled');
|
456
|
-
GroongaAdmin.showloading(
|
457
|
-
$.ajax({
|
458
|
-
url: '/d/column_list',
|
459
|
-
data: {'table': s.val()},
|
460
|
-
dataType: 'json',
|
461
|
-
success: function(d) {
|
462
|
-
if(GroongaAdmin.validateajax(d) < 0) { return; }
|
463
|
-
var idx;
|
464
|
-
var b = d[1];
|
465
|
-
$.each(b[0], function(i, val) {
|
466
|
-
if (val[0] == 'name') { idx = i; }
|
467
|
-
});
|
468
|
-
if (idx) {
|
469
|
-
b.shift();
|
470
|
-
$.each(b, function(i, val) {
|
471
|
-
cs.append($('<option />').val(val[idx]).text(val[idx]));
|
472
|
-
});
|
473
|
-
}
|
474
|
-
GroongaAdmin.hideloading();
|
475
|
-
},
|
476
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
477
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
478
|
-
}
|
479
|
-
})
|
480
|
-
);
|
481
|
-
} else {
|
482
|
-
cs.empty().attr('disabled', 'disabled');
|
483
|
-
}
|
484
|
-
});
|
485
|
-
|
486
|
-
GroongaAdmin.recordlist_count = 30;
|
487
|
-
},
|
488
|
-
start_status_timer: function() {
|
489
|
-
GroongaAdmin.stop_status_timer();
|
490
|
-
GroongaAdmin.status();
|
491
|
-
GroongaAdmin.statusTimer = setInterval(GroongaAdmin.status, 1000);
|
492
|
-
},
|
493
|
-
change_status_timer: function(time) {
|
494
|
-
GroongaAdmin.stop_status_timer();
|
495
|
-
GroongaAdmin.statusTimer = setInterval(GroongaAdmin.status, time);
|
496
|
-
},
|
497
|
-
stop_status_timer: function() {
|
498
|
-
if (GroongaAdmin.statusTimer) {
|
499
|
-
clearInterval(GroongaAdmin.statusTimer);
|
500
|
-
GroongaAdmin.statusTimer = null;
|
501
|
-
}
|
502
|
-
},
|
503
|
-
create_table_element: function (d, check, button) {
|
504
|
-
var elms = ['<table class="records">'];
|
505
|
-
if ($.isArray(d)) {
|
506
|
-
elms.push('<thead>');
|
507
|
-
var l = d.length;
|
508
|
-
if (l >= 1) {
|
509
|
-
var line = d[0];
|
510
|
-
elms.push('<thead>');
|
511
|
-
if ($.isArray(line)) {
|
512
|
-
elms.push('<tr>');
|
513
|
-
var m = line.length;
|
514
|
-
if (check) {
|
515
|
-
elms.push('<th/>');
|
516
|
-
}
|
517
|
-
for (var j = 0; j < m; j++) {
|
518
|
-
elms.push('<th>');
|
519
|
-
elms.push(prim2html(line[j][0], 128));
|
520
|
-
elms.push('<br />');
|
521
|
-
elms.push(prim2html(line[j][1], 128));
|
522
|
-
elms.push('</th>');
|
523
|
-
}
|
524
|
-
if (button) {
|
525
|
-
elms.push('<th/>');
|
526
|
-
}
|
527
|
-
elms.push('</tr>');
|
528
|
-
}
|
529
|
-
elms.push('</thead>');
|
530
|
-
elms.push('<tbody>');
|
531
|
-
for (var i = 1; i < l; i++) {
|
532
|
-
line = d[i];
|
533
|
-
if ($.isArray(line)) {
|
534
|
-
elms.push('<tr>');
|
535
|
-
var m = line.length;
|
536
|
-
switch(check) {// チェックボックスの値を何にするか
|
537
|
-
case 1: // 1番目の要素(レコード一覧の_id等)
|
538
|
-
case 2: // 2番目の要素(テーブル・カラム一覧のname等)
|
539
|
-
elms.push('<td><input type="checkbox" value="');
|
540
|
-
elms.push(line[check-1]);
|
541
|
-
elms.push('" /></td>');
|
542
|
-
break;
|
543
|
-
}
|
544
|
-
for (var j = 0; j < m; j++) {
|
545
|
-
elms.push('<td>');
|
546
|
-
elms.push(prim2html(line[j], 128));
|
547
|
-
elms.push('</td>');
|
548
|
-
}
|
549
|
-
switch(button) {
|
550
|
-
case 1: // Edit record
|
551
|
-
elms.push('<td><input type="button" onClick="GroongaAdmin.show_edit_record(');
|
552
|
-
elms.push(line[0]);
|
553
|
-
elms.push(');" value="編集" /></td>');
|
554
|
-
break;
|
555
|
-
case 2: // Table
|
556
|
-
elms.push('<td><input type="button" onClick="$(\'#side-menu-tablelist-link-');
|
557
|
-
elms.push(line[1]);
|
558
|
-
elms.push('\').click();" value="詳細" /></td>');
|
559
|
-
break;
|
560
|
-
}
|
561
|
-
elms.push('</tr>');
|
562
|
-
}
|
563
|
-
}
|
564
|
-
elms.push('</tbody>');
|
565
|
-
}
|
566
|
-
}
|
567
|
-
elms.push('</table>');
|
568
|
-
return elms.join('');
|
569
|
-
},
|
570
|
-
show_edit_record: function(id) {
|
571
|
-
$('#table-tabs').tabs('select', 2);
|
572
|
-
GroongaAdmin.update_createrecord(GroongaAdmin.current_table, id);
|
573
|
-
},
|
574
|
-
format_unix_time: function(unix_time) {
|
575
|
-
var date = new Date();
|
576
|
-
date.setTime(unix_time * 1000);
|
577
|
-
return date.toLocaleString();
|
578
|
-
},
|
579
|
-
format_duration: function(duration_in_seconds) {
|
580
|
-
var duration = "";
|
581
|
-
var days = Math.floor(duration_in_seconds / 3600 / 24);
|
582
|
-
var hours = Math.floor(duration_in_seconds / 3600 % 24);
|
583
|
-
var minutes = Math.floor(duration_in_seconds / 60 % 60);
|
584
|
-
var seconds = Math.floor(duration_in_seconds % 60);
|
585
|
-
|
586
|
-
if (days > 0) {
|
587
|
-
duration += days;
|
588
|
-
if (days == 1) {
|
589
|
-
duration += " day, ";
|
590
|
-
} else {
|
591
|
-
duration += " days, ";
|
592
|
-
}
|
593
|
-
}
|
594
|
-
if (days > 0 || hours > 0) {
|
595
|
-
duration += hours + ":" + minutes + ":" + seconds;
|
596
|
-
} else if (minutes > 0) {
|
597
|
-
duration += minutes + ":" + seconds;
|
598
|
-
} else {
|
599
|
-
duration += seconds;
|
600
|
-
}
|
601
|
-
|
602
|
-
return duration;
|
603
|
-
},
|
604
|
-
maxThroughput: 0,
|
605
|
-
lastNQueries: -1,
|
606
|
-
keepLastNData: 100,
|
607
|
-
throughputData: [],
|
608
|
-
throughputChart: null,
|
609
|
-
updateThroughputChart: function(statusData) {
|
610
|
-
var maxThroughputUpdated = false;
|
611
|
-
if (this.lastNQueries > 0) {
|
612
|
-
var throughput = statusData.n_queries - this.lastNQueries;
|
613
|
-
this.throughputData.push(throughput);
|
614
|
-
if (this.maxThroughput < throughput) {
|
615
|
-
this.maxThroughput = throughput;
|
616
|
-
maxThroughputUpdated = true;
|
617
|
-
}
|
618
|
-
}
|
619
|
-
if (this.throughputData.length > this.keepLastNData) {
|
620
|
-
this.throughputData.shift();
|
621
|
-
}
|
622
|
-
if (!this.throughputChart) {
|
623
|
-
this.throughputChart = $.plot($("#throughput-chart"),
|
624
|
-
[[]],
|
625
|
-
{xaxis: {min: -(this.keepLastNData - 1),
|
626
|
-
max: 0},
|
627
|
-
yaxis: {min: 0}});
|
628
|
-
}
|
629
|
-
var that = this;
|
630
|
-
var chartSeries = $.map(this.throughputData, function(n, i) {
|
631
|
-
return [[-(that.throughputData.length - i) + 1, n]];
|
632
|
-
});
|
633
|
-
this.throughputChart.setData([chartSeries]);
|
634
|
-
if (maxThroughputUpdated) {
|
635
|
-
this.throughputChart.setupGrid();
|
636
|
-
}
|
637
|
-
this.throughputChart.draw();
|
638
|
-
this.lastNQueries = statusData.n_queries;
|
639
|
-
},
|
640
|
-
status: function() {
|
641
|
-
if (GroongaAdmin.current_status > 0) { return; }
|
642
|
-
GroongaAdmin.current_status++;
|
643
|
-
$.ajax({
|
644
|
-
url: '/d/status',
|
645
|
-
data: {},
|
646
|
-
dataType: 'json',
|
647
|
-
success: function(b) {
|
648
|
-
GroongaAdmin.current_status--;
|
649
|
-
if (!b) {
|
650
|
-
GroongaAdmin.change_status_timer(10000);
|
651
|
-
return;
|
652
|
-
}
|
653
|
-
var d = b[1];
|
654
|
-
$('#status-starttime').text(GroongaAdmin.format_unix_time(d.starttime));
|
655
|
-
$('#status-uptime').text(GroongaAdmin.format_duration(d.uptime));
|
656
|
-
$('#status-n-queries').text(d.n_queries);
|
657
|
-
$('#status-cache-hit-rate').text(d.cache_hit_rate);
|
658
|
-
GroongaAdmin.updateThroughputChart(d);
|
659
|
-
GroongaAdmin.change_status_timer(1000);
|
660
|
-
},
|
661
|
-
error: function() {
|
662
|
-
GroongaAdmin.current_status--;
|
663
|
-
GroongaAdmin.change_status_timer(10000);
|
664
|
-
}
|
665
|
-
});
|
666
|
-
},
|
667
|
-
update_tablelist: function() {
|
668
|
-
GroongaAdmin.showloading(
|
669
|
-
$.ajax({
|
670
|
-
url: '/d/table_list',
|
671
|
-
data: {},
|
672
|
-
dataType: 'json',
|
673
|
-
success: function(d) {
|
674
|
-
if (GroongaAdmin.validateajax(d) < 0) { return; }
|
675
|
-
d.shift();
|
676
|
-
var tl = $('#side-menu-tablelist').empty();
|
677
|
-
var tt = $('#createtable-key-type-table').empty();
|
678
|
-
var vt = $('#createtable-value-type-table').empty();
|
679
|
-
var ct = $('#createcolumn-type-table').empty();
|
680
|
-
tl.append(
|
681
|
-
$('<li />').append(
|
682
|
-
$('<a />').attr('href', '#side-menu-database')
|
683
|
-
.text('サマリー')
|
684
|
-
.click(function() {
|
685
|
-
GroongaAdmin.current_table = null;
|
686
|
-
$('#table-tabs').hide();
|
687
|
-
$('#database-tabs').show();
|
688
|
-
GroongaAdmin.start_status_timer();
|
689
|
-
})
|
690
|
-
)
|
691
|
-
)
|
692
|
-
var b = d.shift();
|
693
|
-
b.shift();
|
694
|
-
$.each(b, function(i, val) {
|
695
|
-
var table_name = val[1];
|
696
|
-
tl.append(
|
697
|
-
$('<li />').append(
|
698
|
-
$('<a />')
|
699
|
-
.attr('id', 'side-menu-tablelist-link-' + table_name)
|
700
|
-
.attr('href', '#side-menu-tablelist-' + table_name)
|
701
|
-
.text(table_name)
|
702
|
-
.click(function() {
|
703
|
-
GroongaAdmin.current_table = table_name;
|
704
|
-
$('#database-tabs').hide();
|
705
|
-
GroongaAdmin.stop_status_timer();
|
706
|
-
$('#table-tabs').show();
|
707
|
-
GroongaAdmin.columnlist(table_name);
|
708
|
-
$('#tab-recordlist-simplequery').val('');
|
709
|
-
GroongaAdmin.recordlist_simple(table_name, null, null, 1);
|
710
|
-
GroongaAdmin.update_createrecord(GroongaAdmin.current_table);
|
711
|
-
})
|
712
|
-
)
|
713
|
-
);
|
714
|
-
tt.append($('<option />').val(val[1]).text(val[1]));
|
715
|
-
vt.append($('<option />').val(val[1]).text(val[1]));
|
716
|
-
ct.append($('<option />').val(val[1]).text(val[1]));
|
717
|
-
});
|
718
|
-
GroongaAdmin.hideloading();
|
719
|
-
},
|
720
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
721
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
722
|
-
}
|
723
|
-
})
|
724
|
-
);
|
725
|
-
},
|
726
|
-
tablelist: function() {
|
727
|
-
$('#tab-tablelist-table').empty();
|
728
|
-
GroongaAdmin.showloading(
|
729
|
-
$.ajax({
|
730
|
-
url: '/d/table_list',
|
731
|
-
data: {},
|
732
|
-
dataType: 'json',
|
733
|
-
success: function(d) {
|
734
|
-
if (GroongaAdmin.validateajax(d) < 0) { return; }
|
735
|
-
var b = d[1];
|
736
|
-
var table = $(GroongaAdmin.create_table_element(b, 2, 2));
|
737
|
-
$('#tab-tablelist-table').append($('<h1 />').text('テーブル一覧')).append(table);
|
738
|
-
GroongaAdmin.hideloading();
|
739
|
-
},
|
740
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
741
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
742
|
-
}
|
743
|
-
})
|
744
|
-
);
|
745
|
-
},
|
746
|
-
pager_element_factory: function(per_page, current_page, show_num, func) {
|
747
|
-
return function (total) {
|
748
|
-
var ret = $('<div />').addClass('pager');
|
749
|
-
if (total) {
|
750
|
-
var last_page = Math.floor((total - 1) / per_page) + 1;
|
751
|
-
var st = current_page - Math.floor(show_num / 2);
|
752
|
-
st = (st < 1) ? 1 : st;
|
753
|
-
var ed = st + show_num - 1;
|
754
|
-
ed = (ed > last_page) ? last_page : ed;
|
755
|
-
|
756
|
-
if (st > 1) {
|
757
|
-
ret.append(
|
758
|
-
$('<span />').addClass('pager').append(
|
759
|
-
$('<a />').attr('href', '#').text('1').click(func)
|
760
|
-
)
|
761
|
-
).append($('<span />').text('....'));
|
762
|
-
}
|
763
|
-
for (var i = st; i <= ed; i++) {
|
764
|
-
var s = $('<span />').append(
|
765
|
-
$('<a />').attr('href', '#').text(String(i)).click(func)
|
766
|
-
);
|
767
|
-
if (i == current_page) {
|
768
|
-
s.addClass('pager-current');
|
769
|
-
} else {
|
770
|
-
s.addClass('pager');
|
771
|
-
}
|
772
|
-
ret.append(s);
|
773
|
-
}
|
774
|
-
if (ed < last_page) {
|
775
|
-
ret.append($('<span />').text('....')).append(
|
776
|
-
$('<span />').addClass('pager').append(
|
777
|
-
$('<a />').attr('href', '#').text(String(last_page)).click(func)
|
778
|
-
)
|
779
|
-
)
|
780
|
-
}
|
781
|
-
}
|
782
|
-
return ret;
|
783
|
-
}
|
784
|
-
},
|
785
|
-
recordlist_simple: function(table_name, simplequery, simplequery_type, page, hide_dialog) {
|
786
|
-
var d = {
|
787
|
-
'table': table_name,
|
788
|
-
'offset': (page - 1) * GroongaAdmin.recordlist_count,
|
789
|
-
'limit': GroongaAdmin.recordlist_count
|
790
|
-
}
|
791
|
-
switch (simplequery_type) {
|
792
|
-
case 'query':
|
793
|
-
case 'filter':
|
794
|
-
case null:
|
795
|
-
if (simplequery) {
|
796
|
-
d[simplequery_type] = simplequery;
|
797
|
-
}
|
798
|
-
GroongaAdmin.recordlist(d, true, hide_dialog);
|
799
|
-
break;
|
800
|
-
}
|
801
|
-
},
|
802
|
-
recordlist: function(params, show_pager, hide_dialog) {
|
803
|
-
GroongaAdmin.reload_record_func = function(){
|
804
|
-
GroongaAdmin.recordlist(params, show_pager, hide_dialog);
|
805
|
-
};
|
806
|
-
GroongaAdmin.showloading(
|
807
|
-
$.ajax({
|
808
|
-
url: '/d/select',
|
809
|
-
data: params,
|
810
|
-
dataType: 'json',
|
811
|
-
success: function(d) {
|
812
|
-
if (GroongaAdmin.validateajax(d, hide_dialog) < 0) { return; }
|
813
|
-
var rc = d.shift();
|
814
|
-
if (rc[0] != 0) {
|
815
|
-
alert('error');
|
816
|
-
return false;
|
817
|
-
}
|
818
|
-
var body = d.shift();
|
819
|
-
var recs = body.shift();
|
820
|
-
var all_count = recs.shift()[0];
|
821
|
-
var pager;
|
822
|
-
if (show_pager) {
|
823
|
-
offset = params['offset'] || 0;
|
824
|
-
rows = params['limit'] || 10;
|
825
|
-
if (rows < 0){
|
826
|
-
rows = all_count + parseInt(rows) + 1;
|
827
|
-
}
|
828
|
-
if (rows != '' && !parseInt(rows)) {
|
829
|
-
pager = $('<span />');
|
830
|
-
} else {
|
831
|
-
pager =
|
832
|
-
GroongaAdmin.pager_element_factory(
|
833
|
-
rows,
|
834
|
-
Math.floor(offset/rows)+1,
|
835
|
-
13,
|
836
|
-
function() {
|
837
|
-
params['offset'] = (Number($(this).text()) - 1) * rows;
|
838
|
-
GroongaAdmin.recordlist(params, true, false);
|
839
|
-
return false;
|
840
|
-
}
|
841
|
-
)(all_count);
|
842
|
-
}
|
843
|
-
} else {
|
844
|
-
pager = $('<span />');
|
845
|
-
}
|
846
|
-
$('#tab-recordlist-table')
|
847
|
-
.empty()
|
848
|
-
.append($('<h1 />').text('レコード一覧: ' + params['table']))
|
849
|
-
.append($('<p />').text('総件数: ' + all_count))
|
850
|
-
.append(pager.clone(true))
|
851
|
-
.append($('<div />').html(GroongaAdmin.create_table_element(recs, 1, 1)))
|
852
|
-
.append(pager);
|
853
|
-
GroongaAdmin.hideloading();
|
854
|
-
},
|
855
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
856
|
-
GroongaAdmin.errorloading(XMLHttpRequest, hide_dialog);
|
857
|
-
}
|
858
|
-
})
|
859
|
-
,hide_dialog);
|
860
|
-
},
|
861
|
-
columnlist: function(table_name) {
|
862
|
-
$('#tab-columnlist-table').empty();
|
863
|
-
GroongaAdmin.showloading(
|
864
|
-
$.ajax({
|
865
|
-
url: '/d/column_list',
|
866
|
-
data: {'table': table_name},
|
867
|
-
dataType: 'json',
|
868
|
-
success: function(d) {
|
869
|
-
if (GroongaAdmin.validateajax(d) < 0) { return; }
|
870
|
-
var b = d[1];
|
871
|
-
var table = $(GroongaAdmin.create_table_element(b, 2));
|
872
|
-
$('#tab-columnlist-table')
|
873
|
-
.append($('<h1 />').text('カラム一覧: ' + table_name))
|
874
|
-
.append(table);
|
875
|
-
GroongaAdmin.hideloading();
|
876
|
-
},
|
877
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
878
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
879
|
-
}
|
880
|
-
})
|
881
|
-
);
|
882
|
-
},
|
883
|
-
add_record_inputbox: function(type, value) {
|
884
|
-
var inputbox = null;
|
885
|
-
switch(type){
|
886
|
-
case "Bool":
|
887
|
-
inputbox = $('<input />')
|
888
|
-
.attr("type","checkbox")
|
889
|
-
.attr("value","true");
|
890
|
-
if (value) {
|
891
|
-
inputbox.attr("checked","");
|
892
|
-
}
|
893
|
-
break;
|
894
|
-
case "UInt8":
|
895
|
-
case "UInt16":
|
896
|
-
case "UInt32":
|
897
|
-
case "UInt64":
|
898
|
-
case "Int8":
|
899
|
-
case "Int16":
|
900
|
-
case "Int32":
|
901
|
-
case "Int64":
|
902
|
-
case "Float":
|
903
|
-
inputbox = $('<input />')
|
904
|
-
.attr("type", "text")
|
905
|
-
.val(isNaN(value) ? "" : value);
|
906
|
-
break;
|
907
|
-
case "Text":
|
908
|
-
case "ShortText":
|
909
|
-
case "LongText":
|
910
|
-
inputbox = $('<textarea />')
|
911
|
-
.attr("cols", "50")
|
912
|
-
.attr("rows", "2")
|
913
|
-
.text(value ? value : "");
|
914
|
-
break;
|
915
|
-
case "TokyoGeoPoint":
|
916
|
-
case "WGS84GeoPoint":
|
917
|
-
case "Time":
|
918
|
-
inputbox = $('<input />')
|
919
|
-
.attr("type", "text")
|
920
|
-
.attr("size", "40")
|
921
|
-
.val(value ? value : "");
|
922
|
-
break;
|
923
|
-
case "Object":
|
924
|
-
inputbox = $('<input />')
|
925
|
-
.attr("type", "text")
|
926
|
-
.attr("disabled", "disabled");
|
927
|
-
break;
|
928
|
-
default:
|
929
|
-
inputbox = $('<input />')
|
930
|
-
.attr("type", "text")
|
931
|
-
.val(value ? value : "");
|
932
|
-
}
|
933
|
-
inputbox.addClass('column_values');
|
934
|
-
return inputbox;
|
935
|
-
},
|
936
|
-
add_record_deletebutton: function(){
|
937
|
-
var ret =
|
938
|
-
$('<span />')
|
939
|
-
.append("[×]")
|
940
|
-
.css('cursor', 'pointer')
|
941
|
-
.click(function() {
|
942
|
-
$(this).prev().remove();
|
943
|
-
$(this).next().remove();
|
944
|
-
$(this).remove();
|
945
|
-
});
|
946
|
-
return ret;
|
947
|
-
},
|
948
|
-
update_createrecord_loadcomplete: function(d_sel, d_col) {
|
949
|
-
var b = d_sel[1][0];
|
950
|
-
var columns = $('<tbody />');
|
951
|
-
var listofs = b[1].length - (d_col[1].length - 1);
|
952
|
-
for (var i = 1; i < b[1].length; i++) {
|
953
|
-
var line = b[1][i];
|
954
|
-
var value = null;
|
955
|
-
if (b[2]) value = b[2][i];
|
956
|
-
if ($.isArray(line)) {
|
957
|
-
var tr = $('<tr/ >')
|
958
|
-
.addClass('create-record-columns')
|
959
|
-
.append(
|
960
|
-
$('<td />')
|
961
|
-
.addClass('columnname')
|
962
|
-
.append(prim2html(line[0], 128))
|
963
|
-
)
|
964
|
-
.append(
|
965
|
-
$('<td />')
|
966
|
-
.addClass('columntype')
|
967
|
-
.append("(")
|
968
|
-
.append($('<span />')
|
969
|
-
.append(prim2html(line[1], 128))
|
970
|
-
)
|
971
|
-
.append(")")
|
972
|
-
);
|
973
|
-
var inputtd = $('<td />').addClass('columnval');
|
974
|
-
if (i >= listofs && d_col[1][i - listofs + 1][4].indexOf("COLUMN_VECTOR") >= 0){
|
975
|
-
var type = line[1];
|
976
|
-
if (value != null) {
|
977
|
-
for (var j = 0; j < value.length; j++) {
|
978
|
-
inputtd
|
979
|
-
.append(GroongaAdmin.add_record_inputbox(line[1], value[j]))
|
980
|
-
.append(GroongaAdmin.add_record_deletebutton())
|
981
|
-
.append('<br />');
|
982
|
-
}
|
983
|
-
}
|
984
|
-
inputtd
|
985
|
-
.append($('<span />')
|
986
|
-
.append("[値を追加]")
|
987
|
-
.css('cursor', 'pointer')
|
988
|
-
.click(function() {
|
989
|
-
var target = $(this).parent();
|
990
|
-
target
|
991
|
-
.append(GroongaAdmin.add_record_inputbox($(this).parent().prev().children().text()))
|
992
|
-
.append(GroongaAdmin.add_record_deletebutton())
|
993
|
-
.append("<br />");
|
994
|
-
$(this).appendTo(target);
|
995
|
-
})
|
996
|
-
);
|
997
|
-
} else {
|
998
|
-
inputtd.append(GroongaAdmin.add_record_inputbox(line[1], value));
|
999
|
-
if (line[0] == "_key" && value != null) {
|
1000
|
-
inputtd.children().attr("disabled", "disabled");
|
1001
|
-
}
|
1002
|
-
}
|
1003
|
-
tr.append(inputtd);
|
1004
|
-
columns.append(tr);
|
1005
|
-
}
|
1006
|
-
}
|
1007
|
-
$("#table-createrecord").append(columns);
|
1008
|
-
GroongaAdmin.hideloading();
|
1009
|
-
},
|
1010
|
-
update_createrecord: function(table_name, id) {
|
1011
|
-
var d_sel = null;
|
1012
|
-
var d_col = null;
|
1013
|
-
$('#table-createrecord').empty();
|
1014
|
-
GroongaAdmin.showloading(
|
1015
|
-
$.ajax({
|
1016
|
-
url: '/d/select',
|
1017
|
-
data: {
|
1018
|
-
'table' : table_name,
|
1019
|
-
'limit' : 1,
|
1020
|
-
'query' : '_id:' + id
|
1021
|
-
},
|
1022
|
-
dataType: 'json',
|
1023
|
-
success: function(d) {
|
1024
|
-
if (GroongaAdmin.validateajax(d) < 0) { return; }
|
1025
|
-
d_sel = d;
|
1026
|
-
if (d_col) {
|
1027
|
-
GroongaAdmin.update_createrecord_loadcomplete(d_sel, d_col);
|
1028
|
-
}
|
1029
|
-
},
|
1030
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
1031
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
1032
|
-
}
|
1033
|
-
})
|
1034
|
-
);
|
1035
|
-
GroongaAdmin.showloading(
|
1036
|
-
$.ajax({
|
1037
|
-
url: '/d/column_list',
|
1038
|
-
data: {
|
1039
|
-
'table' : table_name
|
1040
|
-
},
|
1041
|
-
dataType: 'json',
|
1042
|
-
success: function(d) {
|
1043
|
-
if (GroongaAdmin.validateajax(d) < 0) { return; }
|
1044
|
-
d_col = d;
|
1045
|
-
if (d_sel) {
|
1046
|
-
GroongaAdmin.update_createrecord_loadcomplete(d_sel, d_col);
|
1047
|
-
}
|
1048
|
-
},
|
1049
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
1050
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
1051
|
-
}
|
1052
|
-
})
|
1053
|
-
);
|
1054
|
-
},
|
1055
|
-
createtable: function() {
|
1056
|
-
var flags = 0;
|
1057
|
-
$('#createtable-flags>input:checked').each(function() {
|
1058
|
-
flags |= Groonga[$(this).val()];
|
1059
|
-
});
|
1060
|
-
flags |= Groonga[$('#createtable-key-index').val()];
|
1061
|
-
GroongaAdmin.showloading(
|
1062
|
-
$.ajax({
|
1063
|
-
url: '/d/table_create',
|
1064
|
-
data: {
|
1065
|
-
name: $('#createtable-name').val(),
|
1066
|
-
'flags': flags,
|
1067
|
-
key_type: $('#createtable-key-type').val(),
|
1068
|
-
value_type: $('#createtable-value-type').val(),
|
1069
|
-
default_tokenizer: $('#createtable-default-tokenizer').val()
|
1070
|
-
},
|
1071
|
-
dataType: 'json',
|
1072
|
-
success: function(d) {
|
1073
|
-
if (GroongaAdmin.validateajax(d) < 0) { return; }
|
1074
|
-
GroongaAdmin.hideloading();
|
1075
|
-
alert('テーブルを作成しました。');
|
1076
|
-
GroongaAdmin.update_tablelist();
|
1077
|
-
},
|
1078
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
1079
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
1080
|
-
}
|
1081
|
-
})
|
1082
|
-
);
|
1083
|
-
},
|
1084
|
-
createcolumn: function() {
|
1085
|
-
var flags = 0;
|
1086
|
-
$('#createcolumn-flags>input:checked').each(function() {
|
1087
|
-
flags |= Groonga[$(this).val()];
|
1088
|
-
});
|
1089
|
-
$('#createcolumn-ii-flags>input:checked').each(function() {
|
1090
|
-
flags |= Groonga[$(this).val()];
|
1091
|
-
});
|
1092
|
-
flags |= Groonga[$('#createcolumn-column-type').val()];
|
1093
|
-
flags |= Groonga[$('#createcolumn-column-compress').val()];
|
1094
|
-
d = {
|
1095
|
-
table: GroongaAdmin.current_table,
|
1096
|
-
name: $('#createcolumn-name').val(),
|
1097
|
-
'flags': flags,
|
1098
|
-
type: $('#createcolumn-type').val()
|
1099
|
-
};
|
1100
|
-
if ($('#createcolumn-source').val()) {
|
1101
|
-
d['source'] = $('#createcolumn-source').val();
|
1102
|
-
}
|
1103
|
-
GroongaAdmin.showloading(
|
1104
|
-
$.ajax({
|
1105
|
-
url: '/d/column_create',
|
1106
|
-
data: d,
|
1107
|
-
dataType: 'json',
|
1108
|
-
success: function(d) {
|
1109
|
-
if (GroongaAdmin.validateajax(d) < 0) { return; }
|
1110
|
-
GroongaAdmin.hideloading();
|
1111
|
-
alert('カラムを作成しました。');
|
1112
|
-
},
|
1113
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
1114
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
1115
|
-
}
|
1116
|
-
})
|
1117
|
-
);
|
1118
|
-
},
|
1119
|
-
createrecord_getvalue: function(type, inputbox) {
|
1120
|
-
switch(type){
|
1121
|
-
case "Bool":
|
1122
|
-
if (inputbox.is('input:checked')) {
|
1123
|
-
return true;
|
1124
|
-
} else {
|
1125
|
-
return false;
|
1126
|
-
}
|
1127
|
-
default:
|
1128
|
-
return inputbox.val();
|
1129
|
-
}
|
1130
|
-
},
|
1131
|
-
createrecord: function() {
|
1132
|
-
var d = {};
|
1133
|
-
$('.create-record-columns').each(function() {
|
1134
|
-
if (!$(this).children('.columnval').children().attr('disabled')
|
1135
|
-
|| $(this).children('.columnname').text() == "_key") {
|
1136
|
-
var type = $(this).children('.columntype').children().text();
|
1137
|
-
if ($(this).children('.columnval').children('span').length) {
|
1138
|
-
var arr = [];
|
1139
|
-
$(this).children('.columnval').children('.column_values').each(function() {
|
1140
|
-
arr.push(GroongaAdmin.createrecord_getvalue(type, $(this)));
|
1141
|
-
});
|
1142
|
-
d[$(this).children('.columnname').text()] = arr;
|
1143
|
-
} else {
|
1144
|
-
d[$(this).children('.columnname').text()] =
|
1145
|
-
GroongaAdmin.createrecord_getvalue(type, $(this).children('.columnval').children());
|
1146
|
-
}
|
1147
|
-
}
|
1148
|
-
});
|
1149
|
-
GroongaAdmin.showloading(
|
1150
|
-
$.ajax({
|
1151
|
-
url: '/d/load',
|
1152
|
-
data: {
|
1153
|
-
"table" : GroongaAdmin.current_table,
|
1154
|
-
"input_type" : "json",
|
1155
|
-
"output_type" : "json",
|
1156
|
-
"values" : $.toJSON([d])
|
1157
|
-
},
|
1158
|
-
dataType: 'json',
|
1159
|
-
success: function(d) {
|
1160
|
-
if (GroongaAdmin.validateajax(d) < 0) { return; }
|
1161
|
-
GroongaAdmin.hideloading();
|
1162
|
-
alert('レコードを作成しました。');
|
1163
|
-
},
|
1164
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
1165
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
1166
|
-
}
|
1167
|
-
})
|
1168
|
-
);
|
1169
|
-
},
|
1170
|
-
removerecord: function() {
|
1171
|
-
var checklist = $("#tab-recordlist-table").find("input:checked");
|
1172
|
-
var completecount = checklist.length;
|
1173
|
-
if (completecount > 0) {
|
1174
|
-
$('<div />')
|
1175
|
-
.append("選択した" + completecount + "件のレコードを削除しますか?")
|
1176
|
-
.dialog({
|
1177
|
-
modal: true,
|
1178
|
-
buttons: {
|
1179
|
-
'いいえ': function() {
|
1180
|
-
$(this).dialog('close');
|
1181
|
-
},
|
1182
|
-
'はい': function() {
|
1183
|
-
$(this).dialog('close');
|
1184
|
-
checklist.each(function(i, val) {
|
1185
|
-
GroongaAdmin.showloading(
|
1186
|
-
$.ajax({
|
1187
|
-
url: '/d/delete',
|
1188
|
-
data: {
|
1189
|
-
"table" : GroongaAdmin.current_table,
|
1190
|
-
"id" : val.value
|
1191
|
-
},
|
1192
|
-
dataType: 'json',
|
1193
|
-
success: function() {
|
1194
|
-
if (--completecount == 0) {
|
1195
|
-
$('#tab-recordlist-submit').click();
|
1196
|
-
alert('レコードを削除しました。');
|
1197
|
-
} else if (completecount < 0){
|
1198
|
-
GroongaAdmin.hideloading();
|
1199
|
-
}
|
1200
|
-
},
|
1201
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
1202
|
-
completecount = 0;
|
1203
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
1204
|
-
}
|
1205
|
-
})
|
1206
|
-
);
|
1207
|
-
});
|
1208
|
-
}
|
1209
|
-
}
|
1210
|
-
});
|
1211
|
-
}
|
1212
|
-
},
|
1213
|
-
removecolumn: function() {
|
1214
|
-
var checklist = $("#tab-columnlist-table").find("input:checked");
|
1215
|
-
var completecount = checklist.length;
|
1216
|
-
if (completecount) {
|
1217
|
-
$('<div />')
|
1218
|
-
.append("選択した" + completecount + "件のカラムを削除しますか?")
|
1219
|
-
.dialog({
|
1220
|
-
modal: true,
|
1221
|
-
buttons: {
|
1222
|
-
'いいえ': function() {
|
1223
|
-
$(this).dialog('close');
|
1224
|
-
},
|
1225
|
-
'はい': function() {
|
1226
|
-
$(this).dialog('close');
|
1227
|
-
checklist.each(function(i, val) {
|
1228
|
-
GroongaAdmin.showloading(
|
1229
|
-
$.ajax({
|
1230
|
-
url: '/d/column_remove',
|
1231
|
-
data: {
|
1232
|
-
"table" : GroongaAdmin.current_table,
|
1233
|
-
"name" : val.value
|
1234
|
-
},
|
1235
|
-
dataType: 'json',
|
1236
|
-
success: function() {
|
1237
|
-
if (!(--completecount)) {
|
1238
|
-
GroongaAdmin.columnlist(GroongaAdmin.current_table);
|
1239
|
-
alert('カラムを削除しました。');
|
1240
|
-
} else if (completecount < 0){
|
1241
|
-
GroongaAdmin.hideloading();
|
1242
|
-
}
|
1243
|
-
},
|
1244
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
1245
|
-
completecount = 0;
|
1246
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
1247
|
-
}
|
1248
|
-
})
|
1249
|
-
);
|
1250
|
-
});
|
1251
|
-
}
|
1252
|
-
}
|
1253
|
-
});
|
1254
|
-
}
|
1255
|
-
},
|
1256
|
-
removetable: function() {
|
1257
|
-
var checklist = $("#tab-tablelist-table").find("input:checked");
|
1258
|
-
var completecount = checklist.length;
|
1259
|
-
if (completecount > 0) {
|
1260
|
-
$('<div />')
|
1261
|
-
.append("選択した" + completecount + "件のテーブルを削除しますか?")
|
1262
|
-
.dialog({
|
1263
|
-
modal: true,
|
1264
|
-
buttons: {
|
1265
|
-
'いいえ': function() {
|
1266
|
-
$(this).dialog('close');
|
1267
|
-
},
|
1268
|
-
'はい': function() {
|
1269
|
-
$(this).dialog('close');
|
1270
|
-
checklist.each(function(i, val) {
|
1271
|
-
GroongaAdmin.showloading(
|
1272
|
-
$.ajax({
|
1273
|
-
url: '/d/table_remove',
|
1274
|
-
data: {
|
1275
|
-
"name" : val.value
|
1276
|
-
},
|
1277
|
-
dataType: 'json',
|
1278
|
-
success: function() {
|
1279
|
-
if (--completecount == 0) {
|
1280
|
-
GroongaAdmin.tablelist();
|
1281
|
-
GroongaAdmin.update_tablelist();
|
1282
|
-
alert('テーブルを削除しました。');
|
1283
|
-
} else if (completecount < 0){
|
1284
|
-
GroongaAdmin.hideloading();
|
1285
|
-
}
|
1286
|
-
},
|
1287
|
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
1288
|
-
completecount = 0;
|
1289
|
-
GroongaAdmin.errorloading(XMLHttpRequest);
|
1290
|
-
}
|
1291
|
-
})
|
1292
|
-
);
|
1293
|
-
});
|
1294
|
-
}
|
1295
|
-
}
|
1296
|
-
});
|
1297
|
-
}
|
1298
|
-
},
|
1299
|
-
showloading: function(obj, hide_dialog) {
|
1300
|
-
if (obj == null) { return; }
|
1301
|
-
GroongaAdmin.semaphore[GroongaAdmin.semaphore.length] = obj;
|
1302
|
-
if ( $("#loadingdialog").size() > 0 || hide_dialog) { return; }
|
1303
|
-
$("<div />")
|
1304
|
-
.attr("id", "loadingdialog")
|
1305
|
-
.attr("style", "text-align: center;")
|
1306
|
-
.append($("<img />").attr("src", "images/loading.gif"))
|
1307
|
-
.append(" Loading...")
|
1308
|
-
.dialog({
|
1309
|
-
title: "",
|
1310
|
-
width: 200,
|
1311
|
-
height: 110,
|
1312
|
-
minHeight: 110,
|
1313
|
-
modal: true,
|
1314
|
-
resizable: false,
|
1315
|
-
draggable: false,
|
1316
|
-
position: ["right", "bottom"],
|
1317
|
-
autoOpen: false,
|
1318
|
-
buttons: {
|
1319
|
-
'中止': function() {
|
1320
|
-
if (obj) { obj.abort(); }
|
1321
|
-
GroongaAdmin.hideloading();
|
1322
|
-
}
|
1323
|
-
}
|
1324
|
-
});
|
1325
|
-
$("#loadingdialog").parents(".ui-dialog").children(".ui-dialog-titlebar").remove();
|
1326
|
-
$("#loadingdialog").dialog("open");
|
1327
|
-
$(".ui-widget-overlay").css("opacity", "0.0");
|
1328
|
-
},
|
1329
|
-
hideloading: function() {
|
1330
|
-
for ( i = 0; i < GroongaAdmin.semaphore.length; i++) {
|
1331
|
-
if ( GroongaAdmin.semaphore[i].readyState == 4) {
|
1332
|
-
GroongaAdmin.semaphore.splice(i, 1);
|
1333
|
-
i--;
|
1334
|
-
}
|
1335
|
-
}
|
1336
|
-
if ( GroongaAdmin.semaphore.length == 0) {
|
1337
|
-
$("#loadingdialog").dialog("close");
|
1338
|
-
$("#loadingdialog").remove();
|
1339
|
-
}
|
1340
|
-
},
|
1341
|
-
errorloading: function(ajax, hide_dialog) {
|
1342
|
-
var json = null;
|
1343
|
-
if (ajax) {
|
1344
|
-
json = jQuery.parseJSON(ajax.responseText);
|
1345
|
-
}
|
1346
|
-
GroongaAdmin.hideloading();
|
1347
|
-
for ( i = 0; i < GroongaAdmin.semaphore.length; i++) {
|
1348
|
-
GroongaAdmin.semaphore[i].abort();
|
1349
|
-
GroongaAdmin.semaphore.splice(i, 1);
|
1350
|
-
i--;
|
1351
|
-
}
|
1352
|
-
if ( $("#loadingdialog").size() == 0 && !hide_dialog) {
|
1353
|
-
var errtext;
|
1354
|
-
if (json){
|
1355
|
-
errtext = "groongaでエラーが発生しました。<br>" + json[0][3] + "(" + json[0][0] + ")";
|
1356
|
-
} else if (ajax) {
|
1357
|
-
errtext = "通信エラーが発生しました。<br>" + ajax.status + ajax.statusText;
|
1358
|
-
} else {
|
1359
|
-
errtext = "通信エラーが発生しました。";
|
1360
|
-
}
|
1361
|
-
$("<div />")
|
1362
|
-
.append(errtext)
|
1363
|
-
.attr("id", "loadingdialog")
|
1364
|
-
.dialog({
|
1365
|
-
title: "",
|
1366
|
-
width: 340,
|
1367
|
-
height: 160,
|
1368
|
-
minHeight: 160,
|
1369
|
-
modal: true,
|
1370
|
-
resizable: false,
|
1371
|
-
draggable: false,
|
1372
|
-
open: function() {
|
1373
|
-
$(this).parents(".ui-dialog").children(".ui-dialog-titlebar").remove();
|
1374
|
-
},
|
1375
|
-
buttons: { OK: function() { GroongaAdmin.hideloading(); } }
|
1376
|
-
});
|
1377
|
-
}
|
1378
|
-
},
|
1379
|
-
validateajax: function(d, hide_dialog) {
|
1380
|
-
if (!d) {
|
1381
|
-
GroongaAdmin.errorloading(null, hide_dialog);
|
1382
|
-
return -1;
|
1383
|
-
}
|
1384
|
-
return 0;
|
1385
|
-
}
|
1386
|
-
};
|
1387
286
|
$(function() {
|
1388
|
-
GroongaAdmin
|
1389
|
-
|
287
|
+
var admin = new GroongaAdmin();
|
288
|
+
$(location.hash).click();
|
1390
289
|
$.ajaxSetup({
|
1391
290
|
timeout: 10000,
|
1392
291
|
cache: false
|