gpt4 book ai didi

ios - Realm 查询如何工作?

转载 作者:行者123 更新时间:2023-11-30 12:12:56 24 4
gpt4 key购买 nike

我正在尝试了解 Realm。

https://academy.realm.io/posts/jp-simard-realm-core-database-engine/

enter image description here

我试图理解说话者的意思我们本质上是在构建一棵树,结果应该是什么样子

我认为他的意思是 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 is only read when the properties are accessed.

所以,Realm仅返回(我相信)Results<Employee>包含过滤的对象,但技术上从 realm-db 读取它们仅在您尝试访问它们的那一刻。

关于ios - Realm 查询如何工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45811595/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com