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

More complex Logic #58

Open
gahula opened this issue Aug 11, 2015 · 1 comment
Open

More complex Logic #58

gahula opened this issue Aug 11, 2015 · 1 comment

Comments

@gahula
Copy link

gahula commented Aug 11, 2015

Currently looking at your test

it('complex or', function() {
expect(StatementsPg.select(model, {
'name.equals': 'John',
'$or': { 'field.equals': 'hi', 'age.equals': 18, 'index.gt': 42 },
'email.ne': '[email protected]'
}, {}, []))
.to.be("SELECT * FROM "model_name" WHERE name = $1 AND (field = $2 OR age = $3 OR index > $4) AND email <> $5;");
})

Is it possible to have ($1 AND $2) OR ($3 AND $4) for SELECT ?

@thadclay
Copy link
Collaborator

Currently that is not possible.

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