ios CoreData模型中的Fetch Index元素是什么?

5ktev3wc  于 11个月前  发布在  iOS
关注(0)|答案(1)|浏览(85)

在我的xcdatamodel中,在Fetch Index Elements下显示了两个新字段byTitleIndexcompoundIndex。我以前在Xcode中没有见过这一部分。什么是Fetch Index Element?


的数据

fykwrbwg

fykwrbwg1#

Fetch Index Elements是Apple在WWDC 2017上宣布的新索引API的一部分。它们允许您指定一个或多个Index Elements;用于创建索引以加快数据库搜索的属性。在您的情况下,“title”属性将用于在“Passage”实体下创建名为“compoundIndex”的索引,从而加快标题搜索。
公告:https://developer.apple.com/videos/play/wwdc2017/210/?time=628
演示:https://developer.apple.com/videos/play/wwdc2017/210/?time=997
文档:https://developer.apple.com/documentation/coredata/nsmanagedobjectmodel#2888062

相关问题