Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func recordSelect(){
- //Realmの初期化
- let realm = try! Realm()
- // Realmに保存されてるApiRequest型のオブジェクトを全て取得
- // .filterで検索条件を指定できる。
- let users = realm.objects(User.self).filter("userid contains 'hogehoge'")
- // 取得データを標準出力
- for user in users {
- print("userid: \(user.userid)")
- }
- }
Add Comment
Please, Sign In to add comment