當前位置:
首頁 >
数据:ContentResolver类
發布時間:2023/11/30
36
豆豆
生活随笔
收集整理的這篇文章主要介紹了
数据:ContentResolver类
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
ContentResolver是通過URI來查詢ContentProvider中提供的數據。除了URI以 外,還必須知道需要獲取的數據段的名稱,以及此數據段的數據類型。
? 如果你需要獲取一個特定的記錄,你就必須知道當前記錄的ID。 ? 簡要介紹ContentResolver的主要接口,如下:| 返回值 | 函數聲明 |
| ? ?final Uri | insert?(Uri url, ? ? ? ? ? ContentValues values) Inserts a?row?into a table at the given URL. |
| ? ?final int | delete?(Uri url, ? ? ? ? ? ? ?String where, ? ? ? ? ? ? ?String[] selectionArgs) Deletes row(s) specified by a content URI. |
| ?final Cursor | query?(Uri uri, ? ? ? ? ? ? String[] projection, ? ? ? ? ? ? String selection, ? ? ? ? ? ? String[] selectionArgs, ? ? ? ? ? ? String sortOrder) Query the given URI, returning a Cursor over the result set. |
| ? ?final int | update?(Uri uri, ? ? ? ? ? ? ?ContentValues values, ? ? ? ? ? ? ?String where, ? ? ? ? ? ? ?String[] selectionArgs) Update row(s) in a content URI. |
轉載于:https://www.cnblogs.com/yedushusheng/p/4333921.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的数据:ContentResolver类的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 应聘者提问环节
- 下一篇: [编程题] 按照左右半区的方式重新组合单