Creating queries with complex 'and' and 'or' combinations
See original GitHub issueAccording to QueryBuilder documentation, we can define the order of logical operations using implicit and(). However, this implementation does not allow us to create complex conditions, such as (A and B) or (C and D)
. This comment provides a workaround, but having Realm-like chainable queries would be much nicer. Is changing existing QueryBuilder mechanics planned in future versions?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:17 (11 by maintainers)
Top Results From Across the Web
Use a union query to combine multiple queries into a single ...
Create a union query by creating and combining select queries · On the Create tab, in the Queries group, click Query Design. ·...
Read more >SQL VIEWS + Complex Queries, Cross Joins, Unions, and more!
In SQL, a VIEW is a virtual table. It lets you package a complex query into a single table. We will discuss several...
Read more >10.1. Combination Queries to Consider After Unary Operators
In this chapter we will review some of the important points about the unary operators while presenting some more queries, including slightly more...
Read more >Learn SQL: How to Write a Complex SELECT Query
Think of it as of LEGO bricks and build the query that way. · Identify all the tables you'll need in the query...
Read more >TOP-70 Most Important SQL Queries in 2022 - ByteScout
The order by clause is used to sort the data from the table. The order by clause should always be used in the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, the query API subject to changes and this will be solved, of course. 😃 P.S.: if you don’t have a very big amount of entities, a more convenient work around are query filters.
3.0.0-alpha1
has a preview of a new Query API that supports nested conditions. We welcome feedback! https://docs.objectbox.io/#v-3-0-0-alpha1-2020-03-09 https://docs.objectbox.io/queries#new-query-apiAn example for
(A and B) or (C and D)
: