Re: [Sqlalchemy-users] small patch for selectone()

2006-02-05 Thread Michael Bayer
On Jan 25, 2006, at 1:02 PM, Mitch Skinner wrote: As far as oracle goes, my experience stopped at 8i, but have you seen the following link? IMHO there's a nice cross-database discussion of limit and offset, that includes an Oracle alternative to rownum--ROW_NUMBER(): http://troels.arvin.dk/db

Re: [Sqlalchemy-users] small patch for selectone()

2006-01-26 Thread Michael Bayer
Mitch Skinner wrote: > > I'm a little confused, are we talking about the same thing? I'm looking > at OracleCompiler.visit_select: > > if select.limit is not None: > limitselect.append_whereclause("rownum<%d" % > select.limit) > if select.offset is not None:

Re: [Sqlalchemy-users] small patch for selectone()

2006-01-25 Thread Mitch Skinner
Also, back on topic, here's a simple unit test for selectone for test/mapper.py. Index: mapper.py === --- mapper.py (revision 841) +++ mapper.py (working copy) @@ -130,6 +130,12 @@ print "User", u.user_id, u.user_name

Re: [Sqlalchemy-users] small patch for selectone()

2006-01-25 Thread Mitch Skinner
On Wed, 2006-01-25 at 13:59 -0500, Michael Bayer wrote: > Ill see if the current "rowid" functionality works for most cases, and > I'll look into this to see how much of an alternative it is. I'm a little confused, are we talking about the same thing? I'm looking at OracleCompiler.visit_select:

Re: [Sqlalchemy-users] small patch for selectone()

2006-01-25 Thread Michael Bayer
Mitch Skinner wrote: > On Mon, 2006-01-23 at 20:41 -0500, Michael Bayer wrote: >> > the following minor patch makes >> > selectone() much faster for large >> > result sets: >> >> hmm does it really ? I am most accustomed to Oracle where getting >> just the first row back of a huge result set is no

Re: [Sqlalchemy-users] small patch for selectone()

2006-01-25 Thread Mitch Skinner
On Mon, 2006-01-23 at 20:41 -0500, Michael Bayer wrote: > > the following minor patch makes > > selectone() much faster for large > > result sets: > > hmm does it really ? I am most accustomed to Oracle where getting > just the first row back of a huge result set is not much different > than

Re: [Sqlalchemy-users] small patch for selectone()

2006-01-23 Thread daishi
On Jan 23, 2006, at 5:41 PM, Michael Bayer wrote: hmm does it really ? I am most accustomed to Oracle where getting just the first row back of a huge result set is not much different than just getting one (and also, Oracle doesnt even have 'limit', and I have instead hacked together some "rowi

Re: [Sqlalchemy-users] small patch for selectone()

2006-01-23 Thread Michael Bayer
hmm does it really ? I am most accustomed to Oracle where getting just the first row back of a huge result set is not much different than just getting one (and also, Oracle doesnt even have 'limit', and I have instead hacked together some "rowid" type of thing that doesnt work very well, s

[Sqlalchemy-users] small patch for selectone()

2006-01-23 Thread daishi
the following minor patch makes selectone() much faster for large result sets: --- Index: mapping/mapper.py === --- mapping/mapper.py (revision 839) +++ mapping/mapper.py (working copy) @@ -416,6 +416,7 @@ def selectone(self