android - How to join ContentProvider tables through rawQuery? -
i want make sql join through rawquery.
for example uri's follow:
uri mmsparturi = uri.parse("content://mms/part"); uri mmsinboxuri = uri.parse("content://mms/inbox"); sqlitedatabase db = //how it?
i imagine query similar this:
cursor cursor = db.rawquery("select mms.part.mid, mms.part.text, mms.inbox.m_id, mms.inbox.date mms.part join mms.inbox on mms.part.mid = mms.inbox.m_id", null);
is possible? how? if not there other option join tables, or have use 2 cursors , cursorjoiner similar result?
if join not possible across different content providers, i'm curious if can rawqueris this:
uri mmsparturi = uri.parse("content://mms/part"); sqlitedatabase db = //how it? cursor cursor = db.rawquery("select mms.part.mid, mms.part.text, mms.part", null);
how join contentprovider tables through rawquery?
there no rawquery()
available clients of contentprovider
.
you not have access sqlitedatabase
, in part because there no requirement there be sqlite database. contentprovider
facade. web service backed number of database technologies, can contentprovider
.
is possible?
no.
do have use 2 cursors , cursorjoiner similar result?
whether cursorjoiner
meet needs, cannot say. however, have join on client side, in app. similar web service, joins not supported web service need manually assembled on client side.
Comments
Post a Comment