Serializing OP_QUERY message.