FragmentT) } internal object ProfileMiniFragmentMerger : Merger<ProfileMiniFragment> { override fun Db.merge(fragment: ProfileMiniFragment) { profilePageQueries.upsertFragment( userId = UserId(fragment.userId), // ... ) } } // Repository fun fetchMiniList() { val miniList = api.query(GetProfileMiniListQuery()) db.transaction { miniList.forEach { db.merge(it) } } } internal object ProfileDetailFragmentMerger : Merger<ProfileDetailFragment> { override fun Db.merge(fragment: ProfileDetailFragment) { profilePageQueries.upsertFragment( userId = UserId(fragment.userId), // ... ) } } // Repository fun fetchDetail() { val detail = api.query(GetProfileDetailQuery()) db.merge(detail) } ֦ுؔΛ࣋ͭ object࣮ object֦ுؔΛݺΜͰ͍Δ