Scott Gray wrote:
> I could see that it doesn't send the raw sql to the database I was just
> trying to point out that offset isn't currently supported by the entity
> engine and that adding support for it could be problematic.

Offset is simple, relatively.  Just need to issue a bunch of rs.next()
calls early, and then a flag to EntityListIterator to forbid calling
rs.previous() past the beginning.

> I agree view-entity definitions can at times be quite verbose and it
> could be useful there in some situations, but will these sql statements
> be reusable in the same way that view entities are?  Also I actually
> like the java-ness of constructing dynamic view entities rather that
> building a string, it makes the code easier to read IMO.

Absolutely.  It's rather trival to extend the parser, to have multiple
 selects defined in some global .sql file, giving each a NAME, then
also extending the condition parser to have a ?NAME type syntax.

Maybe using this api(brainstorming):

eli = EntitySql.getListIterator(delegator, "path/to/resource.sql",
"my-special-query", Map<String, Object> params)

Reply via email to