delete

abstract fun delete(table: String, whereClause: String, whereArgs: Array<String>): Int

Convenience method for deleting rows in the database.

Return

the number of rows affected if a whereClause is passed in, 0 otherwise. To remove all rows and get a count pass "1" as the whereClause.

Parameters

table

The affected table

whereClause

the optional WHERE clause to apply when deleting. Passing null will delete all rows.

whereArgs

You may include ?s in the where clause, which will be replaced by the values from whereArgs. The values will be bound as Strings.


abstract fun delete(table: String): Int

Convenience method for deleting all rows in a table.

Parameters

table

The affected table