On Feb 28, 2006, at 8:04 PM, Derrick Spell wrote:
* LIMIT and OFFSET are broken in OpenBase. And actually, the tests expecting 0 results when using LIMIT 0 will always fail. The guys at OpenBase feel that LIMIT 0 should be equivalent to not having a limit at all. That way you can be a little sloppy with SQL generation and always include the limit statement even when the user doesn't specify a limit.
Sybase is similar. To fix this, I had to distinguish between limit- not-set and limit-explicitly-set-to-zero. Check out my sybase patch for ideas (#3765). You can use the horrific "select ... where 1=2" hack to return zero results when :limit = 0. Not the most intellectually rewarding, but it is effective and the simplest solution I found.
I ended up using a temp table to handle :offset, since Sybase has (AFAIK) no support for that either. Hopefully that'll work for OpenBase too. My normal_select?() method determines whether or not to use the temp table select, depending on the values of :limit and :offset.
John -- John R. Sheets http://umber.sourceforge.net http://writersforge.sourceforge.net _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core