realm.io数据库是否支持多列索引或排序索引? [英] Does the realm.io database support multi column indexes or sorted indexes?

查看:256
本文介绍了realm.io数据库是否支持多列索引或排序索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

realm.io数据库是否支持多列索引或排序索引?

Does the realm.io database support multi column indexes or sorted indexes?

文档没有提及这些功能,但是由于Realm被计费为替代核心数据.

The documentation does not mention these features, but that seems odd since Realm is billed as a replacement for core data.

推荐答案

是的!

    通过
  1. Realm,您可以通过覆盖indexedProperties类方法并返回要索引的属性名称的数组来在单个对象类中定义多个索引属性. Realm在文档此处中提到了这一点.

  1. Realm lets you define multiple indexed properties in a single object class by overriding the indexedProperties class method and returning an array of the names of the properties you wish to index. Realm mentions this in the documentation here.

查询一组对象后,可以使用[RLMResults sortedResultsUsingProperty:ascending:]按索引(或与此相关的任何其他属性)对对象进行排序. 此处.

You can sort objects by an index (Or any other property for that matter) by using the [RLMResults sortedResultsUsingProperty:ascending:] after querying for a group of objects. That's covered in the documentation here.

如果您需要任何其他说明,请告诉我. :)

Please let me know if you require any additional clarification. :)

这篇关于realm.io数据库是否支持多列索引或排序索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆