groonga-command 1.4.4 → 1.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce9859484daef364ba74d82aa2391c0f1adbf7c28370b3d8ca974cb7dd18c451
4
- data.tar.gz: c59cf788e9ac27ec0eea8e7ae330d62a48b6a48af000ef72d2c284b730969c01
3
+ metadata.gz: 1e8e7e4033e77829c575d2ef6832f8ad5c8d8883c0279d5fa56b8f368f66d671
4
+ data.tar.gz: ba868ba8b7f5a04b17ace4c18fe438cd7ecd2e3581d072f8cda4431d09f2ca84
5
5
  SHA512:
6
- metadata.gz: 801903b0deea2eaccb58f175e3eca3557f3783c1e627986016c65ce82709a7bc3f3ddbe882fd0fed9146e94819d0e8fe68ee836f321b0b5c6a37c72dc216c615
7
- data.tar.gz: 7fca220f7e886b28753a6610a228c4deffa2b2e18d0946d44c5179920a9452cc1dae9eed3101c481c61c659151c4f391fc979d3342a38313f0a1a2370d6bd556
6
+ metadata.gz: fcde76968b9b36f013419f3a38ece4caf3e81550b272a3bcf906b4c9e011be6a4d008a91ef79f7578ac0fd9365233994c1cbbf08c0ac0c25c9babfab75887193
7
+ data.tar.gz: 6afc4ddf0367b6de2e38de283176f92f82bd95c03d18ed25113983f16b368b207b1728db10d7fb98699766ba1d63c4f8022eb2bbd86f1c95dfa309701cda6f40
data/doc/text/news.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # News
2
2
 
3
+ ## 1.4.5: 2019-09-02
4
+
5
+ ### Improvements
6
+
7
+ * {Groonga::Command::Select}: Added support for labeled drilldowns in slice.
8
+
9
+ * {Groonga::Command::LogicalSelect}: Added support for labeled
10
+ drilldowns in slice.
11
+
3
12
  ## 1.4.4: 2019-09-02
4
13
 
5
14
  ### Improvements
@@ -91,15 +91,15 @@ module Groonga
91
91
  #
92
92
  # @since 1.2.8
93
93
  def labeled_drilldowns
94
- @labeled_drilldowns ||= parse_labeled_drilldowns
94
+ @labeled_drilldowns ||= parse_labeled_drilldowns("")
95
95
  end
96
96
 
97
97
  private
98
- def parse_labeled_drilldowns
98
+ def parse_labeled_drilldowns(prefix)
99
99
  raw_labeled_drilldowns = {}
100
100
  @arguments.each do |name, value|
101
101
  case name.to_s
102
- when /\Adrilldowns?\[(.+?)\]\.(.+?)\z/
102
+ when /\A#{Regexp.escape(prefix)}drilldowns?\[(.+?)\]\.(.+?)\z/
103
103
  label = $1
104
104
  parameter_name = $2
105
105
  raw_labeled_drilldowns[label] ||= {}
@@ -51,6 +51,7 @@ module Groonga
51
51
  output_columns = parse_array_value(raw_slice["output_columns"])
52
52
  offset = parse_integer_value(raw_slice["offset"])
53
53
  limit = parse_integer_value(raw_slice["limit"])
54
+ labeled_drilldowns = parse_labeled_drilldowns("slices[#{label}].")
54
55
  slices[label] = Slice.new(label,
55
56
  match_columns,
56
57
  query,
@@ -60,7 +61,8 @@ module Groonga
60
61
  sort_keys,
61
62
  output_columns,
62
63
  offset,
63
- limit)
64
+ limit,
65
+ labeled_drilldowns)
64
66
  end
65
67
  slices
66
68
  end
@@ -75,7 +77,8 @@ module Groonga
75
77
  :sort_keys,
76
78
  :output_columns,
77
79
  :offset,
78
- :limit)
80
+ :limit,
81
+ :labeled_drilldowns)
79
82
  end
80
83
  end
81
84
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Groonga
18
18
  module Command
19
- VERSION = "1.4.4"
19
+ VERSION = "1.4.5"
20
20
  end
21
21
  end
@@ -344,6 +344,7 @@ class LogicalSelectCommandTest < Test::Unit::TestCase
344
344
 
345
345
  def slice(parameters)
346
346
  slice = Groonga::Command::LogicalSelect::Slice.new
347
+ slice.labeled_drilldowns = {}
347
348
  parameters.each do |key, value|
348
349
  slice[key] = value
349
350
  end
@@ -335,6 +335,7 @@ class SelectCommandTest < Test::Unit::TestCase
335
335
 
336
336
  def slice(parameters)
337
337
  slice = Groonga::Command::Select::Slice.new
338
+ slice.labeled_drilldowns = {}
338
339
  parameters.each do |key, value|
339
340
  slice[key] = value
340
341
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groonga-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou