delete()
uses the passed in whereClause
to construct an SQL statement like DELETE FROM <tablename> WHERE <whereClause>
. In case the passed in whereClause
is null
, the WHERE <whereClause>
is omitted and all rows are deleted.
Your getWhereClause()
constructs an expression that can be used as whereClause
, comparing a column to a specified string literal value, like foo="bar"
. If either one is null or empty, a null whereClause
is returned so all rows are matched.