j4mie/idiorm — pull request #115 by numkem (2013-04-11 18:29:01+00:00)
Title: Added option to bypass 'LIMIT 1' in find_one()

Hello,

I'm still working with SQL Server and idiorm and I noticed `LIMIT` isn't supported by SQL Server (there is another way to do it : `SELECT TOP 1`).

This cause a pretty big problem because it breaks the use of `find_one()` that forces a `$this->limit(1)` on every query.

Fixing `_build_limit()` could be the perfect option but because of how `_build_limit()` is implemented, it makes it a very hard thing to do.

This is a simple fix that includes a new option called `find_one_limit`. If this options is set to any value, the `LIMIT 1` is bypassed.

Thanks.