incubator-empire-db-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis De Brabandere <franci...@gmail.com>
Subject Re: LIMIT Back on the scene
Date Thu, 20 May 2010 20:30:39 GMT
On Tue, May 18, 2010 at 7:57 PM, exxos <hatufr@yahoo.com> wrote:
> Hi,
>
> I access MySQL via the Empire-db, but I have the need of the instruction
> "LIMIT", in order to limit the number of row returned by the SELECT.I
> understand that currently Empire-DB (version 2.0.5) does not support it,

In case you didn't know yet we just released 2.0.6-incubating

> because it is specific to some DB engines, but for me, dealing without it,
> it is not an option! I cannot go over...
>
> So, I modified the implementation of DBCommand and I rebuild and
> regenerated the empire-db JAR lib, and now I have the instruction supported
> in my project:
>
>        cmd.select(db.author.getColumns());
>        cmd.where(db.author.lastname.like(name)
>                .or(db.author.firstname.like(name))
>                .or(db.author.pseudo.like(name)));
>        cmd.limit(10);
>
> But it is a temporary solution, because from now, I cannot use the official
> release without each time reinject my "Hack" (Who is not really one)
> This is probably one of the most important instructions when you play with
> MySQL or others DB engines that support it. It is easy to do it, why not,
> into the specific implementation DBCommand for MySQL: DBCommandMySQL
>
> Please add this feature!
>
> Cheers.
>
>
>
>
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Mime
View raw message