code: func (ssa *SQLStorageAuthority) GetOrder(ctx context.Context, req *sapb.OrderRequest) (*corepb.Order, error) {
  	omObj, err := ssa.dbMap.WithContext(ctx).Get(orderModel{}, *req.Id)
  	if err == sql.ErrNoRows || omObj == nil {
  		return nil, berrors.NotFoundError("no order found for ID %d", *req.Id)
  	}
  	if err != nil {
  		return nil, err
  	}
  	order, err := modelToOrder(omObj.(*orderModel))
  	if err != nil {
  		return nil, err
  	}
  	var useV2Authzs bool
  	if req.UseV2Authorizations != nil {
  		useV2Authzs = *req.UseV2Authorizations
  	}
  	v1AuthzIDs, v2AuthzIDs, err := ssa.authzForOrder(ctx, *order.Id, useV2Authzs)
  	if err != nil {
  		return nil, err
  	}
  	order.Authorizations, order.V2Authorizations = v1AuthzIDs, v2AuthzIDs
  
  	names, err := ssa.namesForOrder(ctx, *order.Id)
  	if err != nil {
  		return nil, err
  	}
  	// The requested names are stored reversed to improve indexing performance. We
  	// need to reverse the reversed names here before giving them back to the
  	// caller.
  	reversedNames := make([]string, len(names))
  	for i, n := range names {
  		reversedNames[i] = ReverseName(n)
  	}
  	order.Names = reversedNames
  
  	// Calculate the status for the order
  	status, err := ssa.statusForOrder(ctx, order)
  	if err != nil {
  		return nil, err
  	}
  	order.Status = &status
  
  	return order, nil
  }
docs: // GetOrder is used to retrieve an already existing order object