Created
September 1, 2010 14:46
-
-
Save praveend/560777 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From cdcc7f6ff591e69eb63251138db176588df2c296 Mon Sep 17 00:00:00 2001 | |
| From: Praveen Devarao <praveendrl@in.ibm.com> | |
| Date: Wed, 1 Sep 2010 19:47:17 +0530 | |
| Subject: [PATCH] Changes as required in accordance to GenericCompiler changes | |
| --- | |
| lib/arel/engines/sql/compilers/ibm_db_compiler.rb | 6 +++--- | |
| 1 files changed, 3 insertions(+), 3 deletions(-) | |
| diff --git a/lib/arel/engines/sql/compilers/ibm_db_compiler.rb b/lib/arel/engines/sql/compilers/ibm_db_compiler.rb | |
| index 8c5779a..56680c9 100644 | |
| --- a/lib/arel/engines/sql/compilers/ibm_db_compiler.rb | |
| +++ b/lib/arel/engines/sql/compilers/ibm_db_compiler.rb | |
| @@ -32,9 +32,9 @@ module Arel | |
| class IBM_DBCompiler < GenericCompiler | |
| def limited_update_conditions(conditions, taken) | |
| - quoted_primary_key = engine.quote_table_name(primary_key) | |
| - update_conditions = "WHERE #{quoted_primary_key} IN (SELECT #{quoted_primary_key} FROM #{engine.connection.quote_table_name table.name} #{conditions} " #Note: - ')' not added, limit segment is to be appended | |
| - engine.add_limit_offset!(update_conditions,{:limit=>taken,:offset=>nil}) | |
| + quoted_primary_key = @engine.connection.quote_column_name(relation.primary_key) | |
| + update_conditions = "WHERE #{quoted_primary_key} IN (SELECT #{quoted_primary_key} FROM #{@engine.connection.quote_table_name relation.table.name} #{conditions} " #Note: - ')' not added, limit segment is to be appended | |
| + @engine.connection.add_limit_offset!(update_conditions,{:limit=>taken,:offset=>nil}) | |
| update_conditions << ")" # Close the sql segment | |
| update_conditions | |
| end | |
| -- | |
| 1.6.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment