Re: Patch for Class::DBI::MySQL to support LIMIT

[prev] [thread] [next] [Date index for 2004/07/27]

From: Rhesa Rozendaal
Subject: Re: Patch for Class::DBI::MySQL to support LIMIT
Date: 21:33 on 27 Jul 2004
jason scott gessner wrote:

> the patch says it all.
> 
>         if ( $search_opts->{limit} =~ m/^(\d+\s?,\s?)?\d+$/ ) {
>             $frag .= " LIMIT $search_opts->{limit}"

I think you'd have to add support for OFFSET as well, since Mysql
supports that, and Postgres requires it.
This should work:

	m/^(\d+\s?(?:,|OFFSET)\s?)?\d+$/i

> Sorry, just thinking out loud.

As do I ;-)

Rhesa


Patch for Class::DBI::MySQL to support LIMIT
jason scott gessner 21:16 on 27 Jul 2004

Re: Patch for Class::DBI::MySQL to support LIMIT
Rhesa Rozendaal 21:33 on 27 Jul 2004

Re: Patch for Class::DBI::MySQL to support LIMIT
jason scott gessner 21:42 on 27 Jul 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52