gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Westkämper <timo.westkam...@mysema.com>
Subject Re: Type-safe queries for Gora?
Date Wed, 27 Oct 2010 08:55:21 GMT
Hi Enis.

Wrapping the programmatic API via Querydsl is quite straight forward I 
believe.

The Lucene and Mongodb integrations use a conversion to programmatic 
queries as well.

What kind of query expressivity do you want to achieve with Gora? Is it 
comparable to Mongodb queries or simpler?

Timo.
> Hi,
>
> Querydsl seems nice indeed. I too dislike dealing with string queries. We
> will be glad to collaborate on this. However, there is no string query
> support yet at Gora. The Query interface is completely programmatic. Do you
> propose to wrap current code with querydsl API ?
>
> Enis
>
> On Mon, Oct 25, 2010 at 5:11 PM, Timo Westkämper<timo.westkamper@mysema.com
>    
>> wrote:
>>      
>    
>> Hello everybody.
>>
>> I am the maintainer of Querydsl, a typesafe query language for Java.
>> Querydsl supports backends like JPA, JDO, SQL, Lucene and Mongodb and we
>> would like to know if you guys would like to collaborate on bringing
>> type-safe query support to Gora.
>>
>> The benefits of using Querydsl in comparison to string based queries are
>>
>>    * code completion in IDE
>>    * almost no syntactically invalid queries allowed (type-safe on all
>>      levels)
>>    * domain types and properties can be referenced safely (no Strings
>>      involved!)
>>    * adopts better to refactoring changes in domain types
>>    * incremental Query definition is easier
>>
>> The homepage of Querydsl provides basic information on our project :
>> http://source.mysema.com/display/querydsl/Querydsl
>>
>> Querydsl uses APT processors to scan for annotated domain types and
>> generates a Query model based on the annotated sources. The query model can
>> then be used to construct queries.
>>
>> Here is an example for JPA
>>
>> QCustomer customer = QCustomer.customer; // query model type
>> JPQLQuery query =new  HibernateQuery (session); // query instance
>> Customer bob = query.from(customer)
>>   .where(customer.firstName.eq("Bob"))
>>   .uniqueResult(customer);
>>
>>
>> What do you think?
>>
>> Best regards,
>> Timo Westkämper
>>
>>
>>      


Mime
View raw message