Update Query interface to support returning error
Add PutDocument function for storing full maps/structs