Class Delete
In: lib/delete.rb
Parent: SqlStatement

Methods

[]   from  

Public Class methods

Returns a Delete instance with the SQL initialized to ‘delete from

   Delete.from.to_sql       #=> "delete from "

[Source]

    # File lib/delete.rb, line 8
 8:     def from      
 9:       self.new('delete from ')
10:     end

Public Instance methods

Returns a Delete instance with the table appended to the SQL statement.

   Delete.from[:table1].to_sql       #=> "delete from table1"

[Source]

    # File lib/delete.rb, line 18
18:   def [](table)
19:     @to_sql += table.to_sql
20:     @tables = [table]
21:     self
22:   end

[Validate]