diff options
Diffstat (limited to 'lib/arel/relations/writes/delete.rb')
-rw-r--r-- | lib/arel/relations/writes/delete.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/arel/relations/writes/delete.rb b/lib/arel/relations/writes/delete.rb deleted file mode 100644 index b1ff3bef27..0000000000 --- a/lib/arel/relations/writes/delete.rb +++ /dev/null @@ -1,19 +0,0 @@ -module Arel - class Deletion < Compound - attributes :relation - deriving :initialize, :== - - def to_sql(formatter = nil) - [ - "DELETE", - "FROM #{table_sql}", - ("WHERE #{wheres.collect(&:to_sql).join('\n\tAND ')}" unless wheres.blank? ), - ("LIMIT #{taken}" unless taken.blank? ), - ].compact.join("\n") - end - - def call(connection = engine) - connection.delete(to_sql) - end - end -end |