bigpresh / Dancer-Plugin-Database

Dancer::Plugin::Database - easy database support for Dancer applications
http://search.cpan.org/dist/Dancer-Plugin-Database
37 stars 36 forks source link

limit not fully supported #31

Closed nicolasfranck closed 11 years ago

nicolasfranck commented 12 years ago

Hi there,

I tried the limit support in the function quick_select, but it only seems to support the number of results to return, and not the offset.

select * from foo limit 20,20;

but your code does not allow this (Dancer::Plugin::Database::Handle):

if ($opts->{limit} =~ /^\d+$/) {

Checked for sanity above so safe to interpolate

        $sql .= " LIMIT $opts->{limit}";
    } else {
        die "Invalid LIMIT param $opts->{limit} !";
    }

thanks in advance

bigpresh commented 11 years ago

Er - my apologies that I somehow let this issue sit for so long without attention.

That's not good. I really need to write up a GitHub nagger script which emails me periodically if there are outstanding issues on GH awaiting my attention.

Fixing this one now.

bigpresh commented 11 years ago

This is fixed in 1075ba3; a new version will be released containing this fix as soon as possible (I'm going to push out a dev release for tester feedback first, then the next stable release will be 2.0 (version bump to reflect Dancer2 compatibility work)

bigpresh commented 11 years ago

Hmm. GitHub shows this issue as open still - it doesn't want to allow me to close it?

bigpresh commented 11 years ago

... now it did.