Class: AmazonAthena::Commands::ShowCreateTable

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

Instance Method Summary collapse

Methods inherited from AmazonAthena::Command

#preview

Constructor Details

#initialize(database_table) ⇒ ShowCreateTable

Returns a new instance of ShowCreateTable.



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

def initialize(database_table)
  @database_table = database_table
end

Instance Method Details

#run(connection) ⇒ Object



15
16
17
# File 'lib/amazon_athena/commands/show_create_table.rb', line 15

def run(connection)
  connection.query(statement).raw_output
end

#statementObject



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

def statement
  "SHOW CREATE TABLE #{@database_table};"
end