[infinispan-dev] ISPN-2296 Query projections

Galder Zamarreño galder at redhat.com
Wed Sep 19 02:39:34 EDT 2012


Hey Marko,

I'd suggest you open a pull request and ask for feedback there, because pull reqs offer a good place for providing comments.

Being a pull req does not require it to be merged, but make it clear in the title of pull req.

Cheers,

On Sep 17, 2012, at 5:52 PM, Marko Lukša <marko.luksa at gmail.com> wrote:

> Hey Sanne and others,
> 
> before I send a pull request, can you review my impl of ISPN-2296 at 
> https://github.com/luksa/infinispan/compare/ISPN-2296. I'd like your 
> input on this before implementing this on clustered queries.
> 
> Basically here's what I did:
> 
> Extracted an interface (QueryResultLoader - any ideas for a better 
> name?) from EntityLoader and introduced ProjectionLoader. This took care 
> of projection of actual fields.
> 
> For projecting the cache key, I introduced ProjectionConverter, which 
> translates the fields passed to cacheQuery.projection(fields) into 
> fields that hsearch can deal with (currently, only 
> ispn.ProjectionConstants.KEY is replaced with 
> hsearch.ProjectionConstants.ID). The converter is then also used to 
> convert the actual values returned by hsearch (for 
> cacheQuery.projection(ProjectionConstants.KEY), it converts the id 
> returned by hsearch into the cache key).
> 
> Just for completeness, besides introducing ispn.PC.KEY, I also added 
> PC.VALUE, which is equivalent to hsearch.PC.THIS.
> 
> Marko
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz

Project Lead, Escalante
http://escalante.io

Engineer, Infinispan
http://infinispan.org




More information about the infinispan-dev mailing list