Allow attaching listeners to db writes