RealmFuse 0.1.1

RealmFuse 0.1.1

Layman 维护。



 
依赖项
RealmSwift>= 0
Fuse>= 0
 

RealmFuse 0.1.1

  • Layman

RealmFuse

CI Status Version License Platform

在 Realm 中提供 Fuse 搜索 API

定义搜索属性

extension PostModel: Fuseable {
    
    var fuseProperties: [FuseProperty] {
        return [
            FuseProperty(name: "title", weight: 0.34),
            FuseProperty(name: "content", weight: 0.66)
        ]
    }
}

运行查询

var results = realm.objects(PostModel.self).fuseSearch(searchText)

示例

要运行示例项目,首先克隆仓库,然后在 Example 目录中运行 pod install

要求

安装

RealmFuse 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod 'RealmFuse'

作者

普通人,[email protected]

许可协议

RealmFuse遵循MIT许可协议。有关更多信息,请参阅LICENSE文件。