Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor sumo_internal:get_id_field #293

Merged
merged 2 commits into from
Mar 8, 2017
Merged

Refactor sumo_internal:get_id_field #293

merged 2 commits into from
Mar 8, 2017

Conversation

lucafavatella
Copy link

Please refer to commit message for details.

`lists:member` is [documented as working on
matching](https://github.com/erlang/otp/blob/OTP-19.2.3/lib/stdlib/doc/src/lists.xml#L530),
and I tested that integer does not match to float and viceversa (float
does not match to integer). (I tested integer and float as the deleted
code was using `=:=` as opposed to `==`).
@lucafavatella
Copy link
Author

lucafavatella commented Mar 7, 2017

Do I understand correctly that:

  1. At least one field must have at least id attribute; and there may be more that one field with at least id attribute;
  2. If a field has unique attribute then it must have id attribute too;
  3. There can be at most one field with unique attribute.

@lucafavatella lucafavatella changed the title [WIP] Refactor sumo_internal:get_id_field Refactor sumo_internal:get_id_field Mar 7, 2017
Copy link
Member

@elbrujohalcon elbrujohalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The refactor is correct. I'm not sure about the list of assumptions in your comment, tho.

@cabol cabol merged commit ac5ddf1 into inaka:master Mar 8, 2017
@lucafavatella lucafavatella deleted the refactor-get-id-field branch March 9, 2017 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants