chore: downgrade Kotlin to 2.1.0, add KSP support, and migrate Room to KSP
This commit is contained in:
@@ -5,17 +5,20 @@ import androidx.room.Insert
|
||||
import androidx.room.Query
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
import kotlin.jvm.JvmSuppressWildcards
|
||||
|
||||
@Dao
|
||||
@JvmSuppressWildcards
|
||||
interface TelemetryDao {
|
||||
|
||||
@Insert
|
||||
suspend fun insertSession(session: SessionEntity): Long
|
||||
|
||||
@Query("UPDATE sessions SET endTime = :endTime WHERE id = :sessionId")
|
||||
suspend fun endSession(sessionId: Long, endTime: Long)
|
||||
suspend fun endSession(sessionId: Long, endTime: Long): Int
|
||||
|
||||
@Insert
|
||||
suspend fun insertDataPoints(dataPoints: List<TelemetryDataPointEntity>)
|
||||
suspend fun insertDataPoints(dataPoints: List<TelemetryDataPointEntity>): List<Long>
|
||||
|
||||
@Query("SELECT * FROM sessions ORDER BY startTime DESC")
|
||||
fun getAllSessions(): Flow<List<SessionEntity>>
|
||||
@@ -24,5 +27,5 @@ interface TelemetryDao {
|
||||
fun getSessionData(sessionId: Long): Flow<List<TelemetryDataPointEntity>>
|
||||
|
||||
@Query("DELETE FROM sessions WHERE id = :sessionId")
|
||||
suspend fun deleteSession(sessionId: Long)
|
||||
suspend fun deleteSession(sessionId: Long): Int
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user