Class: Hivonic::Commands::DropView
- Inherits:
-
HiveQueryCommand
- Object
- Subcommand
- HiveQueryCommand
- Hivonic::Commands::DropView
- Defined in:
- lib/hivonic/commands.rb
Instance Attribute Summary collapse
-
#view ⇒ Object
readonly
Returns the value of attribute view.
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) ⇒ DropView
constructor
A new instance of DropView.
- #query ⇒ Object
Methods inherited from HiveQueryCommand
Methods inherited from Subcommand
#is_successful?, #output, run, #run, #successful?
Constructor Details
#initialize(opts, args) ⇒ DropView
Returns a new instance of DropView.
166 167 168 169 |
# File 'lib/hivonic/commands.rb', line 166 def initialize(opts, args) super @view = args[1] end |
Instance Attribute Details
#view ⇒ Object (readonly)
Returns the value of attribute view.
164 165 166 |
# File 'lib/hivonic/commands.rb', line 164 def view @view end |
Instance Method Details
#query ⇒ Object
171 172 173 |
# File 'lib/hivonic/commands.rb', line 171 def query @query = "DROP VIEW IF EXISTS #{self.db}.#{self.view};" end |