Skip to content

Feature request make is_unique - more than one field. #1655

Description

@nowackipawel

As for now is_unique supports only one column like this:

is_unique[t_handbook_subject.hsu_slug,hsu_id,{hsu_id}]

it will be great if we will be able to support sth like this:

is_unique[t_handbook_subject.hsu_slug,hsu_id#hsu_lang,{hsu_id#hsu_lang}]
or at least sth like this:
is_unique[t_handbook_subject.hsu_slug,CONCAT(`hsu_id`,'#',`hsu_lang`),{hsu_id#hsu_lang}]

... for tables where unique keys contains more than one field.

I know that this first idea how to do this is not smart enough... but i didn't think how to realize it in a good way yet.

Required changes:

  • passing entire row to is_unique method,
  • parsing is_unique rule.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions