如何像sql一样在单个字符串中查询域?

时间:2022-09-18 12:56:10

Im using realm in my iOS application an i want to fire query on silent push notification, query string is given by push. Is it possible to query realm database in single string? like SQL

我在我的iOS应用程序中使用realm我想在静默推送通知上触发查询,查询字符串由push给出。是否可以在单个字符串中查询realm数据库?喜欢SQL

1 个解决方案

#1


2  

You cannot use SQL queries, since Realm is a NoSQL database, but you can use NSPredicates to query it and you can generate an NSPredicate from a string. Have a look at Filtering in the official Realm documentation

您不能使用SQL查询,因为Realm是NoSQL数据库,但您可以使用NSPredicates查询它,并且您可以从字符串生成NSPredicate。看一下官方Realm文档中的Filtering

#1


2  

You cannot use SQL queries, since Realm is a NoSQL database, but you can use NSPredicates to query it and you can generate an NSPredicate from a string. Have a look at Filtering in the official Realm documentation

您不能使用SQL查询,因为Realm是NoSQL数据库,但您可以使用NSPredicates查询它,并且您可以从字符串生成NSPredicate。看一下官方Realm文档中的Filtering