diff --git a/lib/groonga/client/request/select.rb b/lib/groonga/client/request/select.rb index 47a69c7..683dcd8 100644 --- a/lib/groonga/client/request/select.rb +++ b/lib/groonga/client/request/select.rb @@ -61,15 +61,21 @@ def query(value) # The new request with the given condition. # # @overload filter(column_name, value) + # Adds a `#{column_name} == #{value}` condition. + # # @param column_name [String, Symbol] The target column name. - # @param value [Object] The column value. It's escaped automatically. # - # Adds a `#{column_name} == #{value}` condition. + # @param value [Object] The column value. It's escaped + # automatically. # # @overload filter(expression, values=nil) + # + # Adds a `#{expression % values}` condition. + # # @param expression [String] The script syntax expression. # It can includes `%{name}`s as placeholder. They are expanded # by `String#%` with the given `values` argument. + # # @param values [nil, ::Hash] The values to be expanded. # If the given `expression` doesn't have placeholder, you # should specify `nil`. @@ -77,18 +83,16 @@ def query(value) # Values are escaped automatically. Values passed from # external should be escaped. # - # Adds a `#{expression % values}` condition. - # # @overload filter # + # Returns a request object for filter condition. It provides + # convenient methods to add a popular filter condition. + # # @example: Use in_values function # request. # filter.in_values("tags", "tag1", "tag2") # # -> --filter 'in_values(tags, "tag1", "tag2")' # - # Returns a request object for filter condition. It provides - # convenient methods to add a popular filter condition. - # # @return [Groonga::Client::Request::Select::Filter] # The new request object for setting a filter condition. #