Skip to content

More complex Logic #58

Open
Open
@gahula

Description

@gahula

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions