Deleting rows from tables is straight forward:
db(delete_from(tab).where(tab.alpha == 35));The where clause specifies which rows should be affected.
where can be called with a dynamic argument. In case the
dynamic condition is false, no WHERE will be included in the serialized
statement.
Note
Each of the connectors is offering a specialized version of delete.
If you want to delete all rows from a table, the truncate function might be the faster option.
db(truncate(tab));Note
sqlite3 does not support TRUNCATE. The sqlite3/SQLCipher connector
therefore serializes this as unconditional DELETE FROM.