(#190) - implement attachments=true for query()

Some inline notes below.