@@ -1409,9 +1409,13 @@ public Cursor rawQuery(String sql, String[] selectionArgs,
14091409 * Convenience method for inserting a row into the database.
14101410 *
14111411 * @param table the table to insert the row into
1412- * @param nullColumnHack SQL doesn't allow inserting a completely empty row,
1413- * so if initialValues is empty this column will explicitly be
1414- * assigned a NULL value
1412+ * @param nullColumnHack optional; may be <code>null</code>.
1413+ * SQL doesn't allow inserting a completely empty row without
1414+ * naming at least one column name. If your provided <code>values</code> is
1415+ * empty, no column names are known and an empty row can't be inserted.
1416+ * If not set to null, the <code>nullColumnHack</code> parameter
1417+ * provides the name of nullable column name to explicitly insert a NULL into
1418+ * in the case where your <code>values</code> is empty.
14151419 * @param values this map contains the initial column values for the
14161420 * row. The keys should be the column names and the values the
14171421 * column values
@@ -1430,9 +1434,13 @@ public long insert(String table, String nullColumnHack, ContentValues values) {
14301434 * Convenience method for inserting a row into the database.
14311435 *
14321436 * @param table the table to insert the row into
1433- * @param nullColumnHack SQL doesn't allow inserting a completely empty row,
1434- * so if initialValues is empty this column will explicitly be
1435- * assigned a NULL value
1437+ * @param nullColumnHack optional; may be <code>null</code>.
1438+ * SQL doesn't allow inserting a completely empty row without
1439+ * naming at least one column name. If your provided <code>values</code> is
1440+ * empty, no column names are known and an empty row can't be inserted.
1441+ * If not set to null, the <code>nullColumnHack</code> parameter
1442+ * provides the name of nullable column name to explicitly insert a NULL into
1443+ * in the case where your <code>values</code> is empty.
14361444 * @param values this map contains the initial column values for the
14371445 * row. The keys should be the column names and the values the
14381446 * column values
@@ -1448,11 +1456,15 @@ public long insertOrThrow(String table, String nullColumnHack, ContentValues val
14481456 * Convenience method for replacing a row in the database.
14491457 *
14501458 * @param table the table in which to replace the row
1451- * @param nullColumnHack SQL doesn't allow inserting a completely empty row,
1452- * so if initialValues is empty this row will explicitly be
1453- * assigned a NULL value
1459+ * @param nullColumnHack optional; may be <code>null</code>.
1460+ * SQL doesn't allow inserting a completely empty row without
1461+ * naming at least one column name. If your provided <code>initialValues</code> is
1462+ * empty, no column names are known and an empty row can't be inserted.
1463+ * If not set to null, the <code>nullColumnHack</code> parameter
1464+ * provides the name of nullable column name to explicitly insert a NULL into
1465+ * in the case where your <code>initialValues</code> is empty.
14541466 * @param initialValues this map contains the initial column values for
1455- * the row. The key
1467+ * the row.
14561468 * @return the row ID of the newly inserted row, or -1 if an error occurred
14571469 */
14581470 public long replace (String table , String nullColumnHack , ContentValues initialValues ) {
@@ -1469,9 +1481,13 @@ public long replace(String table, String nullColumnHack, ContentValues initialVa
14691481 * Convenience method for replacing a row in the database.
14701482 *
14711483 * @param table the table in which to replace the row
1472- * @param nullColumnHack SQL doesn't allow inserting a completely empty row,
1473- * so if initialValues is empty this row will explicitly be
1474- * assigned a NULL value
1484+ * @param nullColumnHack optional; may be <code>null</code>.
1485+ * SQL doesn't allow inserting a completely empty row without
1486+ * naming at least one column name. If your provided <code>initialValues</code> is
1487+ * empty, no column names are known and an empty row can't be inserted.
1488+ * If not set to null, the <code>nullColumnHack</code> parameter
1489+ * provides the name of nullable column name to explicitly insert a NULL into
1490+ * in the case where your <code>initialValues</code> is empty.
14751491 * @param initialValues this map contains the initial column values for
14761492 * the row. The key
14771493 * @throws SQLException
@@ -1487,9 +1503,13 @@ public long replaceOrThrow(String table, String nullColumnHack,
14871503 * General method for inserting a row into the database.
14881504 *
14891505 * @param table the table to insert the row into
1490- * @param nullColumnHack SQL doesn't allow inserting a completely empty row,
1491- * so if initialValues is empty this column will explicitly be
1492- * assigned a NULL value
1506+ * @param nullColumnHack optional; may be <code>null</code>.
1507+ * SQL doesn't allow inserting a completely empty row without
1508+ * naming at least one column name. If your provided <code>initialValues</code> is
1509+ * empty, no column names are known and an empty row can't be inserted.
1510+ * If not set to null, the <code>nullColumnHack</code> parameter
1511+ * provides the name of nullable column name to explicitly insert a NULL into
1512+ * in the case where your <code>initialValues</code> is empty.
14931513 * @param initialValues this map contains the initial column values for the
14941514 * row. The keys should be the column names and the values the
14951515 * column values
@@ -1726,10 +1746,10 @@ public int updateWithOnConflict(String table, ContentValues values,
17261746
17271747 /**
17281748 * Execute a single SQL statement that is not a query. For example, CREATE
1729- * TABLE, DELETE, INSERT, etc. Multiple statements separated by ;s are not
1730- * supported. it takes a write lock
1749+ * TABLE, DELETE, INSERT, etc. Multiple statements separated by semicolons are not
1750+ * supported. Takes a write lock.
17311751 *
1732- * @throws SQLException If the SQL string is invalid for some reason
1752+ * @throws SQLException if the SQL string is invalid
17331753 */
17341754 public void execSQL (String sql ) throws SQLException {
17351755 BlockGuard .getThreadPolicy ().onWriteToDisk ();
@@ -1760,12 +1780,12 @@ public void execSQL(String sql) throws SQLException {
17601780
17611781 /**
17621782 * Execute a single SQL statement that is not a query. For example, CREATE
1763- * TABLE, DELETE, INSERT, etc. Multiple statements separated by ;s are not
1764- * supported. it takes a write lock,
1783+ * TABLE, DELETE, INSERT, etc. Multiple statements separated by semicolons are not
1784+ * supported. Takes a write lock.
17651785 *
17661786 * @param sql
17671787 * @param bindArgs only byte[], String, Long and Double are supported in bindArgs.
1768- * @throws SQLException If the SQL string is invalid for some reason
1788+ * @throws SQLException if the SQL string is invalid
17691789 */
17701790 public void execSQL (String sql , Object [] bindArgs ) throws SQLException {
17711791 BlockGuard .getThreadPolicy ().onWriteToDisk ();
0 commit comments