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

Add warning about skipped conditions #352

Merged
merged 2 commits into from
May 10, 2019

Conversation

andrykonchin
Copy link
Member

The issue - both Query and Scan operations support only one condition for an attribute. Actually they support more than one Dynamoid uses deprecated options QueryFilter and ScanFilter to specify conditions and they don't support.

So here I added warning messages when user mistakenly specifies several conditions for the one field in the where method and only the last condition wins - other are ignored.

Following cases are handled:

  • where('age.gt': 10, 'age.lt': 20)
  • where('age.gt': 10).where('age.lt': 2)

The warning message looks like:

Where conditions may contain only one condition for an attribute.
Following conditions are ignored: {:"age.gt"=>2}`

@andrykonchin andrykonchin merged commit eaeb37c into master May 10, 2019
@andrykonchin andrykonchin deleted the add-warning-about-skipped-conditions branch May 10, 2019 20:22
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.

1 participant