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

quick_count convenience method added #42

Closed Casao closed 11 years ago

Casao commented 11 years ago

Added a quick_count feature.

I believe this was wishlisted in #13

ambs commented 11 years ago

Hey. Was just preparing to implement it in the next few days. I will review your pull request shortly. Thank you Alberto

ambs commented 11 years ago

Seems good. @bigpresh, do you mind to give it a quick look? You are more aware of the main code. If you could just comment one :+1: I would be happy to merge it later.

bigpresh commented 11 years ago

I'm a bit cautious whether it's currently too MySQL-specific - do PostgreSQL and SQLite also both return the result with a column named COUNT(*)?

A quick test confirms that MySQL and SQLite do; assuming PostgreSQL does too, I think it's good to merge.

Thanks @Casao for your contribution!

ambs commented 11 years ago

Thank you, @bigpresh. Later tonight I'll do the merge.

ambs commented 11 years ago

Changed the code a little to use selectrow_array and merged (5812912). Thank you, @Casao.