Class: Groonga::Command::Select

Inherits:
Base
  • Object
show all
Defined in:
lib/groonga/command/select.rb

Instance Attribute Summary

Attributes inherited from Base

#arguments, #name, #original_format, #original_source

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #[], #[]=, #command_format?, #has_key?, #initialize, #to_command_format, #to_uri_format, #uri_format?

Constructor Details

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

Class Method Details

.parameter_namesObject



27
28
29
30
31
32
# File 'lib/groonga/command/select.rb', line 27

def parameter_names
  # TODO: Fill me
  [
    :table
  ]
end

Instance Method Details

#conditionsObject



51
52
53
54
55
56
57
58
# File 'lib/groonga/command/select.rb', line 51

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

#drilldownsObject



60
61
62
# File 'lib/groonga/command/select.rb', line 60

def drilldowns
  @drilldowns ||= (self[:drilldown] || "").split(/\s*,\s*/)
end

#filterObject



47
48
49
# File 'lib/groonga/command/select.rb', line 47

def filter
  self[:filter]
end

#output_columnsObject



64
65
66
# File 'lib/groonga/command/select.rb', line 64

def output_columns
  self[:output_columns]
end

#queryObject



43
44
45
# File 'lib/groonga/command/select.rb', line 43

def query
  self[:query]
end

#scorerObject



39
40
41
# File 'lib/groonga/command/select.rb', line 39

def scorer
  self[:scorer]
end

#sortbyObject



35
36
37
# File 'lib/groonga/command/select.rb', line 35

def sortby
  self[:sortby]
end