Class: SqlStmt::Delete

Inherits:
FromQuery show all
Defined in:
lib/sqlstmt/delete.rb

Instance Attribute Summary

Attributes inherited from Query

#fields, #joins, #tables, #wheres

Instance Method Summary collapse

Methods inherited from FromQuery

#group_by, #having, #limit, #order_by

Methods inherited from Query

#includes_table?, #join, #join_using, #left_join, #left_join_using, #no_where, #optional_join, #optional_where, #table, #to_s, #where

Constructor Details

#initializeDelete

Returns a new instance of Delete.



6
7
8
9
# File 'lib/sqlstmt/delete.rb', line 6

def initialize
  super
  @from_table = nil
end

Instance Method Details

#from(table) ⇒ Object



11
12
13
14
15
# File 'lib/sqlstmt/delete.rb', line 11

def from(table)
  @from_table = table
  @tables.push(table)
  self
end