From 6aa055f5ab8ad4aee2791d9ba505d8328707ca83 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 14 Jul 2013 20:31:25 +0530 Subject: Remove deprecated calls to `delete` with preference to using `compile_delete` and then calling `to_sql` on the resulting object to execute the SQL --- lib/arel/crud.rb | 9 --------- 1 file changed, 9 deletions(-) (limited to 'lib/arel/crud.rb') diff --git a/lib/arel/crud.rb b/lib/arel/crud.rb index e8e78a381c..cc50a820e4 100644 --- a/lib/arel/crud.rb +++ b/lib/arel/crud.rb @@ -59,14 +59,5 @@ switch to `compile_insert` dm end - def delete - if $VERBOSE - warn <<-eowarn -delete (#{caller.first}) is deprecated and will be removed in Arel 4.0.0. Please -switch to `compile_delete` - eowarn - end - @engine.connection.delete compile_delete.to_sql, 'AREL' - end end end -- cgit v1.2.3 From 4cbc19075bd2bdf77b591a362db2bd4f72722754 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 14 Jul 2013 20:32:34 +0530 Subject: Remove deprecated calls to `insert` with preference to using `compile_insert` and then calling `to_sql` on the resulting object to execute the SQL --- lib/arel/crud.rb | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'lib/arel/crud.rb') diff --git a/lib/arel/crud.rb b/lib/arel/crud.rb index cc50a820e4..98e109d6f9 100644 --- a/lib/arel/crud.rb +++ b/lib/arel/crud.rb @@ -41,17 +41,6 @@ switch to `compile_update` InsertManager.new @engine end - # FIXME: this method should go away - def insert values - if $VERBOSE - warn <<-eowarn -insert (#{caller.first}) is deprecated and will be removed in Arel 4.0.0. Please -switch to `compile_insert` - eowarn - end - @engine.connection.insert compile_insert(values).to_sql - end - def compile_delete dm = DeleteManager.new @engine dm.wheres = @ctx.wheres -- cgit v1.2.3 From 5f5a1447bef24ec216c8f21e8a0b6dd6623168b8 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 14 Jul 2013 20:33:41 +0530 Subject: Remove deprecated calls to `update` with preference to using `compile_update` and then calling `to_sql` on the resulting object to execute the SQL --- lib/arel/crud.rb | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'lib/arel/crud.rb') diff --git a/lib/arel/crud.rb b/lib/arel/crud.rb index 98e109d6f9..6b3a776c6f 100644 --- a/lib/arel/crud.rb +++ b/lib/arel/crud.rb @@ -18,19 +18,6 @@ module Arel um end - # FIXME: this method should go away - def update values - if $VERBOSE - warn <<-eowarn -update (#{caller.first}) is deprecated and will be removed in Arel 4.0.0. Please -switch to `compile_update` - eowarn - end - - um = compile_update values - @engine.connection.update um.to_sql, 'AREL' - end - def compile_insert values im = create_insert im.insert values -- cgit v1.2.3 From 87fd8b390328557661500208b64cc15f61efddd1 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 14 Jul 2013 21:10:20 +0530 Subject: Remove deprecated calls to using `UpdateManager` without setting `UpdateManager#key` --- lib/arel/crud.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/arel/crud.rb') diff --git a/lib/arel/crud.rb b/lib/arel/crud.rb index 6b3a776c6f..ef14439a1f 100644 --- a/lib/arel/crud.rb +++ b/lib/arel/crud.rb @@ -10,6 +10,7 @@ module Arel else relation = values.first.first.relation end + um.key= relation.primary_key um.table relation um.set values um.take @ast.limit.expr if @ast.limit -- cgit v1.2.3