package org.ntlab.leftoverrecipe.model.db import io.realm.Realm /** * Created by matsumoto_k on 2017/07/06. */ object RecipeDataRealm : RealmBase() { var mRealm: Realm? = null fun insert(recipeData: RecipeData) { mRealm = Realm.getInstance(config) mRealm.use { realm -> realm?.executeTransaction { realm?.copyToRealmOrUpdate(recipeData) } } } }