Add a delete_by_query method