我正在尝试了解 Realm。
https://academy.realm.io/posts/jp-simard-realm-core-database-engine/
我试图理解说话者的意思 我们本质上是在构建一棵树,结果应该是什么样子
我认为他的意思是 Realm 将读取具有 name 和 fulltime 属性的所有对象,但不会读取任何其他属性,然后检查 name 为 Jack 和 fulltime 是否为 true。 Realm 是否遍历所有对象?
最佳答案
I think he meant that the Realm will read all objects with name and fulltime properties but not any other properties and then checks if the name is Jack and fulltime is true.
不完全是。 Realm 仅获取符合过滤器查询的对象。
Is realm iterating through all objects?
您可以阅读 Realm
docs关于以下查询:
All queries (including queries and property access) are
lazy
in Realm. Data isonly read
when the properties are accessed.
所以,Realm
仅返回(我相信)Results<Employee>
包含过滤的对象,但技术上从 realm-db
读取它们仅在您尝试访问它们的那一刻。
关于ios - Realm 查询如何工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45811595/