Remove useless "LIMIT 1" on SQL queries
This commit is contained in:
parent
4d126e56a1
commit
f96496e22d
|
@ -8,7 +8,7 @@ interface InstanceDao {
|
|||
@Query("SELECT * FROM instances")
|
||||
fun getAll(): List<InstanceDatabaseEntity>
|
||||
|
||||
@Query("SELECT * FROM instances WHERE uri=:instanceUri LIMIT 1")
|
||||
@Query("SELECT * FROM instances WHERE uri=:instanceUri")
|
||||
fun getInstance(instanceUri: String): InstanceDatabaseEntity
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,7 +27,7 @@ interface UserDao {
|
|||
@Query("SELECT * FROM users")
|
||||
fun getAll(): List<UserDatabaseEntity>
|
||||
|
||||
@Query("SELECT * FROM users WHERE isActive=1 LIMIT 1")
|
||||
@Query("SELECT * FROM users WHERE isActive=1")
|
||||
fun getActiveUser(): UserDatabaseEntity?
|
||||
|
||||
@Query("UPDATE users SET isActive=0")
|
||||
|
@ -39,6 +39,6 @@ interface UserDao {
|
|||
@Query("DELETE FROM users WHERE isActive=1")
|
||||
fun deleteActiveUsers()
|
||||
|
||||
@Query("SELECT * FROM users WHERE user_id=:id AND instance_uri=:instance_uri LIMIT 1")
|
||||
@Query("SELECT * FROM users WHERE user_id=:id AND instance_uri=:instance_uri")
|
||||
fun getUserWithId(id: String, instance_uri: String): UserDatabaseEntity
|
||||
}
|
Loading…
Reference in New Issue