diff options
author | Brad Fitzpatrick <bradfitz@android.com> | 2011-01-05 13:52:53 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-05 13:52:53 -0800 |
commit | 3a2c6bf0fcae9421cccf113ff972df7aaeb6d3e9 (patch) | |
tree | 9cb0833fdaf4da5a536f4f1cb8ad57cf31c9a07f /core/java/android/database/sqlite | |
parent | 978e41fccf278bb64c5204d80d8de95c9bf2e3d5 (diff) | |
parent | 69ea4e15e52c456537575d21443ac1efdb03a902 (diff) | |
download | frameworks_base-3a2c6bf0fcae9421cccf113ff972df7aaeb6d3e9.zip frameworks_base-3a2c6bf0fcae9421cccf113ff972df7aaeb6d3e9.tar.gz frameworks_base-3a2c6bf0fcae9421cccf113ff972df7aaeb6d3e9.tar.bz2 |
am 69ea4e15: Documentation fixes found over vacation hacking.
* commit '69ea4e15e52c456537575d21443ac1efdb03a902':
Documentation fixes found over vacation hacking.
Diffstat (limited to 'core/java/android/database/sqlite')
-rw-r--r-- | core/java/android/database/sqlite/SQLiteDatabase.java | 64 |
1 files changed, 42 insertions, 22 deletions
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index cdc9bbb..a0e9d02 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -1409,9 +1409,13 @@ public class SQLiteDatabase extends SQLiteClosable { * Convenience method for inserting a row into the database. * * @param table the table to insert the row into - * @param nullColumnHack SQL doesn't allow inserting a completely empty row, - * so if initialValues is empty this column will explicitly be - * assigned a NULL value + * @param nullColumnHack optional; may be <code>null</code>. + * SQL doesn't allow inserting a completely empty row without + * naming at least one column name. If your provided <code>values</code> is + * empty, no column names are known and an empty row can't be inserted. + * If not set to null, the <code>nullColumnHack</code> parameter + * provides the name of nullable column name to explicitly insert a NULL into + * in the case where your <code>values</code> is empty. * @param values this map contains the initial column values for the * row. The keys should be the column names and the values the * column values @@ -1430,9 +1434,13 @@ public class SQLiteDatabase extends SQLiteClosable { * Convenience method for inserting a row into the database. * * @param table the table to insert the row into - * @param nullColumnHack SQL doesn't allow inserting a completely empty row, - * so if initialValues is empty this column will explicitly be - * assigned a NULL value + * @param nullColumnHack optional; may be <code>null</code>. + * SQL doesn't allow inserting a completely empty row without + * naming at least one column name. If your provided <code>values</code> is + * empty, no column names are known and an empty row can't be inserted. + * If not set to null, the <code>nullColumnHack</code> parameter + * provides the name of nullable column name to explicitly insert a NULL into + * in the case where your <code>values</code> is empty. * @param values this map contains the initial column values for the * row. The keys should be the column names and the values the * column values @@ -1448,11 +1456,15 @@ public class SQLiteDatabase extends SQLiteClosable { * Convenience method for replacing a row in the database. * * @param table the table in which to replace the row - * @param nullColumnHack SQL doesn't allow inserting a completely empty row, - * so if initialValues is empty this row will explicitly be - * assigned a NULL value + * @param nullColumnHack optional; may be <code>null</code>. + * SQL doesn't allow inserting a completely empty row without + * naming at least one column name. If your provided <code>initialValues</code> is + * empty, no column names are known and an empty row can't be inserted. + * If not set to null, the <code>nullColumnHack</code> parameter + * 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. * @return the row ID of the newly inserted row, or -1 if an error occurred */ public long replace(String table, String nullColumnHack, ContentValues initialValues) { @@ -1469,9 +1481,13 @@ public class SQLiteDatabase extends SQLiteClosable { * Convenience method for replacing a row in the database. * * @param table the table in which to replace the row - * @param nullColumnHack SQL doesn't allow inserting a completely empty row, - * so if initialValues is empty this row will explicitly be - * assigned a NULL value + * @param nullColumnHack optional; may be <code>null</code>. + * SQL doesn't allow inserting a completely empty row without + * naming at least one column name. If your provided <code>initialValues</code> is + * empty, no column names are known and an empty row can't be inserted. + * If not set to null, the <code>nullColumnHack</code> parameter + * 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 * @throws SQLException @@ -1487,9 +1503,13 @@ public class SQLiteDatabase extends SQLiteClosable { * General method for inserting a row into the database. * * @param table the table to insert the row into - * @param nullColumnHack SQL doesn't allow inserting a completely empty row, - * so if initialValues is empty this column will explicitly be - * assigned a NULL value + * @param nullColumnHack optional; may be <code>null</code>. + * SQL doesn't allow inserting a completely empty row without + * naming at least one column name. If your provided <code>initialValues</code> is + * empty, no column names are known and an empty row can't be inserted. + * If not set to null, the <code>nullColumnHack</code> parameter + * 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 keys should be the column names and the values the * column values @@ -1726,10 +1746,10 @@ public class SQLiteDatabase extends SQLiteClosable { /** * Execute a single SQL statement that is not a query. For example, CREATE - * TABLE, DELETE, INSERT, etc. Multiple statements separated by ;s are not - * supported. it takes a write lock + * TABLE, DELETE, INSERT, etc. Multiple statements separated by semicolons are not + * supported. Takes a write lock. * - * @throws SQLException If the SQL string is invalid for some reason + * @throws SQLException if the SQL string is invalid */ public void execSQL(String sql) throws SQLException { BlockGuard.getThreadPolicy().onWriteToDisk(); @@ -1760,12 +1780,12 @@ public class SQLiteDatabase extends SQLiteClosable { /** * Execute a single SQL statement that is not a query. For example, CREATE - * TABLE, DELETE, INSERT, etc. Multiple statements separated by ;s are not - * supported. it takes a write lock, + * TABLE, DELETE, INSERT, etc. Multiple statements separated by semicolons are not + * supported. Takes a write lock. * * @param sql * @param bindArgs only byte[], String, Long and Double are supported in bindArgs. - * @throws SQLException If the SQL string is invalid for some reason + * @throws SQLException if the SQL string is invalid */ public void execSQL(String sql, Object[] bindArgs) throws SQLException { BlockGuard.getThreadPolicy().onWriteToDisk(); |