ContentResolver.Update メソッド

定義

オーバーロード

Update(Uri, ContentValues, Bundle)

コンテンツ URI の行を更新します。

Update(Uri, ContentValues, String, String[])

コンテンツ URI の行を更新します。

Update(Uri, ContentValues, Bundle)

コンテンツ URI の行を更新します。

[Android.Runtime.Register("update", "(Landroid/net/Uri;Landroid/content/ContentValues;Landroid/os/Bundle;)I", "", ApiSince=30)]
public int Update (Android.Net.Uri uri, Android.Content.ContentValues? values, Android.OS.Bundle? extras);
[<Android.Runtime.Register("update", "(Landroid/net/Uri;Landroid/content/ContentValues;Landroid/os/Bundle;)I", "", ApiSince=30)>]
member this.Update : Android.Net.Uri * Android.Content.ContentValues * Android.OS.Bundle -> int

パラメーター

uri
Uri

変更する URI。

values
ContentValues

新しいフィールド値。 キーは、フィールドの列名です。 null 値を指定すると、既存のフィールド値が削除されます。

extras
Bundle

操作に必要な追加情報を含むバンドル。 引数には、 などの ContentResolver#QUERY_ARG_SQL_LIMITSQL スタイルの引数を含めることができますが、各プロバイダーのドキュメントでは、サポートされている引数が示されることに注意してください。

戻り値

更新された行数。

属性

注釈

コンテンツ URI の行を更新します。

コンテンツ プロバイダーがトランザクションをサポートしている場合、更新プログラムはアトミックになります。

の Java ドキュメント android.content.ContentResolver.update(android.net.Uri, android.content.ContentValues, android.os.Bundle)

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

Update(Uri, ContentValues, String, String[])

コンテンツ URI の行を更新します。

[Android.Runtime.Register("update", "(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I", "")]
public int Update (Android.Net.Uri uri, Android.Content.ContentValues? values, string? where, string[]? selectionArgs);
[<Android.Runtime.Register("update", "(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I", "")>]
member this.Update : Android.Net.Uri * Android.Content.ContentValues * string * string[] -> int

パラメーター

uri
Uri

変更する URI。

values
ContentValues

新しいフィールド値。 キーは、フィールドの列名です。 null 値を指定すると、既存のフィールド値が削除されます。

where
String

更新前に行に適用するフィルター。SQL WHERE 句 (WHERE 自体を除く) として書式設定されます。

selectionArgs
String[]

戻り値

更新された行数。

属性

例外

uri または値が null の場合

注釈

コンテンツ URI の行を更新します。

コンテンツ プロバイダーがトランザクションをサポートしている場合、更新プログラムはアトミックになります。

の Java ドキュメント android.content.ContentResolver.update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[])

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象