summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mark Lu <marklu@google.com> 2016-09-26 17:12:29 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-09-26 17:12:32 +0000
commitb764c94a26bc4a0c95d9670e2bd0dc307917065b (patch)
tree0d649e1a45cd57e49a0c570721385908f53553af
parent537481e2c34c5084469e8460725c5c2b4dfb2ea2 (diff)
parent1e20208d90b2e83f168cf569dab8ba9274a89153 (diff)
Merge "docs: Update docs for SQLiteDatabase replace methods" into nyc-dev
-rw-r--r--core/java/android/database/sqlite/SQLiteDatabase.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index 0f64b921a079..8e178320d66d 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -1371,6 +1371,7 @@ public final class SQLiteDatabase extends SQLiteClosable {
/**
* Convenience method for replacing a row in the database.
+ * Inserts a new row if a row does not already exist.
*
* @param table the table in which to replace the row
* @param nullColumnHack optional; may be <code>null</code>.
@@ -1381,7 +1382,7 @@ public final class SQLiteDatabase extends SQLiteClosable {
* provides the name of nullable column name to explicitly insert a NULL into
* in the case where your <code>initialValues</code> is empty.
* @param initialValues this map contains the initial column values for
- * the row.
+ * the row. The keys should be the column names and the values the column values.
* @return the row ID of the newly inserted row, or -1 if an error occurred
*/
public long replace(String table, String nullColumnHack, ContentValues initialValues) {
@@ -1396,6 +1397,7 @@ public final class SQLiteDatabase extends SQLiteClosable {
/**
* Convenience method for replacing a row in the database.
+ * Inserts a new row if a row does not already exist.
*
* @param table the table in which to replace the row
* @param nullColumnHack optional; may be <code>null</code>.
@@ -1406,7 +1408,7 @@ public final class SQLiteDatabase extends SQLiteClosable {
* provides the name of nullable column name to explicitly insert a NULL into
* in the case where your <code>initialValues</code> is empty.
* @param initialValues this map contains the initial column values for
- * the row. The key
+ * the row. The keys should be the column names and the values the column values.
* @throws SQLException
* @return the row ID of the newly inserted row, or -1 if an error occurred
*/
@@ -1740,7 +1742,7 @@ public final class SQLiteDatabase extends SQLiteClosable {
* Returns true if the new version code is greater than the current database version.
*
* @param newVersion The new version code.
- * @return True if the new version code is greater than the current database version.
+ * @return True if the new version code is greater than the current database version.
*/
public boolean needUpgrade(int newVersion) {
return newVersion > getVersion();