Fixed detekt findings, removed test code

This commit is contained in:
Melih
2020-03-31 13:25:54 +02:00
parent 927c5c02ca
commit ef05fa7e05
12 changed files with 208 additions and 128 deletions
@@ -10,26 +10,26 @@ import com.melih.definitions.entities.LaunchEntity
* DAO for list of [launches][LaunchEntity]
*/
@Dao
abstract class LaunchesDao {
interface LaunchesDao {
//region Queries
@Query("SELECT * FROM Launches ORDER BY launchStartTime DESC LIMIT :count OFFSET :page*:count")
abstract suspend fun getLaunches(count: Int, page: Int): List<LaunchEntity>
suspend fun getLaunches(count: Int, page: Int): List<LaunchEntity>
@Query("SELECT * FROM Launches WHERE id=:id LIMIT 1")
abstract suspend fun getLaunchById(id: Long): LaunchEntity?
suspend fun getLaunchById(id: Long): LaunchEntity?
@Query("DELETE FROM Launches")
abstract suspend fun nukeLaunches()
suspend fun nukeLaunches()
//endregion
//region Insertion
@Insert(onConflict = OnConflictStrategy.REPLACE)
abstract suspend fun saveLaunches(launches: List<LaunchEntity>)
suspend fun saveLaunches(launches: List<LaunchEntity>)
@Insert(onConflict = OnConflictStrategy.REPLACE)
abstract suspend fun saveLaunch(launch: LaunchEntity)
suspend fun saveLaunch(launch: LaunchEntity)
//endregion
}