Sam Stephenson
2005-Mar-07 04:28 UTC
Request for those familiar with internals of the Oracle, SQL Server, and DB2 adapters
I''ve made a research patch [1] for Active Record which creates a new interface for working with limit and offset parameters, and it needs implementations for the commercial databases. The patch is described in detail in trac ticket #795 [2]. I''d greatly appreciate any contributions you can make as soon as possible so that this fix can make it in to the Rails 1.0 release. Thanks, Sam [1] http://dev.rubyonrails.com/attachment/ticket/795/limit-offset-array.patch [2] http://dev.rubyonrails.com/ticket/795
Rick Olson
2005-Mar-07 07:28 UTC
Re: Request for those familiar with internals of the Oracle, SQL Server, and DB2 adapters
On Sun, 6 Mar 2005 22:28:53 -0600, Sam Stephenson <sstephenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve made a research patch [1] for Active Record which creates a new > interface for working with limit and offset parameters, and it needs > implementations for the commercial databases. The patch is described > in detail in trac ticket #795 [2]. > > I''d greatly appreciate any contributions you can make as soon as > possible so that this fix can make it in to the Rails 1.0 release.SQL Server does not support LIMIT/OFFSET. You can limit like this however: SELECT TOP 15 FROM entries; There is no official way to page through a recordset through a simple SQL syntax. The most popular methods I''ve seen use temporary tables or server cursors for this. -- rick http://techno-weenie.net