Hi again Goncalo

Goncalo Luiz wrote:
Hello. Because the problems I related in my last e-mail I decided to
use ODMG API. I've come into another problem...how can I limit the
number of objects returned by a query ? With PB API I  could: 1 - use
the QueryByCriteria.setStartAtIndex() and
QueryByCriteria.setEndAtIndex(). If I had 100,000,000 rows in a DB
I'd get only those between those indexes. 2 - use the
getIteratorByQuery() who guarantees me that the objects are not
loaded into memory on query execution. They only get materialized
when I access them...

Is there any mechanism to do this whit ODMG API? I know that ODMG
uses PB API, but I would't like to use the methodology described at
the FAQ entry "I don't like OQL, can I use the PersistenceBroker
Queries within ODMG?".

As mentioned in the faq you can use the PB style queries in your ODMG applications too. there is no harm in it! I do it several heavy duty applications.


ODMG is a fixed API and it does *not* contain any of the features you mention :-(

We provide an extension to OqlQuery named EnhancedOqlQuery. this interface provides a create method with startAt and endAt parameters.

you can cast the result of odmg.newOqlQuery() to this interface and use this method.

There is no iterator support in ODMG.

cheers,
Thomas


Thanks a lot.



---- Gon�alo Luiz - IST 4� Ano (PSI) [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to