From 5a56b5718ec7a77e4e613c8aadc44b9b387892c6 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Thu, 7 Jan 2016 06:03:49 +0900 Subject: Remove `delete_sql` in sqlite3 adapter `sql += " WHERE 1=1"` was introduced in 69cb942. But it is not needed. ref https://www.sqlite.org/lang_delete.html --- .../lib/active_record/connection_adapters/sqlite3_adapter.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index ccb4e5b01c..b1cfb87a12 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -285,11 +285,6 @@ module ActiveRecord @connection.changes end - def delete_sql(sql, name = nil) #:nodoc: - sql += " WHERE 1=1" unless sql =~ /WHERE/i - super sql, name - end - def select_rows(sql, name = nil, binds = []) exec_query(sql, name, binds).rows end -- cgit v1.2.3