Hi, sorry that we have not been able to supply you with this feature in the current release, but we will definitely adress it now as our next thing.
However I do not quite understand why you had to modify the implmentation in Empire-db and use a modified Empire-db jar to achive this. If you only need MySQL then you could simply derive a class from DBDatabaseDriverMySQL, override createCommand() and supply it with your special version of an extended DBCommandMySQL object that contains the limit function. Then every time you need to limit a command you cast the cmd object to your class and use it. This way you do not have to modify or rebuild any of the Empire-db classes and you can update to the most current version. Of course I see that this is only practical for one type of database and the upcasts won't make your code particularly nicer. But it's an acceptable solution and not a "hack". As mentioned above we will definitely adress your issue, but please give us a bit more time. Regards Rainer exxos wrote: > re: LIMIT Back on the scene > > 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, > 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. > > >
