在Core Programming Data Guide下Fetched Properties section 中有一个段落说明了以下内容。
The most significant constraint is that you cannot use substitutions to change the structure of the predicate—for example you cannot change a LIKE predicate to a compound predicate, nor can you change the operator (in this example, LIKE [c]). Moreover, in Mac OS X version 10.4, this only works with the XML and Binary stores as the SQLite store will not generate the appropriate SQL.
最后一句指出“这只适用于 XML 和二进制存储”。这是说 Fetched Properties 仅适用于 XML 和二进制存储或文档的其他部分吗?
您可以将获取的属性用于 SQLite 存储吗?
最佳答案
长话短说:是的,您可以将获取的属性用于 SQLite 存储。
本段提到的“替代”,在前两段中都有描述。它基本上是说 Core Data 允许替换谓词表达式,例如将 Cambridge 更改为 Durham,但不允许更改谓词类型。所以一旦你设置了一个谓词
A like B
A
和 B
可以改变,但是 like
不能。
关于 OS X 10.4 的一点意味着表达式替换可用于 XML 和二进制存储,但不能用于 SQL 存储。更高版本的操作系统也支持替换 SQL 存储。
关于ios - 使用 SQLite 存储获取核心数据属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8514794/