wmjie / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

ibm_db_sa does not implement Limit / Offsets #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define an ORM-mapped table 
2. Attempt to query that table with a Limit, an Offset, or both

What is the expected output? What do you see instead?
Expected: A limit and/or offset applied to the query
Actual: No limit or offset is applied, resulting in a query for all records.
The problem exists here:
http://code.google.com/p/ibm-db/source/browse/trunk/IBM_DB/ibm_db_sa/ibm_db_sa/i
bm_db_sa.py#634

What version of the product are you using? On what operating system?
Ubuntu 9.10
SQLAlchemy 0.5.8 
ibm_db_sa 0.1.6 using the compatibility patch for 0.5 found in the Google
Group
(http://01175241965258921893-a-g.googlegroups.com/web/ibm_db_sa.py?gda=Go6fZT4AA
ADCeTst8HV659OK1420k4fhpk55Dkg0_iBcqCijbn3jgGGjPNV3f3qZR-5ViwkRybHjsKXVs-X7bdXZc
5buSfmx)

Please provide any additional information below.

Original issue reported on code.google.com by bhorns...@gmail.com on 14 May 2010 at 4:16

GoogleCodeExporter commented 9 years ago
I should note that I understand (on a high-level) the complexity involved with
offsets, but any workaround (there appears to be a ROW_NUMBER() workaround in 
place
for the Django adapter) is better than nothing at all.

Original comment by bhorns...@gmail.com on 14 May 2010 at 5:28

GoogleCodeExporter commented 9 years ago
It appears the Ruby on Rails adapter (http://rubyforge.org/projects/rubyibm/)
implements the same workaround as the Django adapter.

Original comment by bhorns...@gmail.com on 14 May 2010 at 5:45

GoogleCodeExporter commented 9 years ago
Attached is a patch that implements the limit/offset functionality based 
exactly on how the mssql dialect does it. Works for me.

Original comment by sok...@gmail.com on 29 Sep 2011 at 7:14

Attachments:

GoogleCodeExporter commented 9 years ago
Limit/Offset functionality released with ibm_db_sa-0.3.0 release.

Original comment by rahul.pr...@in.ibm.com on 4 Mar 2013 at 5:17