Class: Groonga::Command::Select
- Defined in:
- lib/groonga/command/select.rb
Defined Under Namespace
Instance Attribute Summary
Attributes inherited from Base
#arguments, #command_name, #original_format, #original_source, #path_prefix
Class Method Summary collapse
Instance Method Summary collapse
- #conditions ⇒ Object
-
#drilldown_sort_keys ⇒ ::Array<String>
The sort keys for drilldowns.
- #drilldowns ⇒ Object
- #filter ⇒ Object
-
#labeled_drilldowns ⇒ ::Hash<String, Drilldown>
The labeled drilldowns.
- #output_columns ⇒ Object
- #query ⇒ Object
- #scorer ⇒ Object
-
#slices ⇒ ::Hash<String, Slice>
The slices.
-
#sort_keys ⇒ ::Array<String>
The sort keys.
-
#sortby ⇒ String
deprecated
Deprecated.
since 1.2.8. Use #sort_keys instead.
Methods inherited from Base
#==, #[], #[]=, #command_format?, #initialize, #key?, #name, #output_type, #request_id, #to_command_format, #to_uri_format, #uri_format?
Constructor Details
This class inherits a constructor from Groonga::Command::Base
Class Method Details
.command_name ⇒ Object
24 25 26 |
# File 'lib/groonga/command/select.rb', line 24 def command_name "select" end |
.parameter_names ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/groonga/command/select.rb', line 28 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, :sort_keys, :drilldown_sort_keys, ] end |
Instance Method Details
#conditions ⇒ Object
87 88 89 |
# File 'lib/groonga/command/select.rb', line 87 def conditions @conditions ||= split_filter_conditions end |
#drilldown_sort_keys ⇒ ::Array<String>
Returns The sort keys for drilldowns.
98 99 100 101 |
# File 'lib/groonga/command/select.rb', line 98 def drilldown_sort_keys value = self[:drilldown_sort_keys] || self[:drilldown_sortby] || "" parse_array_value(value) end |
#drilldowns ⇒ Object
91 92 93 |
# File 'lib/groonga/command/select.rb', line 91 def drilldowns @drilldowns ||= array_value(:drilldown) end |
#filter ⇒ Object
83 84 85 |
# File 'lib/groonga/command/select.rb', line 83 def filter self[:filter] end |
#labeled_drilldowns ⇒ ::Hash<String, Drilldown>
Returns The labeled drilldowns.
106 107 108 |
# File 'lib/groonga/command/select.rb', line 106 def labeled_drilldowns @labeled_drilldowns ||= parse_labeled_drilldowns end |
#output_columns ⇒ Object
117 118 119 |
# File 'lib/groonga/command/select.rb', line 117 def output_columns self[:output_columns] end |
#query ⇒ Object
79 80 81 |
# File 'lib/groonga/command/select.rb', line 79 def query self[:query] end |
#scorer ⇒ Object
75 76 77 |
# File 'lib/groonga/command/select.rb', line 75 def scorer self[:scorer] end |
#slices ⇒ ::Hash<String, Slice>
Returns The slices.
113 114 115 |
# File 'lib/groonga/command/select.rb', line 113 def slices @slices ||= parse_slices end |
#sort_keys ⇒ ::Array<String>
Returns The sort keys.
71 72 73 |
# File 'lib/groonga/command/select.rb', line 71 def sort_keys parse_array_value(self[:sort_keys] || self[:sortby] || "") end |
#sortby ⇒ String
Deprecated.
since 1.2.8. Use #sort_keys instead.
Returns The sort keys as String. Each key is separated by "," or spaces.
64 65 66 |
# File 'lib/groonga/command/select.rb', line 64 def sortby self[:sortby] end |