Adding an example of querying in C++ README#33
Open
MarcusSorealheis wants to merge 2 commits intorealm:mainfrom
Open
Adding an example of querying in C++ README#33MarcusSorealheis wants to merge 2 commits intorealm:mainfrom
MarcusSorealheis wants to merge 2 commits intorealm:mainfrom
Conversation
dacharyc
reviewed
Dec 12, 2022
README.md
Outdated
| auto realm = realm::open<Person, Dog>({.path=path}); | ||
| auto results = realm.objects<Person>().where("age > $0", {20}); | ||
|
|
||
| return results.size(); |
Contributor
There was a problem hiding this comment.
Hey Marcus - saw you put this up - it's nice to see an example of query here. For what it's worth, I and a couple other folks on the docs team have started working on building out docs for the C++ Alpha and have discovered there's some nuance to using the query results. It would be great to see an example here of doing something with the results, instead of just returning the size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this simple PR, I've added an example for querying in Realm with C++. I recognize that there are other ways to accomplish the same thing and I also recognize that I may not have built things the best way. I saw the issue open as I was digging into Realm and thought I could put this up for good measure while it was top of mind. :)