SQLiteDatabase.UpdateWithOnConflict 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于更新数据库中行的便利方法。
[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")]
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,这将替换为 whereArgs 中的值。 这些值将绑定为字符串。 如果 whereClause 为 null 或不包含 ?s,则 whereArgs 可能为 null。
- conflictAlgorithm
- Conflict
用于更新冲突解决程序
返回
受影响的行数
- 属性
注解
用于更新数据库中行的便利方法。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。