简体   繁体   English

使用CoreData从SQLite视图中获取数据

[英]Fetch data from a SQLite View with CoreData

Is it possible with Core-Data to fetch data from a view ? Core-Data是否有可能从视图中获取数据? (I mean a SQLite View) (我的意思是一个SQLite视图)

On the first launch of my iOS app, I load data from a single SQLite file into my Core-Data store, but in this sqlite file, I also have a view. 在我的iOS应用程序首次启动时,我将数据从单个SQLite文件加载到Core-Data存储中,但是在此sqlite文件中,我也有一个视图。 How can I handle this with Core-Data ? 如何使用Core-Data处理呢?

I would like to be able to fetch data from this view. 我希望能够从该视图中获取数据。

A view is really nothing but a select statement. 视图实际上只是选择语句。 Just sync these separately using simple SQL strings. 只需使用简单的SQL字符串分别同步它们即可。 You can store them as FetchRequestTemplates in your Core Data model. 您可以将它们作为FetchRequestTemplates存储在核心数据模型中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM