Class: Hivonic::Commands::DropTable
- Inherits:
-
HiveQueryCommand
- Object
- Subcommand
- HiveQueryCommand
- Hivonic::Commands::DropTable
- Defined in:
- lib/hivonic/commands.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Attributes inherited from HiveQueryCommand
Attributes inherited from Subcommand
#dry_run, #exitstatus, #regexp, #subcommand, #time_format, #time_group_index, #ttl
Instance Method Summary collapse
-
#initialize(opts, args) ⇒ DropTable
constructor
A new instance of DropTable.
- #query ⇒ Object
Methods inherited from HiveQueryCommand
Methods inherited from Subcommand
#is_successful?, #output, run, #run, #successful?
Constructor Details
#initialize(opts, args) ⇒ DropTable
Returns a new instance of DropTable.
153 154 155 156 |
# File 'lib/hivonic/commands.rb', line 153 def initialize(opts, args) super @table = args[1] end |
Instance Attribute Details
#table ⇒ Object (readonly)
Returns the value of attribute table.
151 152 153 |
# File 'lib/hivonic/commands.rb', line 151 def table @table end |
Instance Method Details
#query ⇒ Object
158 159 160 |
# File 'lib/hivonic/commands.rb', line 158 def query @query = "DROP TABLE IF EXISTS #{self.db}.#{self.table};" end |