Thunkify wrapper for tiny database