Class: AmazonAthena::Commands::DropDatabase
- Inherits:
-
AmazonAthena::Command
- Object
- AmazonAthena::Command
- AmazonAthena::Commands::DropDatabase
- Defined in:
- lib/amazon_athena/commands/drop_database.rb
Instance Method Summary collapse
-
#initialize(database_name) ⇒ DropDatabase
constructor
A new instance of DropDatabase.
- #run(connection) ⇒ Object
- #statement ⇒ Object
Methods inherited from AmazonAthena::Command
Constructor Details
#initialize(database_name) ⇒ DropDatabase
Returns a new instance of DropDatabase.
7 8 9 |
# File 'lib/amazon_athena/commands/drop_database.rb', line 7 def initialize(database_name) @database_name = database_name end |
Instance Method Details
#run(connection) ⇒ Object
15 16 17 18 19 |
# File 'lib/amazon_athena/commands/drop_database.rb', line 15 def run(connection) connection.query(statement) return end |
#statement ⇒ Object
11 12 13 |
# File 'lib/amazon_athena/commands/drop_database.rb', line 11 def statement "DROP DATABASE IF EXISTS #{@database_name};" end |