groonga-command 1.1.2 → 1.1.3

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
  SHA1:
3
- metadata.gz: 61a882fcb3e5a11740b06ae6ddf5ec20aaa3e564
4
- data.tar.gz: 9e5633bd86458d4125102ac33010555e6d908c03
3
+ metadata.gz: 8530ea72a1ac2b1b9d62edc6ee1e16b486e171e9
4
+ data.tar.gz: 9f15002f42061ffda0f7c6b679c907aa3ca2b4f0
5
5
  SHA512:
6
- metadata.gz: fe007aa092b4ae4661f21587681010ef40c3d5472006801bffa304fd3846d68217e2b5c33748b99ebc56146cd0ff621e31c0b31ebcc63d31f727721d87c837a4
7
- data.tar.gz: 86e9882f03a9e01393728ff76071e7f8efffa0f11a7f89be83eeeadd48474422025ca53dd632ce0a0315c81b37dc6107a1ea5d51fa62c1fce3e19edb6db10332
6
+ metadata.gz: 72574aab5aa5e64b2b2a82adc1654cd255c2b625ebfbbe557c161a87a8e95271443e1944ffcf2ff3b26f4359956345fe1a88d6826fe108757c2fecbacadea4ff
7
+ data.tar.gz: 59386ac9eef8f60d5608132d25514a9a84f77f36be572410aa0eefd37ecc85d4e08a9aa18dbfb660c30a80b886583f0eb472a75f163dc6a7176bef05652aad39
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # README
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/groonga-command.svg)](http://badge.fury.io/rb/groonga-command)
4
+ [![Build Status](https://travis-ci.org/groonga/groonga-command.svg?branch=master)](https://travis-ci.org/groonga/groonga-command)
5
+
3
6
  ## Name
4
7
 
5
8
  groonga-command
data/doc/text/news.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # News
2
2
 
3
+ ## 1.1.3: 2015-08-19
4
+
5
+ ### Improvements
6
+
7
+ * {Groonga::Command::ColumnCopy}: Added.
8
+ * {Groonga::Command::IOFlush}: Added.
9
+ * {Groonga::Command::LogLevel}: Added.
10
+ * {Groonga::Command::LogPut}: Added.
11
+ * {Groonga::Command::LogicalSelect}: Added.
12
+ * {Groonga::Command::LogicalShardList}: Added.
13
+ * {Groonga::Command::LogicalTableRemove}: Added.
14
+ * {Groonga::Command::ObjectExist}: Added.
15
+ * {Groonga::Command::TableList}: Added.
16
+ * {Groonga::Command::ThreadLimit}: Added.
17
+
3
18
  ## 1.1.2: 2015-04-02
4
19
 
5
20
  ### Improvements
@@ -20,6 +20,7 @@ require "groonga/command/version"
20
20
 
21
21
  require "groonga/command/error"
22
22
 
23
+ require "groonga/command/column-copy"
23
24
  require "groonga/command/column-create"
24
25
  require "groonga/command/column-list"
25
26
  require "groonga/command/column-remove"
@@ -27,10 +28,17 @@ require "groonga/command/column-rename"
27
28
  require "groonga/command/delete"
28
29
  require "groonga/command/dump"
29
30
  require "groonga/command/get"
31
+ require "groonga/command/io-flush"
30
32
  require "groonga/command/load"
31
33
  require "groonga/command/logical-count"
32
34
  require "groonga/command/logical-range-filter"
35
+ require "groonga/command/logical-select"
36
+ require "groonga/command/logical-shard-list"
37
+ require "groonga/command/logical-table-remove"
38
+ require "groonga/command/log-level"
39
+ require "groonga/command/log-put"
33
40
  require "groonga/command/normalize"
41
+ require "groonga/command/object-exist"
34
42
  require "groonga/command/plugin-register"
35
43
  require "groonga/command/plugin-unregister"
36
44
  require "groonga/command/range-filter"
@@ -42,8 +50,10 @@ require "groonga/command/select"
42
50
  require "groonga/command/status"
43
51
  require "groonga/command/suggest"
44
52
  require "groonga/command/table-create"
53
+ require "groonga/command/table-list"
45
54
  require "groonga/command/table-remove"
46
55
  require "groonga/command/table-rename"
47
56
  require "groonga/command/table-tokenize"
57
+ require "groonga/command/thread-limit"
48
58
  require "groonga/command/tokenize"
49
59
  require "groonga/command/truncate"
@@ -118,6 +118,21 @@ module Groonga
118
118
  value.nil?
119
119
  end
120
120
  end
121
+
122
+ def integer_value(name)
123
+ value = self[name]
124
+ return value if value.nil?
125
+
126
+ begin
127
+ Integer(value)
128
+ rescue ArgumentError
129
+ value
130
+ end
131
+ end
132
+
133
+ def array_value(name)
134
+ (self[name] || "").strip.split(/\s*,\s*/)
135
+ end
121
136
  end
122
137
  end
123
138
  end
@@ -0,0 +1,67 @@
1
+ # Copyright (C) 2015 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 `column_copy` command.
22
+ #
23
+ # @since 1.1.3
24
+ class ColumnCopy < Base
25
+ Command.register("column_copy", self)
26
+
27
+ class << self
28
+ def parameter_names
29
+ [
30
+ :from_table,
31
+ :from_name,
32
+ :to_table,
33
+ :to_name,
34
+ ]
35
+ end
36
+ end
37
+
38
+ # @return [String] `from_table` parameter value.
39
+ #
40
+ # @since 1.1.3
41
+ def from_table
42
+ self[:from_table]
43
+ end
44
+
45
+ # @return [String] `from_name` parameter value.
46
+ #
47
+ # @since 1.1.3
48
+ def from_name
49
+ self[:from_name]
50
+ end
51
+
52
+ # @return [String] `to_table` parameter value.
53
+ #
54
+ # @since 1.1.3
55
+ def to_table
56
+ self[:to_table]
57
+ end
58
+
59
+ # @return [String] `to_name` parameter value.
60
+ #
61
+ # @since 1.1.3
62
+ def to_name
63
+ self[:to_name]
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,51 @@
1
+ # Copyright (C) 2015 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 `io_flush` command.
22
+ #
23
+ # @since 1.1.3
24
+ class IOFlush < Base
25
+ Command.register("io_flush", self)
26
+
27
+ class << self
28
+ def parameter_names
29
+ [
30
+ :target_name,
31
+ :recursive,
32
+ ]
33
+ end
34
+ end
35
+
36
+ # @return [String] `target_name` parameter value.
37
+ #
38
+ # @since 1.1.3
39
+ def target_name
40
+ self[:target_name]
41
+ end
42
+
43
+ # @return [Boolean] `recursive` parameter value.
44
+ #
45
+ # @since 1.1.3
46
+ def recursive?
47
+ self[:recursive] != "no"
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,43 @@
1
+ # Copyright (C) 2015 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 `log_level` command.
22
+ #
23
+ # @since 1.1.3
24
+ class LogLevel < Base
25
+ Command.register("log_level", self)
26
+
27
+ class << self
28
+ def parameter_names
29
+ [
30
+ :level,
31
+ ]
32
+ end
33
+ end
34
+
35
+ # @return [String] `level` parameter value.
36
+ #
37
+ # @since 1.1.3
38
+ def level
39
+ self[:level]
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,51 @@
1
+ # Copyright (C) 2015 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 `log_put` command.
22
+ #
23
+ # @since 1.1.3
24
+ class LogPut < Base
25
+ Command.register("log_put", self)
26
+
27
+ class << self
28
+ def parameter_names
29
+ [
30
+ :level,
31
+ :message,
32
+ ]
33
+ end
34
+ end
35
+
36
+ # @return [String] `level` parameter value.
37
+ #
38
+ # @since 1.1.3
39
+ def level
40
+ self[:level]
41
+ end
42
+
43
+ # @return [String] `message` parameter value.
44
+ #
45
+ # @since 1.1.3
46
+ def message
47
+ self[:message]
48
+ end
49
+ end
50
+ end
51
+ end
@@ -20,7 +20,7 @@ require "groonga/command/base"
20
20
 
21
21
  module Groonga
22
22
  module Command
23
- # A command class that represents `logical_count` command.
23
+ # A command class that represents `logical_range_filter` command.
24
24
  #
25
25
  # @since 1.1.1
26
26
  class LogicalRangeFilter < Base
@@ -0,0 +1,186 @@
1
+ # Copyright (C) 2015 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 `logical_select` command.
22
+ #
23
+ # @since 1.1.3
24
+ class LogicalSelect < Base
25
+ Command.register("logical_select", self)
26
+
27
+ class << self
28
+ def parameter_names
29
+ [
30
+ :logical_table,
31
+ :shard_key,
32
+ :min,
33
+ :min_border,
34
+ :max,
35
+ :max_border,
36
+ :filter,
37
+ :sortby,
38
+ :output_columns,
39
+ :offset,
40
+ :limit,
41
+ :drilldown,
42
+ :drilldown_sortby,
43
+ :drilldown_output_columns,
44
+ :drilldown_offset,
45
+ :drilldown_limit,
46
+ :drilldown_calc_types,
47
+ :drilldown_calc_target,
48
+ ]
49
+ end
50
+ end
51
+
52
+ # @return [String] `logical_table` parameter value.
53
+ #
54
+ # @since 1.1.3
55
+ def logical_table
56
+ self[:logical_table]
57
+ end
58
+
59
+ # @return [String] `shard_key` parameter value.
60
+ #
61
+ # @since 1.1.3
62
+ def shard_key
63
+ self[:shard_key]
64
+ end
65
+
66
+ # @return [String] `min` parameter value.
67
+ #
68
+ # @since 1.1.3
69
+ def min
70
+ self[:min]
71
+ end
72
+
73
+ # @return [String] `min_border` parameter value.
74
+ #
75
+ # @since 1.1.3
76
+ def min_border
77
+ self[:min_border]
78
+ end
79
+
80
+ # @return [String] `max` parameter value.
81
+ #
82
+ # @since 1.1.3
83
+ def max
84
+ self[:max]
85
+ end
86
+
87
+ # @return [String] `max_border` parameter value.
88
+ #
89
+ # @since 1.1.3
90
+ def max_border
91
+ self[:max_border]
92
+ end
93
+
94
+ # @return [String] `filter` parameter value.
95
+ #
96
+ # @since 1.1.3
97
+ def filter
98
+ self[:filter]
99
+ end
100
+
101
+ # @return [String] `sortby` parameter value.
102
+ #
103
+ # @since 1.1.3
104
+ def sortby
105
+ self[:sortby]
106
+ end
107
+
108
+ # @return [String] `output_columns` parameter value.
109
+ #
110
+ # @since 1.1.3
111
+ def output_columns
112
+ self[:output_columns]
113
+ end
114
+
115
+ # @return [Integer] `offset` parameter value.
116
+ #
117
+ # @since 1.1.3
118
+ def offset
119
+ integer_value(:offset)
120
+ end
121
+
122
+ # @return [Integer] `limit` parameter value.
123
+ #
124
+ # @since 1.1.3
125
+ def limit
126
+ integer_value(:limit)
127
+ end
128
+
129
+ # @return [String] `drilldown` parameter value.
130
+ #
131
+ # @since 1.1.3
132
+ def drilldown
133
+ self[:drilldown]
134
+ end
135
+
136
+ # @return [Array<String>] drilldown keys.
137
+ #
138
+ # @since 1.1.3
139
+ def drilldowns
140
+ @drilldowns ||= array_value(:drilldown)
141
+ end
142
+
143
+ # @return [String] `drilldown_sortby` parameter value.
144
+ #
145
+ # @since 1.1.3
146
+ def drilldown_sortby
147
+ self[:drilldown_sortby]
148
+ end
149
+
150
+ # @return [String] `drilldown_output_columns` parameter value.
151
+ #
152
+ # @since 1.1.3
153
+ def drilldown_output_columns
154
+ self[:drilldown_output_columns]
155
+ end
156
+
157
+ # @return [String] `drilldown_offset` parameter value.
158
+ #
159
+ # @since 1.1.3
160
+ def drilldown_offset
161
+ integer_value(:drilldown_offset)
162
+ end
163
+
164
+ # @return [String] `drilldown_limit` parameter value.
165
+ #
166
+ # @since 1.1.3
167
+ def drilldown_limit
168
+ integer_value(:drilldown_limit)
169
+ end
170
+
171
+ # @return [String] `drilldown_calc_types` parameter value.
172
+ #
173
+ # @since 1.1.3
174
+ def drilldown_calc_types
175
+ self[:drilldown_calc_types]
176
+ end
177
+
178
+ # @return [String] `drilldown_calc_target` parameter value.
179
+ #
180
+ # @since 1.1.3
181
+ def drilldown_calc_target
182
+ self[:drilldown_calc_target]
183
+ end
184
+ end
185
+ end
186
+ end