question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JAVA Documentation "logical operators" subsection of "Queries" has a sample with method that doesn't exist

See original GitHub issue

Goal

Correction on Realm JAVA documentation 3.7.2

Expected Results

With this particular query, though, it’s easier to use in:

RealmResult<User> r = realm.where(User.class)
                           .not()
                           .in("name", new String[]{"Peter", "Jo"})
                           findAll();


Actual Results

With this particular query, though, it’s easier to use in:

RealmResult<User> r = realm.where(User.class)
                           .not()
                           .in("name", new String[]{"Peter", "Jo"})
                           finalAll();


finalAll() doesn’t exist.

Steps & Code to Reproduce

open https://realm.io/docs/java/latest/#filtering Look for Logical operators and see the mistake at “in clause sample”.

Version of Realm and tooling

Realm version(s): 3.7.2 (JAVA DOCUMENTATION)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Zhuindencommented, Oct 14, 2017

@nhachicha

Negate conditions with not. You can use the not operator with beginGroup/endGroup to negate sub-conditions only. If you wanted to all find users who are not named “Peter” or “Jo,” the query could be:

 RealmResult<User> r = realm.where(User.class)
                       .not()
                       .beginGroup()
                            .equalTo("name", "Peter")
                            .or()
                            .contains("name", "Jo")
                        .endGroup()
                        .findAll();
0reactions
nhachichacommented, Oct 14, 2017

@soutoss please do, although I think I’ve fixed all the RealmResult … is it on https://realm.io/docs/java/latest/ ? have you refreshed your cache?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 21 The Java Persistence Query Language
Chapter 21 The Java Persistence Query Language. The Java Persistence query language defines queries for entities and their persistent state.
Read more >
Spring Data JPA - Reference Documentation
Parsing query method names is divided into subject and predicate. The first part ( find…By , exists…By ) defines the subject of the...
Read more >
Log Operators Cheat Sheet | Sumo Logic Docs
The Search Operators cheat sheet provides a list of available Sumo Logic parsers, aggregators, search operators, and mathematical expressions with links to ...
Read more >
Perform simple and compound queries in Cloud Firestore
Cloud Firestore provides powerful query functionality for specifying which documents you want to retrieve from a collection or collection group.
Read more >
Predicate expressions - Splunk Documentation
If your search includes both a WHERE and a HAVING clause, the EXISTS expression must be in the HAVING clause. The EXISTS operator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found