db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nouguier olivier <olivier.nougu...@wanadoo.fr>
Subject Re: OQL Limit Queries
Date Mon, 06 Oct 2003 21:13:31 GMT
Jakob Braeuchi wrote:
> hi sukesh,
> 
> afaik the limits cannot be defined in the oql-query.
> but you can do the following:
> 
>            OQLQuery query = odmg.newOQLQuery();
>            query.create( "select ....." );
>            query.bind( ... );
>            ((Query)query).setStartAtIndex(....);
> 
> hth
> jakob
> 
> Sukesh Garg wrote:
> 
>> Is there support for "limit" in the OJB's ODMG implementation.
>>
>> e.g. select * from tableName order by id limit 5
>>
>> thx,
>> sukesh
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>  
>>
Hi all,
	Not with oql query but if you do same thing with:

EnhancedOQLQuery query = m_odmg.newOQLQuery();
query.create("select id from " + Address.class.getName(), 1, 3 );

org.apache.ojb.odmg.oql.EnhancedOQLQuery has a create method with offset
and limit

Hope it's help



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message