Skip to content

Commit

Permalink
Fix documentation bug in SQLiteDatabase
Browse files Browse the repository at this point in the history
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

Change-Id: Ife919c4dcf7bf703b692d338d1fb5844a532dd39
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
  • Loading branch information
xxv committed May 12, 2016
1 parent d58e7b2 commit 8fc3144
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/java/android/database/sqlite/SQLiteDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -1429,10 +1429,9 @@ public long replaceOrThrow(String table, String nullColumnHack,
* 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 <code>-1</code> if either the
* input parameter <code>conflictAlgorithm</code> = {@link #CONFLICT_IGNORE}
* or an error occurred.
*/
public long insertWithOnConflict(String table, String nullColumnHack,
ContentValues initialValues, int conflictAlgorithm) {
Expand Down

0 comments on commit 8fc3144

Please sign in to comment.