ujjwalguptaofficial / JsStore

Simplifying IndexedDB with SQL like syntax and promises
http://jsstore.net/
MIT License
858 stars 110 forks source link

Can't figure out how to search same field for multiple values #193

Closed kwlayman closed 3 years ago

kwlayman commented 3 years ago

How to construct where clause to search for multiple values in array type multientry field?

I have a TAGS array-type field, multiEntry.

How do I construct a where clause to do an AND search for multiple tags?

kwlayman commented 3 years ago

Need something like below but apparently AND is not supported like this: where:{ TAGS: 'test1', and:{ TAGS:'test2' } }

ujjwalguptaofficial commented 3 years ago

have you tried ?

where: [{
    TAGS: 'test1'
}, {
    TAGS: 'test2'
}]
kwlayman commented 3 years ago

That works! Thanks!