groonga-command 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/text/news.md +14 -0
- data/lib/groonga/command/query-log-flags-add.rb +50 -0
- data/lib/groonga/command/query-log-flags-get.rb +39 -0
- data/lib/groonga/command/query-log-flags-remove.rb +50 -0
- data/lib/groonga/command/query-log-flags-set.rb +50 -0
- data/lib/groonga/command/select.rb +12 -1
- data/lib/groonga/command/version.rb +2 -2
- data/lib/groonga/command.rb +5 -3
- data/test/command/test-query-log-flags-add.rb +45 -0
- data/test/command/test-query-log-flags-get.rb +31 -0
- data/test/command/test-query-log-flags-remove.rb +45 -0
- data/test/command/test-query-log-flags-set.rb +45 -0
- data/test/command/test-select.rb +15 -2
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 346b76e2d8b59edb0e883fad7d41d1f3b5efa001
|
4
|
+
data.tar.gz: 147a81ade996d83ee49b4741595627a25310c298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0e445df5d92a6d6b760460f6322921ea8fa2ae283c692283922f5e13e7d4d7249cd0edccdad2ddc82d2b448f822b2351bd3f066dac9fdd5d83c8ff383ff7add
|
7
|
+
data.tar.gz: dcdcf5e462840cbd02ee28f7b0f40ec4a44eeec74f9698d958374c985b5bdcc4891ddd2c66a3dddf88ebe1a975f59eec9880f42d66b91ee8ab578f5a75cda6a0
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 1.3.3: 2017-06-25
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* {Groonga::Command::Select#drilldown_filter}: Added.
|
8
|
+
|
9
|
+
* {Groonga::Command::QueryLogFlagsAdd}: Added.
|
10
|
+
|
11
|
+
* {Groonga::Command::QueryLogFlagsGet}: Added.
|
12
|
+
|
13
|
+
* {Groonga::Command::QueryLogFlagsRemove}: Added.
|
14
|
+
|
15
|
+
* {Groonga::Command::QueryLogFlagsSet}: Added.
|
16
|
+
|
3
17
|
## 1.3.2: 2017-01-18
|
4
18
|
|
5
19
|
### Improvements
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "groonga/command/base"
|
18
|
+
|
19
|
+
module Groonga
|
20
|
+
module Command
|
21
|
+
# A command class that represents `query_log_flags_add` command.
|
22
|
+
#
|
23
|
+
# @since 1.3.3
|
24
|
+
class QueryLogFlagsAdd < Base
|
25
|
+
class << self
|
26
|
+
def command_name
|
27
|
+
"query_log_flags_add"
|
28
|
+
end
|
29
|
+
|
30
|
+
def parameter_names
|
31
|
+
[
|
32
|
+
:flags
|
33
|
+
]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Command.register(command_name, self)
|
38
|
+
|
39
|
+
# @return [Array<String>] An array of flags specified in `flags`
|
40
|
+
# parameter value. This array is extracted by parsing `flags`
|
41
|
+
# parameter value. If `flags` parameter value is nil or empty,
|
42
|
+
# an empty array is returned.
|
43
|
+
#
|
44
|
+
# @since 1.3.3
|
45
|
+
def flags
|
46
|
+
@flags ||= flags_value(:flags)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "groonga/command/base"
|
18
|
+
|
19
|
+
module Groonga
|
20
|
+
module Command
|
21
|
+
# A command class that represents `query_log_flags_get` command.
|
22
|
+
#
|
23
|
+
# @since 1.3.3
|
24
|
+
class QueryLogFlagsGet < Base
|
25
|
+
class << self
|
26
|
+
def command_name
|
27
|
+
"query_log_flags_get"
|
28
|
+
end
|
29
|
+
|
30
|
+
def parameter_names
|
31
|
+
[
|
32
|
+
]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
Command.register(command_name, self)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "groonga/command/base"
|
18
|
+
|
19
|
+
module Groonga
|
20
|
+
module Command
|
21
|
+
# A command class that represents `query_log_flags_remove` command.
|
22
|
+
#
|
23
|
+
# @since 1.3.3
|
24
|
+
class QueryLogFlagsRemove < Base
|
25
|
+
class << self
|
26
|
+
def command_name
|
27
|
+
"query_log_flags_remove"
|
28
|
+
end
|
29
|
+
|
30
|
+
def parameter_names
|
31
|
+
[
|
32
|
+
:flags
|
33
|
+
]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Command.register(command_name, self)
|
38
|
+
|
39
|
+
# @return [Array<String>] An array of flags specified in `flags`
|
40
|
+
# parameter value. This array is extracted by parsing `flags`
|
41
|
+
# parameter value. If `flags` parameter value is nil or empty,
|
42
|
+
# an empty array is returned.
|
43
|
+
#
|
44
|
+
# @since 1.3.3
|
45
|
+
def flags
|
46
|
+
@flags ||= flags_value(:flags)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "groonga/command/base"
|
18
|
+
|
19
|
+
module Groonga
|
20
|
+
module Command
|
21
|
+
# A command class that represents `query_log_flags_set` command.
|
22
|
+
#
|
23
|
+
# @since 1.3.3
|
24
|
+
class QueryLogFlagsSet < Base
|
25
|
+
class << self
|
26
|
+
def command_name
|
27
|
+
"query_log_flags_set"
|
28
|
+
end
|
29
|
+
|
30
|
+
def parameter_names
|
31
|
+
[
|
32
|
+
:flags
|
33
|
+
]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Command.register(command_name, self)
|
38
|
+
|
39
|
+
# @return [Array<String>] An array of flags specified in `flags`
|
40
|
+
# parameter value. This array is extracted by parsing `flags`
|
41
|
+
# parameter value. If `flags` parameter value is nil or empty,
|
42
|
+
# an empty array is returned.
|
43
|
+
#
|
44
|
+
# @since 1.3.3
|
45
|
+
def flags
|
46
|
+
@flags ||= flags_value(:flags)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
# Copyright (C) 2016 Masafumi Yokoyama <yokoyama@clear-code.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
@@ -49,6 +49,7 @@ module Groonga
|
|
49
49
|
:adjuster,
|
50
50
|
:drilldown_calc_types,
|
51
51
|
:drilldown_calc_target,
|
52
|
+
:drilldown_filter,
|
52
53
|
:sort_keys,
|
53
54
|
:drilldown_sort_keys,
|
54
55
|
]
|
@@ -92,6 +93,13 @@ module Groonga
|
|
92
93
|
@drilldowns ||= array_value(:drilldown)
|
93
94
|
end
|
94
95
|
|
96
|
+
# @return [String, nil] The filter for the drilled down result.
|
97
|
+
#
|
98
|
+
# @since 1.3.3
|
99
|
+
def drilldown_filter
|
100
|
+
self[:drilldown_filter]
|
101
|
+
end
|
102
|
+
|
95
103
|
# @return [::Array<String>] The sort keys for drilldowns.
|
96
104
|
#
|
97
105
|
# @since 1.2.8
|
@@ -156,6 +164,7 @@ module Groonga
|
|
156
164
|
limit = parse_integer_value(raw_drilldown["limit"])
|
157
165
|
calc_types = parse_array_value(raw_drilldown["calc_types"])
|
158
166
|
calc_target = raw_drilldown["calc_target"]
|
167
|
+
filter = raw_drilldown["filter"]
|
159
168
|
drilldown = Drilldown.new(keys,
|
160
169
|
sort_keys,
|
161
170
|
output_columns,
|
@@ -163,6 +172,7 @@ module Groonga
|
|
163
172
|
limit,
|
164
173
|
calc_types,
|
165
174
|
calc_target,
|
175
|
+
filter,
|
166
176
|
label)
|
167
177
|
labeled_drilldowns[label] = drilldown
|
168
178
|
end
|
@@ -216,6 +226,7 @@ module Groonga
|
|
216
226
|
:limit,
|
217
227
|
:calc_types,
|
218
228
|
:calc_target,
|
229
|
+
:filter,
|
219
230
|
:label)
|
220
231
|
end
|
221
232
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -16,6 +16,6 @@
|
|
16
16
|
|
17
17
|
module Groonga
|
18
18
|
module Command
|
19
|
-
VERSION = "1.3.
|
19
|
+
VERSION = "1.3.3"
|
20
20
|
end
|
21
21
|
end
|
data/lib/groonga/command.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
|
4
2
|
#
|
5
3
|
# This library is free software; you can redistribute it and/or
|
6
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -47,6 +45,10 @@ require "groonga/command/object-remove"
|
|
47
45
|
require "groonga/command/plugin-register"
|
48
46
|
require "groonga/command/plugin-unregister"
|
49
47
|
require "groonga/command/query-expand"
|
48
|
+
require "groonga/command/query-log-flags-add"
|
49
|
+
require "groonga/command/query-log-flags-get"
|
50
|
+
require "groonga/command/query-log-flags-remove"
|
51
|
+
require "groonga/command/query-log-flags-set"
|
50
52
|
require "groonga/command/range-filter"
|
51
53
|
require "groonga/command/register"
|
52
54
|
require "groonga/command/reindex"
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class QueryLogFlagsAddCommandTest < Test::Unit::TestCase
|
18
|
+
private
|
19
|
+
def query_log_flags_add_command(pair_arguments={}, ordered_arguments=[])
|
20
|
+
Groonga::Command::QueryLogFlagsAdd.new(pair_arguments,
|
21
|
+
ordered_arguments)
|
22
|
+
end
|
23
|
+
|
24
|
+
class ConstructorTest < self
|
25
|
+
def test_ordered_arguments
|
26
|
+
flags = "COMMAND|RESULT_CODE"
|
27
|
+
|
28
|
+
command = query_log_flags_add_command({},
|
29
|
+
[
|
30
|
+
flags,
|
31
|
+
])
|
32
|
+
assert_equal({
|
33
|
+
:flags => flags,
|
34
|
+
},
|
35
|
+
command.arguments)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class FlagsTest < self
|
40
|
+
def test_reader
|
41
|
+
command = query_log_flags_add_command(:flags => "COMMAND|RESULT_CODE")
|
42
|
+
assert_equal(["COMMAND", "RESULT_CODE"], command.flags)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class QueryLogFlagsGetCommandTest < Test::Unit::TestCase
|
18
|
+
private
|
19
|
+
def query_log_flags_get_command(pair_arguments={}, ordered_arguments=[])
|
20
|
+
Groonga::Command::QueryLogFlagsGet.new(pair_arguments,
|
21
|
+
ordered_arguments)
|
22
|
+
end
|
23
|
+
|
24
|
+
class ConstructorTest < self
|
25
|
+
def test_ordered_arguments
|
26
|
+
command = query_log_flags_get_command({}, [])
|
27
|
+
assert_equal({},
|
28
|
+
command.arguments)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class QueryLogFlagsRemoveCommandTest < Test::Unit::TestCase
|
18
|
+
private
|
19
|
+
def query_log_flags_remove_command(pair_arguments={}, ordered_arguments=[])
|
20
|
+
Groonga::Command::QueryLogFlagsRemove.new(pair_arguments,
|
21
|
+
ordered_arguments)
|
22
|
+
end
|
23
|
+
|
24
|
+
class ConstructorTest < self
|
25
|
+
def test_ordered_arguments
|
26
|
+
flags = "COMMAND|RESULT_CODE"
|
27
|
+
|
28
|
+
command = query_log_flags_remove_command({},
|
29
|
+
[
|
30
|
+
flags,
|
31
|
+
])
|
32
|
+
assert_equal({
|
33
|
+
:flags => flags,
|
34
|
+
},
|
35
|
+
command.arguments)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class FlagsTest < self
|
40
|
+
def test_reader
|
41
|
+
command = query_log_flags_remove_command(:flags => "COMMAND|RESULT_CODE")
|
42
|
+
assert_equal(["COMMAND", "RESULT_CODE"], command.flags)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class QueryLogFlagsSetCommandTest < Test::Unit::TestCase
|
18
|
+
private
|
19
|
+
def query_log_flags_set_command(pair_arguments={}, ordered_arguments=[])
|
20
|
+
Groonga::Command::QueryLogFlagsSet.new(pair_arguments,
|
21
|
+
ordered_arguments)
|
22
|
+
end
|
23
|
+
|
24
|
+
class ConstructorTest < self
|
25
|
+
def test_ordered_arguments
|
26
|
+
flags = "COMMAND|RESULT_CODE"
|
27
|
+
|
28
|
+
command = query_log_flags_set_command({},
|
29
|
+
[
|
30
|
+
flags,
|
31
|
+
])
|
32
|
+
assert_equal({
|
33
|
+
:flags => flags,
|
34
|
+
},
|
35
|
+
command.arguments)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class FlagsTest < self
|
40
|
+
def test_reader
|
41
|
+
command = query_log_flags_set_command(:flags => "COMMAND|RESULT_CODE")
|
42
|
+
assert_equal(["COMMAND", "RESULT_CODE"], command.flags)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/test/command/test-select.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011-
|
1
|
+
# Copyright (C) 2011-2017 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
# Copyright (C) 2016 Masafumi Yokoyama <yokoyama@clear-code.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
@@ -45,6 +45,7 @@ class SelectCommandTest < Test::Unit::TestCase
|
|
45
45
|
adjuster = "tag * 10"
|
46
46
|
drilldown_calc_types = "MIN, MAX"
|
47
47
|
drilldown_calc_target = "age"
|
48
|
+
drilldown_filter = "_nsubrecs > 1"
|
48
49
|
sort_keys = "-_score"
|
49
50
|
drilldown_sort_keys = "-_nsubrecs"
|
50
51
|
|
@@ -71,6 +72,7 @@ class SelectCommandTest < Test::Unit::TestCase
|
|
71
72
|
adjuster,
|
72
73
|
drilldown_calc_types,
|
73
74
|
drilldown_calc_target,
|
75
|
+
drilldown_filter,
|
74
76
|
sort_keys,
|
75
77
|
drilldown_sort_keys,
|
76
78
|
]
|
@@ -99,6 +101,7 @@ class SelectCommandTest < Test::Unit::TestCase
|
|
99
101
|
:adjuster => adjuster,
|
100
102
|
:drilldown_calc_types => drilldown_calc_types,
|
101
103
|
:drilldown_calc_target => drilldown_calc_target,
|
104
|
+
:drilldown_filter => drilldown_filter,
|
102
105
|
:sort_keys => sort_keys,
|
103
106
|
:drilldown_sort_keys => drilldown_sort_keys,
|
104
107
|
},
|
@@ -155,6 +158,14 @@ class SelectCommandTest < Test::Unit::TestCase
|
|
155
158
|
end
|
156
159
|
end
|
157
160
|
|
161
|
+
class DrilldownFilterTest < self
|
162
|
+
def test_reader
|
163
|
+
command = select_command(:drilldown_filter => "_nsubrecs > 1")
|
164
|
+
assert_equal("_nsubrecs > 1",
|
165
|
+
command.drilldown_filter)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
158
169
|
class DrilldownSortKeysTest < self
|
159
170
|
def test_reader
|
160
171
|
command = select_command(:drilldown_sort_keys => "-_nsubrecs,_key")
|
@@ -179,6 +190,7 @@ class SelectCommandTest < Test::Unit::TestCase
|
|
179
190
|
"drilldowns[tag].limit" => "10",
|
180
191
|
"drilldowns[tag].calc_types" => "MIN,MAX",
|
181
192
|
"drilldowns[tag].calc_target" => "_nsubrecs",
|
193
|
+
"drilldowns[tag].filter" => "_nsubrecs > 1",
|
182
194
|
|
183
195
|
"drilldowns[author_tag].keys" => "author,tag",
|
184
196
|
"drilldowns[author_tag].sort_keys" => "_value.author",
|
@@ -205,7 +217,8 @@ class SelectCommandTest < Test::Unit::TestCase
|
|
205
217
|
:offset => 1,
|
206
218
|
:limit => 10,
|
207
219
|
:calc_types => ["MIN", "MAX"],
|
208
|
-
:calc_target => "_nsubrecs"
|
220
|
+
:calc_target => "_nsubrecs",
|
221
|
+
:filter => "_nsubrecs > 1"),
|
209
222
|
}
|
210
223
|
assert_equal(drilldowns,
|
211
224
|
command.labeled_drilldowns)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groonga-command
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -168,6 +168,10 @@ files:
|
|
168
168
|
- lib/groonga/command/plugin-register.rb
|
169
169
|
- lib/groonga/command/plugin-unregister.rb
|
170
170
|
- lib/groonga/command/query-expand.rb
|
171
|
+
- lib/groonga/command/query-log-flags-add.rb
|
172
|
+
- lib/groonga/command/query-log-flags-get.rb
|
173
|
+
- lib/groonga/command/query-log-flags-remove.rb
|
174
|
+
- lib/groonga/command/query-log-flags-set.rb
|
171
175
|
- lib/groonga/command/range-filter.rb
|
172
176
|
- lib/groonga/command/register.rb
|
173
177
|
- lib/groonga/command/reindex.rb
|
@@ -218,6 +222,10 @@ files:
|
|
218
222
|
- test/command/test-plugin-register.rb
|
219
223
|
- test/command/test-plugin-unregister.rb
|
220
224
|
- test/command/test-query-expand.rb
|
225
|
+
- test/command/test-query-log-flags-add.rb
|
226
|
+
- test/command/test-query-log-flags-get.rb
|
227
|
+
- test/command/test-query-log-flags-remove.rb
|
228
|
+
- test/command/test-query-log-flags-set.rb
|
221
229
|
- test/command/test-range-filter.rb
|
222
230
|
- test/command/test-register.rb
|
223
231
|
- test/command/test-reindex.rb
|
@@ -267,6 +275,7 @@ summary: Groonga-command is a library that represents [Groonga](http://groonga.o
|
|
267
275
|
command. You can write a program that handle Groonga's command by using groonga-command.
|
268
276
|
test_files:
|
269
277
|
- test/groonga-command-test-utils.rb
|
278
|
+
- test/command/test-query-log-flags-set.rb
|
270
279
|
- test/command/test-config-delete.rb
|
271
280
|
- test/command/test-object-remove.rb
|
272
281
|
- test/command/test-table-tokenize.rb
|
@@ -274,12 +283,14 @@ test_files:
|
|
274
283
|
- test/command/test-plugin-unregister.rb
|
275
284
|
- test/command/test-io-flush.rb
|
276
285
|
- test/command/test-base.rb
|
286
|
+
- test/command/test-query-log-flags-add.rb
|
277
287
|
- test/command/test-logical-count.rb
|
278
288
|
- test/command/test-table-rename.rb
|
279
289
|
- test/command/test-column-rename.rb
|
280
290
|
- test/command/test-dump.rb
|
281
291
|
- test/command/test-normalize.rb
|
282
292
|
- test/command/test-config-get.rb
|
293
|
+
- test/command/test-query-log-flags-remove.rb
|
283
294
|
- test/command/test-register.rb
|
284
295
|
- test/command/test-shutdown.rb
|
285
296
|
- test/command/test-delete.rb
|
@@ -291,6 +302,7 @@ test_files:
|
|
291
302
|
- test/command/test-plugin-register.rb
|
292
303
|
- test/command/test-request-cancel.rb
|
293
304
|
- test/command/test-column-create.rb
|
305
|
+
- test/command/test-query-log-flags-get.rb
|
294
306
|
- test/command/test-config-set.rb
|
295
307
|
- test/command/test-logical-range-filter.rb
|
296
308
|
- test/command/test-object-inspect.rb
|