Android SQLite: nullColumnHack parameter in insert/replace methods
- by poke
The Android SDK has some convenience methods for manipulating data with SQLite. However both the insert and replace methods use some nullColumnHack parameter which usage I don't understand.
The documentation explains it with the following, but what if a table has multiple columns that allow NULL? I really don't get it :/
SQL doesn't allow inserting a completely empty row, so if initialValues is empty this column [/row for replace] will explicitly be assigned a NULL value