Class: Hivonic::Commands::DropView

Inherits:
HiveQueryCommand show all
Defined in:
lib/hivonic/commands.rb

Instance Attribute Summary collapse

Attributes inherited from HiveQueryCommand

#db, #hive_opts

Attributes inherited from Subcommand

#dry_run, #exitstatus, #regexp, #subcommand, #time_format, #time_group_index, #ttl

Instance Method Summary collapse

Methods inherited from HiveQueryCommand

#subcommand

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

#viewObject (readonly)

Returns the value of attribute view.



164
165
166
# File 'lib/hivonic/commands.rb', line 164

def view
  @view
end

Instance Method Details

#queryObject



171
172
173
# File 'lib/hivonic/commands.rb', line 171

def query
  @query = "DROP VIEW IF EXISTS #{self.db}.#{self.view};"
end