code: func (r *GormWorkItemLinkRepository) HasParent(ctx context.Context, childID uuid.UUID, linkType WorkItemLinkType) (bool, error) {
  	var row *sql.Row
  	query := fmt.Sprintf(`
  		SELECT EXISTS (
  			SELECT 1 FROM %[1]s
  			WHERE
  				link_type_id=$1
  				AND target_id=$2
  				AND deleted_at IS NULL
  		)`, WorkItemLink{}.TableName())
  	row = r.db.CommonDB().QueryRow(query, linkType.ID, childID)
  	var exists bool
  	if err := row.Scan(&exists); err != nil {
  		return false, errs.Wrapf(err, "failed to check if a parent exists for the work item %d", childID)
  	}
  	return exists, nil
  }
docs: // HasParent returns `true` if a link to a work item with the given `childID`
  // and of the given `linkType` already exists; `false` otherwise.