On Dec 14, 4:23 pm, pjv wrote:
> Would you please share your custom solutions (in code) for reuse?
Sure - take a look at jarkman.co.uk/code/
JoiningAndFilteringCursors.zip
There are two CursorWrapper derived classes in there, FilteringCursor
and JoiningCursor. FilteringCursor leaves out rows,
Update: found my bug and it should work now:
http://bazaar.launchpad.net/%7Epjv/collectionista/trunk/download/49/filteredcursor.java-20081215002110-blupm1dk5m7h1z4a-2/FilteredCursor.java?file_id=filteredcursor.java-20081215002110-blupm1dk5m7h1z4a-2
On 15 dec, 15:29, pjv wrote:
> I've written my
I've written my own FilteredCursor that filters rows away from one
cursor, by "joining" it with another (uses CursorJoiner internally).
It suits my needs and is not quite general. The sort ASC presumption
is a big downside. It's in the source code for my Collectionista
project (revision 48,
net.lp
pjv wrote:
> Would you please share your custom solutions (in code) for reuse?
Alas, my implementation was made under contract for another firm, so I
cannot release it at this time.
I'll see about rewriting it at some point, perhaps as part of a chapter
in my upcoming Advanced Android book. I
Richard, Mark,
Would you please share your custom solutions (in code) for reuse?
CursorJoiner doesn't do very much and doesn't seem to be able to give
you a new joint Cursor back eventually. I think a lot of people could
benefit from some code reuse here.
Thanks,
pjv
On 6 dec, 09:53, jarkman w
Mark - thanks for the suggestion.
I ended up making a couple of general-purpose CursorWrapper
subclasses, one for joining two providers & one for filtering a
provider (with a callback to define the desired rows).
They certainly seem to work, and they make the calling code very tidy.
I do still h
On Wed, Nov 26, 2008 at 3:37 AM, jarkman <[EMAIL PROTECTED]> wrote:
> I have the slightly hazy idea that we could write our own Cursor that
> took a pair of Cursors and a join expression, so as to do this in a
> general way. That would be handy in all sorts of ways. Do you think
> that would be pr
Dianne - thanks for the confirmation. I had spent a while banging my
head on this issue, convinced that there ought to be an easy way if
only I found the right ContentProvider magic.
I can see that we will need to solve similar problems more than once,
and I would love to stay in the world of Cur
Correct, you can't directly do joins on the database. This is intentional,
as the exact schema of the database can change over time, and a
ContentProvider is intended to provide a more abstract mechanism for
accessing it that can remain compatible as those changes occur.
On Tue, Nov 25, 2008 at 7
jarkman wrote:
> I'd love to make a cursor which also included the name of the person,
> but as far as I know there is no way to do that with a single query.
That's probably true.
> That is, as far as I can tell, there's no way to do a join via the
> content provider interface, and permissions p
I've been looking at a similar problem. Something like this:
Cursor cursor = context.getContentResolver().query(
Contacts.GroupMembership.CONTENT_URI,
new String[]
{Contacts.GroupMembership._ID,Contacts.GroupMembership.PERSON_ID,
Contacts.GroupColumns.NAME}
11 matches
Mail list logo