Class: Droonga::GroongaAdapter

Inherits:
AdapterPlugin show all
Defined in:
lib/droonga/plugin/adapter/groonga.rb,
lib/droonga/plugin/adapter/groonga/select.rb

Defined Under Namespace

Classes: Select

Instance Method Summary collapse

Methods inherited from AdapterPlugin

#add_route, #emit, #initialize, #post, #process

Methods included from PluginRegisterable

#command, extended, #inherited, #method_name, #processable?, #repository

Methods inherited from Plugin

#initialize, #process, #processable?, #shutdown, #start

Constructor Details

This class inherits a constructor from Droonga::AdapterPlugin

Instance Method Details

#select(input_message) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/droonga/plugin/adapter/groonga.rb', line 23

def select(input_message)
  command = Select.new
  select_request = input_message.body
  search_request = command.convert_request(select_request)
  input_message.add_route("select_response")
  input_message.command = "search"
  input_message.body = search_request
end

#select_response(search_response) ⇒ Object



33
34
35
36
# File 'lib/droonga/plugin/adapter/groonga.rb', line 33

def select_response(search_response)
  command = Select.new
  emit(command.convert_response(search_response))
end