code: func (r *GormWorkItemRepository) FindSecondItem(ctx context.Context, order *float64, spaceID uuid.UUID, secondItemDirection DirectionType) (*uuid.UUID, *float64, error) {
  	Item := WorkItemStorage{}
  	var tx *gorm.DB
  	switch secondItemDirection {
  	case DirectionAbove:
  		// Finds the item above which reorder item has to be placed
  		query := fmt.Sprintf(`execution_order = (SELECT max(execution_order) FROM %[1]s WHERE space_id=? AND (execution_order < ?))`, WorkItemStorage{}.TableName())
  		tx = r.db.Where(query, spaceID, order).First(&Item)
  	case DirectionBelow:
  		// Finds the item below which reorder item has to be placed
  		query := fmt.Sprintf("execution_order = (SELECT min(execution_order) FROM %[1]s WHERE space_id=? AND (execution_order > ?))", WorkItemStorage{}.TableName())
  		tx = r.db.Where(query, spaceID, order).First(&Item)
  	default:
  		return nil, nil, nil
  	}
  	if tx.RecordNotFound() {
  		// Item is placed at first or last position
  		ItemID := Item.ID
  		return &ItemID, nil, nil
  	}
  	if tx.Error != nil {
  		return nil, nil, errors.NewInternalError(ctx, tx.Error)
  	}
  	ItemID := Item.ID
  	return &ItemID, &Item.ExecutionOrder, nil
  }
docs: // FindSecondItem returns the order of the second workitem required to reorder.
  // Reordering a workitem requires order of two closest workitems: above and below.
  // If direction == "above", then
  //	FindFirstItem returns the value above which reorder item has to be placed
  //      FindSecondItem returns the value below which reorder item has to be placed
  // If direction == "below", then
  //	FindFirstItem returns the value below which reorder item has to be placed
  //      FindSecondItem returns the value above which reorder item has to be placed