Class: Virsandra::DeleteQuery

Inherits:
Query
  • Object
show all
Defined in:
lib/virsandra/queries/delete_query.rb

Instance Attribute Summary

Attributes inherited from Query

#row, #statement

Instance Method Summary collapse

Methods inherited from Query

#add, alter, delete, #execute, #fetch, insert, #limit, #order, select, #to_s, #values

Instance Method Details

#from(table) ⇒ Object Also known as: table


4
5
6
7
# File 'lib/virsandra/queries/delete_query.rb', line 4

def from(table)
  @from = TableQuery.new("FROM" ,table)
  self
end

#where(clause) ⇒ Object


10
11
12
13
14
15
16
17
# File 'lib/virsandra/queries/delete_query.rb', line 10

def where(clause)
  unless @where
    @where = WhereQuery.new(clause)
  else
    @where += WhereQuery.new(clause)
  end
  self
end