Skip to content

Instantly share code, notes, and snippets.

View praveend's full-sized avatar

Praveen Devarao praveend

View GitHub Profile
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libconflate configure 1.7.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure --prefix=/home/praveen/LIs/nosql/membase-server_src/install --disable-static --enable-shared --without-check
## --------- ##
## Platform. ##
@praveend
praveend / ibm_db_patch.patch
Created June 13, 2011 15:58
Patch for Arel to support ibm_db specifics as per new version
From 25c2b8efcbb0ed2f39b50820927d0610631bc833 Mon Sep 17 00:00:00 2001
From: Praveen Devarao <praveendrl@in.ibm.com>
Date: Mon, 13 Jun 2011 21:24:30 +0530
Subject: [PATCH] patch for ibm_db specific limit offset
---
lib/arel/visitors/ibm_db.rb | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/lib/arel/visitors/ibm_db.rb b/lib/arel/visitors/ibm_db.rb
From 0c3e07e35581052c2058fdc835a05e085c9b8af0 Mon Sep 17 00:00:00 2001
From: Praveen Devarao <praveendrl@in.ibm.com>
Date: Mon, 7 Feb 2011 20:24:36 +0530
Subject: [PATCH] Added visitor ibm_db to handle ibm_db specifics
---
lib/arel/visitors.rb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/arel/visitors.rb b/lib/arel/visitors.rb
--- C:/Documents and Settings/pdevarar/Desktop/lib/arel/engines/sql/compilers/ibm_db_compiler.rb
+++ C:/Documents and Settings/pdevarar/Desktop/ibm_db_compiler.rb (working copy)
@@ -32,11 +32,9 @@
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})
- update_conditions << ")" # Close the sql segment
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
From 8812b05e24aeb70099e50bb2716b647555902365 Mon Sep 17 00:00:00 2001
From: Praveen Devarao <praveen@falcon>
Date: Thu, 25 Feb 2010 12:49:19 +0530
Subject: [PATCH] Moved adding of limit on deletion and adding of limit on update conditions to GenericCompiler, to provide flexibility to handle db specifics
---
lib/arel/engines/sql/compilers/ibm_db_compiler.rb | 62 +++++++++++++++++++++
lib/arel/engines/sql/relations/compiler.rb | 7 ++-
lib/arel/engines/sql/relations/writes.rb | 6 +-
3 files changed, 70 insertions(+), 5 deletions(-)
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter=>"ibm_db",
:database=>"arunit",
:username=>"user",
:password=>"secret",
:parameterized=>false
)
From f1dea61ce483e01aa7e17b1fcdf1d9dbc0499525 Mon Sep 17 00:00:00 2001
From: Praveen Devarao <praveen@falcon>
Date: Wed, 3 Feb 2010 22:48:27 +0530
Subject: [PATCH] Current handling of LIMIT and OFFSET inclusion in select sql's will break standard compliant databases like DB2. Added a patch that generates the right sql "FETCH FIRST #{taken} ROWS ONLY" for specifying LIMIT and OFFSET for DB2 and Informix database(IBM_DB adapter).
---
lib/arel/engines/sql/relations/relation.rb | 12 ++++++++++++
lib/arel/engines/sql/relations/writes.rb | 13 ++++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)