class AmazonAthena::Commands::ShowColumns

Public Class Methods

new(database_table) click to toggle source
# File lib/amazon_athena/commands/show_columns.rb, line 7
def initialize(database_table)
  @database_table = database_table
end

Public Instance Methods

run(connection) click to toggle source
# File lib/amazon_athena/commands/show_columns.rb, line 15
def run(connection)
  connection.query(statement).map {|row| row.field.strip }
end
statement() click to toggle source
# File lib/amazon_athena/commands/show_columns.rb, line 11
def statement
  "SHOW COLUMNS IN #{@database_table};"
end