Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static func getInfoById(id: String) -> DataInfo {
- let scope = DataInfo ()
- let realm = try! Realm()
- scope = realm.objects(DataInfo.self).filter("IdInfo == %@", id)
- return scope
- }
- static func getInfoById(id: String) -> DataInfo {
- let realm = try! Realm()
- let scope = realm.objects(DataInfo.self).filter("IdInfo == %@", id)
- return scope.first!
- }
- static func getInfoById(id: String) -> DataInfo? {
- let realm = try! Realm()
- let scope = realm.objects(DataInfo.self).filter("IdInfo == %@", id)
- return scope.first
- }
- static func getInfoById(id: String) -> DataInfo {
- let realm = try! Realm()
- return realm.object(ofType: DataInfo.type, forPrimaryKey: id)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement