Class: AmazonAthena::Commands::ShowDatabases

Inherits:
AmazonAthena::Command show all
Defined in:
lib/amazon_athena/commands/show_databases.rb

Instance Method Summary collapse

Methods inherited from AmazonAthena::Command

#preview

Instance Method Details

#run(connection) ⇒ Object



11
12
13
# File 'lib/amazon_athena/commands/show_databases.rb', line 11

def run(connection)
  connection.query(statement).map {|row| row.database_name }
end

#statementObject



7
8
9
# File 'lib/amazon_athena/commands/show_databases.rb', line 7

def statement
  "SHOW DATABASES;"
end