Class: Groonga::Command::Select

Inherits:
Base
  • Object
show all
Includes:
Drilldownable, Searchable, Sliceable
Defined in:
lib/groonga/command/select.rb

Instance Attribute Summary

Attributes inherited from Base

#arguments, #command_name, #original_format, #original_source, #path_prefix

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Sliceable

#slices

Methods included from Searchable

#conditions

Methods included from Drilldownable

#drilldown, #drilldown_calc_target, #drilldown_calc_types, #drilldown_filter, #drilldown_limit, #drilldown_offset, #drilldown_output_columns, #drilldown_sort_keys, #drilldown_sortby, #drilldowns, #labeled_drilldowns

Methods inherited from Base

#==, #[], #[]=, #command_format?, #initialize, #key?, #name, #output_type, #request_id, #to_command_format, #to_elasticsearch_format, #to_s, #to_uri_format, #uri_format?

Constructor Details

This class inherits a constructor from Groonga::Command::Base

Class Method Details

.command_nameObject



31
32
33
# File 'lib/groonga/command/select.rb', line 31

def command_name
  "select"
end

.parameter_namesObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/groonga/command/select.rb', line 35

def parameter_names
  [
    :table,
    :match_columns,
    :query,
    :filter,
    :scorer,
    :sortby,
    :output_columns,
    :offset,
    :limit,
    :drilldown,
    :drilldown_sortby,
    :drilldown_output_columns,
    :drilldown_offset,
    :drilldown_limit,
    :cache,
    :match_escalation_threshold,
    :query_expansion,
    :query_flags,
    :query_expander,
    :adjuster,
    :drilldown_calc_types,
    :drilldown_calc_target,
    :drilldown_filter,
    :sort_keys,
    :drilldown_sort_keys,
  ]
end

Instance Method Details

#filterObject



91
92
93
# File 'lib/groonga/command/select.rb', line 91

def filter
  self[:filter]
end

#output_columnsObject

TODO: We should return ::Array instead of raw output_columns value. But it breaks backward compatibility...



98
99
100
# File 'lib/groonga/command/select.rb', line 98

def output_columns
  self[:output_columns]
end

#queryObject



87
88
89
# File 'lib/groonga/command/select.rb', line 87

def query
  self[:query]
end

#scorerObject



83
84
85
# File 'lib/groonga/command/select.rb', line 83

def scorer
  self[:scorer]
end

#sort_keys::Array<String>

Returns The sort keys.

Returns:

  • (::Array<String>)

    The sort keys.

Since:

  • 1.2.8



79
80
81
# File 'lib/groonga/command/select.rb', line 79

def sort_keys
  parse_array_value(self[:sort_keys] || self[:sortby] || "")
end

#sortbyString

Deprecated.

since 1.2.8. Use #sort_keys instead.

Returns The sort keys as String. Each key is separated by "," or spaces.

Returns:

  • (String)

    The sort keys as String. Each key is separated by "," or spaces.



72
73
74
# File 'lib/groonga/command/select.rb', line 72

def sortby
  self[:sortby]
end