Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Add «OR» operator #82

@jpbecotte

Description

@jpbecotte

A query can accepts many operands, like the following example:

var queryString = JSON.stringify({
  table: 'book',
  query: [
    	[ 'title', 'match', '^Harry Potter.*' ],
        [ 'price', 'lt', 15.30 ]
    ]
});
ds.record.getList( 'search?' + queryString );

But each opererand is executed like if they where seperated by a «AND» operator.

In SQL, this would results in the following WHERE clause: title LIKE 'Harry Potter%' AND price < 15.30.

I would like to be able to combine two operands with an «OR» operator. Something like ['or', ['title', 'eq', 'A title'], ['price', 'lt', 15.30]]would mean : Give me the list of all books that have 'A title' or that the price is less than 15.30.

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