Sitelet https://web.archive.org/web/20201130043604/https://github.com/encode/orm/issues/51
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 '.exclude()' method #51

Open
rick-pri opened this issue Nov 8, 2019 · 5 comments
Open

Add '.exclude()' method #51

rick-pri opened this issue Nov 8, 2019 · 5 comments

Comments

@rick-pri
Copy link

@rick-pri rick-pri commented Nov 8, 2019

I want to select rows with a query where the values are not None when I've set a field as allow_null=True. It's very possible that I'm missing something and that this can be achieved in another way.

@tomchristie
Copy link
Member

@tomchristie tomchristie commented Nov 8, 2019

Yup, we'd certainly want to add an .exclude() method. (Even if this particular request can be achieved in another way.)

@myusko
Copy link

@myusko myusko commented Jun 17, 2020

@tomchristie @florimondmanca

I would happy to work on the ticket, also one more question how you image the functionality? it would be helpful for me to understand the problem from all corners.

Because, in my head, I have something like

User.filter(...).exclude(address=None).all()
@rafalp
Copy link
Member

@rafalp rafalp commented Jun 17, 2020

@myuz Hi, there's already PR for this issue, with the only issue reported in review being syntax used: #62

If we'll agree that PR is good otherwise I'll be happy to change my review to approved. Or we could fork PR to fix syntax and merge fork instead.

@myusko
Copy link

@myusko myusko commented Jun 17, 2020

Hi @rafalp thanks for sharing it, I'll follow-up PR.

@collerek
Copy link

@collerek collerek commented Oct 22, 2020

Hi,

This project seems stale and from what I saw on encode page it's not a priority right now. Since I was tired with reinventing the wheel and needed something as soon as possible I created ormar package, that was inspired by this one.

Ormar bases its validation on pydantic so it can be used directly with fastapi as response and request models.

This issue was implemented in ormar, so feel free to check it out: https://github.com/collerek/ormar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.