ujjwalguptaofficial / JsStore

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

Problems performing a query using 'OR'. #338

Closed ujjwalguptaofficial closed 1 year ago

ujjwalguptaofficial commented 1 year ago

Discussed in https://github.com/ujjwalguptaofficial/JsStore/discussions/337

Originally posted by **vitorvk2** July 17, 2023 I noticed that in version 4.5.7 there is a problem where using 'OR' in Where within a relationship does not work, and it is not possible to retrieve the additional results. Making use of the demo environment https://ujjwalguptaofficial.github.io/idbstudio/ we can place this query: ``` select({ from: 'Orders', join: { with: 'Customers', on: "Orders.customerId=Customers.customerId", where: { country: 'Mexico', or: { city: 'London' } } } }); ``` Note that it will only return results for 'Mexico' and the city of 'London' will not be returned. The interesting thing is that in the common Where (without being inside a JOIN) it works properly.
ujjwalguptaofficial commented 1 year ago

I have fixed this issue and released a new version - 4.5.8. Please install and let me know.