startsWith() translates to a GREATER_THAN_OR_EQUAL query underneath the
hood. BigTable allows for range scans, so this ends up being translated to
an index scan for all properties with a value >= the target.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Mon, Oct 4, 2010 at 2:58 PM, effpe <[email protected]> wrote:

> This test worked for me
>
> Query query = pm.newQuery(Employee.class);
> query.setFilter("lastName.startsWith(lastNameParam)");
> query.setOrdering("lastName, firstName, hireDate desc");
> query.declareParameters("String lastNameParam");
> List<Employee> results = (List<Employee>) query.execute(lastname);
> if (results.size()>0) {
>  for (Employee e : results) { //e
> }
>
> the .startsWith(...) was in effect the same as .matches(...) because I was
> NOT allowed to have wildchars as a prefix anyway
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to