Class: Droonga::GroongaHandler::TableRemove
- Defined in:
- lib/droonga/plugin/handler/groonga/table_remove.rb
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from Droonga::GroongaHandler::Command
Instance Method Details
#process_request(request) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/droonga/plugin/handler/groonga/table_remove.rb', line 24 def process_request(request) command_class = Groonga::Command.find("table_remove") @command = command_class.new("table_remove", request) name = @command["name"] if name.nil? || @context[name].nil? raise CommandError.new(:status => Status::INVALID_ARGUMENT, :message => "table not found", :result => false) end Groonga::Schema.define(:context => @context) do |schema| schema.remove_table(name) end true end |