Add with-db macro