putToDb works for Mongo, and maybe other commands.