Add support for saving metadata on queries.

I can't tell what's different about this file. What are we adding here?