In fact I have 2 Cursor
s one is SQLite cursor, another one comes from ContentProvider
- beneath it lies complicated SQLite query - but I don't have access to it.
Both cursors has the same unique _ID
field. In a pure SQL it would be really easy to join them using those id field, but not in my case, since 2nd Cursor is not SQLite query.
I need to produce resulting joined Cursor
. Neither CursorJoiner
nor MergeCursor
doesn't help me.
Any ideas, clues, hints?
Option #1: Write your own implementation of
Cursor
-- perhaps extendingAbstractCursor
-- that does the join. I have some ancient code in an obsolete version of a discontinued book that demonstrates this (see pages 186-190).Option #2: Create a
MatrixCursor
that represents the join.