Class: Groonga::QueryLog::SelectCommand
- Inherits:
-
Command
- Object
- Command
- Groonga::QueryLog::SelectCommand
show all
- Defined in:
- lib/groonga/query-log.rb
Instance Attribute Summary
Attributes inherited from Command
#name, #original_format, #parameters
Instance Method Summary
collapse
Methods inherited from Command
#==, #command_format?, #initialize, parse, register, #to_command_format, #to_uri_format, #uri_format?
Instance Method Details
#conditions ⇒ Object
152
153
154
155
156
157
158
159
|
# File 'lib/groonga/query-log.rb', line 152
def conditions
@conditions ||= filter.split(/(?:&&|&!|\|\|)/).collect do |condition|
condition = condition.strip
condition = condition.gsub(/\A[\s\(]*/, '')
condition = condition.gsub(/[\s\)]*\z/, '') unless /\(/ =~ condition
condition
end
end
|
#drilldowns ⇒ Object
161
162
163
|
# File 'lib/groonga/query-log.rb', line 161
def drilldowns
@drilldowns ||= (@parameters["drilldown"] || "").split(/\s*,\s*/)
end
|
148
149
150
|
# File 'lib/groonga/query-log.rb', line 148
def filter
@parameters["filter"]
end
|
#output_columns ⇒ Object
165
166
167
|
# File 'lib/groonga/query-log.rb', line 165
def output_columns
@parameters["output_columns"]
end
|
144
145
146
|
# File 'lib/groonga/query-log.rb', line 144
def query
@parameters["query"]
end
|
140
141
142
|
# File 'lib/groonga/query-log.rb', line 140
def scorer
@parameters["scorer"]
end
|
136
137
138
|
# File 'lib/groonga/query-log.rb', line 136
def sortby
@parameters["sortby"]
end
|