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

Scan condition operators do not match boto3 condition operators #102

Open
Quidge opened this issue May 1, 2020 · 1 comment
Open

Scan condition operators do not match boto3 condition operators #102

Quidge opened this issue May 1, 2020 · 1 comment

Comments

@Quidge
Copy link

Quidge commented May 1, 2020

I'm looking at the source for DynaModel.scan():

* ``IN``: ``Thing.scan(count__in=[11, 12, 13])``

This is confusingly close to but different than the language for the IN condition operator from boto3 docs:

    def is_in(self, value):
        """Creates a condition where the attribute is in the value,

        :type value: list
        :param value: The value that the attribute is in.
        """
        return In(self, value)

(notice the lack of is_)

When using dynamorm, which of these should I be using? SomeModel.scan(attribute__is_in=['opt1', 'opt2']) or SomeModel.scan(attribute__in=['opt1', 'opt2'])?

I've been receiving odd results using both so I'm trying to rule the usage out first.

@Quidge
Copy link
Author

Quidge commented May 1, 2020

Assuming that PR #101 is correct, this issue would be fixed.

Also, lol. @smtheard and I work at the same co. I didn't know that he had this PR open.

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

No branches or pull requests

1 participant