Add support for saving metadata on queries.

General: Can you truncate the lines at 80 or 100 chars? They're running off the page on Github. I've been meaning to put in linter rules so it's easy to enforce this project-wide.