package com.dklaw.gogo2.database import androidx.room.Dao import androidx.room.Delete import androidx.room.Query import androidx.room.Upsert import kotlinx.coroutines.flow.Flow @Dao interface ContactDAO { @Upsert suspend fun upsertContact(contact : Contact) @Delete suspend fun deleteContact(contact: Contact) @Query("SELECT * FROM contact ORDER BY firstName ASC") fun getContactsOrderByFirstName() : Flow> @Query("SELECT * FROM contact ORDER BY lastName ASC") fun getContactsOrderByLastName() : Flow> @Query("SELECT * FROM contact ORDER BY phoneNumber ASC") fun getContactsOrderByPhoneNumber() : Flow> }