From c240b607f78a50064ba2866e43e8380bfe5383bc Mon Sep 17 00:00:00 2001 From: Steve Pomeroy Date: Thu, 14 Mar 2013 00:42:10 -0400 Subject: [PATCH] Fix documentation bug in SQLiteDatabase The documentation incorrectly states that, "[insertWithOnConflict returns] the primary key of the existing row if the input param 'conflictAlgorithm' = CONFLICT_IGNORE". Unfortunately, SQLite does not provide such functionality. Close: https://code.google.com/p/android/issues/detail?id=13045 Signed-off-by: Steve Pomeroy (cherry picked from commit 8fc3144fa5d9fe3a6c7fb6de80cb34d5cafabc05) Change-Id: I89e56428e612d667259744e2bc3df124e5a2aa0e --- core/java/android/database/sqlite/SQLiteDatabase.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index 50e73564ef29..0f64b921a079 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -1431,10 +1431,9 @@ public final class SQLiteDatabase extends SQLiteClosable { * row. The keys should be the column names and the values the * column values * @param conflictAlgorithm for insert conflict resolver - * @return the row ID of the newly inserted row - * OR the primary key of the existing row if the input param 'conflictAlgorithm' = - * {@link #CONFLICT_IGNORE} - * OR -1 if any error + * @return the row ID of the newly inserted row OR -1 if either the + * input parameter conflictAlgorithm = {@link #CONFLICT_IGNORE} + * or an error occurred. */ public long insertWithOnConflict(String table, String nullColumnHack, ContentValues initialValues, int conflictAlgorithm) { -- 2.11.0