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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create "or" statements in the same table/field #48

Open
ibarrae opened this issue Apr 29, 2021 · 1 comment
Open

How to create "or" statements in the same table/field #48

ibarrae opened this issue Apr 29, 2021 · 1 comment

Comments

@ibarrae
Copy link
Contributor

ibarrae commented Apr 29, 2021

Hi again 馃憢

I was wondering how could we create the following query?

select parent.* 
left join child on child.parent_id = parent.id 
where ((child.field > 5 and child.field < 2) or (child.field IS NULL))

I know that there's the "$or" key at the moment but it doesn't seem to do what we need 馃槩.

Thanks in advance again for the help!

@tanweerdev
Copy link
Owner

@ibarrae I think this kind of complex query cant be handled with fat_ecto. But if you have some proposal in mind, please do share

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

2 participants