YUKI Hiroshi
null+****@clear*****
Fri Oct 31 13:50:02 JST 2014
YUKI Hiroshi 2014-10-31 13:50:02 +0900 (Fri, 31 Oct 2014) New Revision: e98686c31fc0b95c52106b68de1eadcbf32d2edb https://github.com/droonga/droonga-engine/commit/e98686c31fc0b95c52106b68de1eadcbf32d2edb Message: Groonga: select: Accept whitespace-separeted output_columns (command_version=1) Modified files: lib/droonga/plugins/groonga/select.rb Modified: lib/droonga/plugins/groonga/select.rb (+9 -1) =================================================================== --- lib/droonga/plugins/groonga/select.rb 2014-10-31 13:44:45 +0900 (9cb2898) +++ lib/droonga/plugins/groonga/select.rb 2014-10-31 13:50:02 +0900 (6ea2215) @@ -166,8 +166,16 @@ module Droonga queries end + COMMAND_VERSION_1_OUTPUT_COLUMNS_PATTERN = /\A[^\s,]+(\s+[^\s,]+)+\z/ + def convert_output_columns(output_columns) - output_columns.split(/\s*,\s*/) + output_columns = output_columns.strip + command_version_is_1 = output_columns =~ COMMAND_VERSION_1_OUTPUT_COLUMNS_PATTERN + if command_version_is_1 + output_columns.split(/\s+/) + else + output_columns.split(/\s*,\s*/) + end end end -------------- next part -------------- HTML����������������������������... Descargar