MountainClimb / datanucleus-appengine

Automatically exported from code.google.com/p/datanucleus-appengine
0 stars 0 forks source link

Support JDOQL Query.setCandidates() #155

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Just add the following code to JDOQLQuery

if (candidateCollection != null)
        {
            // Supplied collection of instances, so evaluate in-memory
            if (candidateCollection.isEmpty())
            {
                return Collections.EMPTY_LIST;
            }
            else
            {
                ClassLoaderResolver clr = om.getClassLoaderResolver();
                List candidates = new ArrayList(candidateCollection);
                JavaQueryEvaluator resultMapper = new JDOQLEvaluator
(this, candidates, compilation,
                    parameters, clr);
                return resultMapper.execute(true, true, true, true,
true);
            }
        } 

and then in-memory evaluation takes care of the rest.

Original issue reported on code.google.com by googleco...@yahoo.co.uk on 4 Nov 2009 at 2:19

GoogleCodeExporter commented 8 years ago
Timescales for including this simple block of code into your plugin ?

Original comment by googleco...@yahoo.co.uk on 20 Apr 2010 at 5:45

GoogleCodeExporter commented 8 years ago

Original comment by googleco...@yahoo.co.uk on 12 Jul 2011 at 6:08

GoogleCodeExporter commented 8 years ago
SVN trunk now allows the JDO API to be used for setting a candidate 
collection/extent to query over, and then evaluate all in-memory.

Original comment by googleco...@yahoo.co.uk on 13 Jul 2011 at 6:41