Method: CloudDB::Database#destroy!

Defined in:
lib/clouddb/database.rb

#destroy!Object

Deletes the current Database object and removes it from the instance. Returns true if successful, raises an exception if not.



20
21
22
23
24
# File 'lib/clouddb/database.rb', line 20

def destroy!
  response = @connection.dbreq("DELETE",@dbmgmthost,"#{@dbmgmtpath}/instances/#{CloudDB.escape(@instance.id.to_s)}/databases/#{CloudDB.escape(@name.to_s)}",@dbmgmtport,@dbmgmtscheme)
  CloudDB::Exception.raise_exception(response) unless response.code.to_s.match(/^20.$/)
  true
end