The ContentResolver query() API is very specifically intended to not be a
full SQL query interface.  If you have a specific kind of query you want to
do, in your ContentProvider implementation add a new URI to the set you
match that builds that query with the given arguments.

On Wed, Jul 4, 2012 at 7:44 AM, Live Happy <[email protected]> wrote:

> how i can add ' distinct' to contentResolver query i tried to use it by
> projection
>
> String[] projection = new String[]{
>
>
>
>                 "DISTINCT "+ Columns.types
> };
> but it return error unknown columns in projection
>
>
> and i found an answer suggesting the use of a specified uri and matcher and 
> queryBuilder.setDistinct(true)
> but how to use that uri in the first place?
> can anyone help me with that and thanks in advance
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" 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/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en

Reply via email to