fixes #137 by restructuring generated SQL for bulk delete and update