开发者

Android Proxy Cursor

开发者 https://www.devze.com 2023-01-02 14:51 出处:网络
I have a database with which I wish to expose data with a ContentProvider. However, it is important that all the colums are not exposed, and also they should be renamed. Is there any good way of doing

I have a database with which I wish to expose data with a ContentProvider. However, it is important that all the colums are not exposed, and also they should be renamed. Is there any good way of doing this? I was thinking maybe some kind of proxy-cursor which takes a cursor and translates its columns to the desired ones, and calls to close and the like would just be replayed to the original cursor. Does s开发者_如何学运维omething like this exist, or would it be hard to make?


Is there any good way of doing this?

You could either implement a CursorWrapper that filters stuff out, or copy the data into a MatrixCursor.

0

精彩评论

暂无评论...
验证码 换一张
取 消