get_view_link_query = (fields, view) => {
  if (view && view.slug && view.slug.steps && view.slug.steps.length > 0) {
    return (r) => view.slug.steps.map(slug_transform(r)).join("");
  }

  const pk_name = fields.find((f) => f.primary_key).name;

  return (r) => `?${pk_name}=${r[pk_name]}`;
}
@function
@param {Field[]} fields
@returns {function}