mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-16 01:00:17 +01:00
select a server on tap and refuse to delete the active one
This commit is contained in:
@@ -20,9 +20,6 @@ interface SourcesDao {
|
||||
@Query("SELECT * FROM sources WHERE id = :id")
|
||||
suspend fun sourceOnce(id: Long): Source?
|
||||
|
||||
@Query("SELECT COUNT(*) FROM sources")
|
||||
suspend fun sourceCount(): Int
|
||||
|
||||
@Query("SELECT id FROM sources WHERE isActive = 1 LIMIT 1")
|
||||
fun activeSourceId(): Flow<Long?>
|
||||
|
||||
@@ -32,9 +29,6 @@ interface SourcesDao {
|
||||
@Query("SELECT id FROM sources WHERE isActive = 1 LIMIT 1")
|
||||
suspend fun activeSourceIdOnce(): Long?
|
||||
|
||||
@Query("SELECT id FROM sources ORDER BY createdAt LIMIT 1")
|
||||
suspend fun firstSourceId(): Long?
|
||||
|
||||
@Insert
|
||||
suspend fun insertSource(source: Source): Long
|
||||
|
||||
|
||||
Reference in New Issue
Block a user