I would have expected limit 0 to mean no limit or unlimited.
The current behaviour seems to follow that pattern.
That said, PHP's LimitIterator treats -1 as unlimited and 0 triggers an
OutOfBoundsException.
Cheers,
David
--
View this message in context:
So zero equals infinity? Interesting... But with ZF being object-oriented, I
think we can expect more intuitive behavior.
--
Hector Virgen
Sent from my Droid X
On Oct 5, 2010 4:56 AM, David Muir
davidkmuir+z...@gmail.comdavidkmuir%2bz...@gmail.com
wrote:
What is intuitive to all though? Since Zend_Db is an abstraction layer
around various vendor databases, it has to encapsulate the general
perspective of all the database targets.
Since LIMIT in SQL is far from standardized, and since no predominant
understanding of LIMIT across all
FETCH FIRST 0...
SELECT TOP 0...
SELECT... LIMIT 0
I'm having trouble believing that anyone would expect more than zero rows to
be returned.
I agree with you about throwing an exception for limit zero, but since we
can't have a BC break, the next best thing IMO would be to honor the
developer's
Right, but currently, people rely on this behavior.
Not b/c they believe that limit(0) should return Zero rows, but because
in our loosely-typed world, limit(null) or limit(false) means return
everything.
Unfortunately, limit() current casts everything to an integer, so
someone calling