package com.hyperling.roomexample import androidx.room.Dao import androidx.room.Delete import androidx.room.Query import androidx.room.Upsert import kotlinx.coroutines.flow.Flow @Dao interface ContactDao { // 2024-12-28 // If these complain about return type errors, try upgrading // the ROOM version, otherwise remove the SUSPEND keyword. @Upsert suspend fun upsertContact(contact: Contact) @Delete suspend fun deleteContact(contact: Contact) @Query("SELECT * FROM contact ORDER BY firstName ASC") fun selectContactsFN(): Flow> @Query("SELECT * FROM contact ORDER BY lastName ASC") fun selectContactsLN(): Flow> @Query("SELECT * FROM contact ORDER BY phoneNumber ASC") fun selectContactsPN(): Flow> }