語言

SQLiteDatabase.UpdateWithOnConflict 方法

定義

方便地更新資料庫中資料列的方法。

[Android.Runtime.Register("updateWithOnConflict", "(Ljava/lang/String;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;I)I", "GetUpdateWithOnConflict_Ljava_lang_String_Landroid_content_ContentValues_Ljava_lang_String_arrayLjava_lang_String_IHandler")]
public virtual int UpdateWithOnConflict(string table, Android.Content.ContentValues? values, string? whereClause, string[]? whereArgs, Android.Database.Sqlite.Conflict conflictAlgorithm);
[<Android.Runtime.Register("updateWithOnConflict", "(Ljava/lang/String;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;I)I", "GetUpdateWithOnConflict_Ljava_lang_String_Landroid_content_ContentValues_Ljava_lang_String_arrayLjava_lang_String_IHandler")>]
abstract member UpdateWithOnConflict : string * Android.Content.ContentValues * string * string[] * Android.Database.Sqlite.Conflict -> int
override this.UpdateWithOnConflict : string * Android.Content.ContentValues * string * string[] * Android.Database.Sqlite.Conflict -> int

參數

table
String

更新表格

values
ContentValues

從欄位名稱映射到新欄位值。 null 是一個有效的值,會被轉換成 NULL。

whereClause
String

更新時可選的 WHERE 條款。 通過 null 會更新所有列。

whereArgs
String[]

你可以在 where 子句中加入 ?s,這些 ?s 會被 whereArgs 的值取代。 這些值會被綁定為字串。 如果 whereClause 是空或不包含 ,則其中 Args 可能是空。

conflictAlgorithm
Conflict

更新時,衝突解決器

傳回

受影響的行數

屬性

備註

方便地更新資料庫中資料列的方法。

Java 文件 android.database.sqlite.SQLiteDatabase.updateWithOnConflict(java.lang.String, android.content.ContentValues, java.lang.String, java.lang.String[], int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於