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_filter ⇒ String?
The filter for the drilled down result.
-
#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
TODO: We should return
::Arrayinstead of rawoutput_columnsvalue. - #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 56 |
# 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, :drilldown_filter, :sort_keys, :drilldown_sort_keys, ] end |
Instance Method Details
#conditions ⇒ Object
88 89 90 |
# File 'lib/groonga/command/select.rb', line 88 def conditions @conditions ||= split_filter_conditions end |
#drilldown_filter ⇒ String?
Returns The filter for the drilled down result.
99 100 101 |
# File 'lib/groonga/command/select.rb', line 99 def drilldown_filter self[:drilldown_filter] end |
#drilldown_sort_keys ⇒ ::Array<String>
Returns The sort keys for drilldowns.
106 107 108 109 |
# File 'lib/groonga/command/select.rb', line 106 def drilldown_sort_keys value = self[:drilldown_sort_keys] || self[:drilldown_sortby] || "" parse_array_value(value) end |
#drilldowns ⇒ Object
92 93 94 |
# File 'lib/groonga/command/select.rb', line 92 def drilldowns @drilldowns ||= array_value(:drilldown) end |
#filter ⇒ Object
84 85 86 |
# File 'lib/groonga/command/select.rb', line 84 def filter self[:filter] end |
#labeled_drilldowns ⇒ ::Hash<String, Drilldown>
Returns The labeled drilldowns.
114 115 116 |
# File 'lib/groonga/command/select.rb', line 114 def labeled_drilldowns @labeled_drilldowns ||= parse_labeled_drilldowns end |
#output_columns ⇒ Object
TODO: We should return ::Array instead of raw
output_columns value. But it breaks backward
compatibility...
128 129 130 |
# File 'lib/groonga/command/select.rb', line 128 def output_columns self[:output_columns] end |
#query ⇒ Object
80 81 82 |
# File 'lib/groonga/command/select.rb', line 80 def query self[:query] end |
#scorer ⇒ Object
76 77 78 |
# File 'lib/groonga/command/select.rb', line 76 def scorer self[:scorer] end |
#slices ⇒ ::Hash<String, Slice>
Returns The slices.
121 122 123 |
# File 'lib/groonga/command/select.rb', line 121 def slices @slices ||= parse_slices end |
#sort_keys ⇒ ::Array<String>
Returns The sort keys.
72 73 74 |
# File 'lib/groonga/command/select.rb', line 72 def sort_keys parse_array_value(self[:sort_keys] || self[:sortby] || "") end |
#sortby ⇒ String
since 1.2.8. Use #sort_keys instead.
Returns The sort keys as String. Each key is separated by "," or spaces.
65 66 67 |
# File 'lib/groonga/command/select.rb', line 65 def sortby self[:sortby] end |