mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-09 17:57:10 +01:00
19 lines
489 B
Java
19 lines
489 B
Java
|
package User;
|
||
|
|
||
|
import android.arch.persistence.room.Dao;
|
||
|
import android.arch.persistence.room.Insert;
|
||
|
import android.arch.persistence.room.OnConflictStrategy;
|
||
|
import android.arch.persistence.room.Query;
|
||
|
|
||
|
@Dao
|
||
|
public interface UserDao {
|
||
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||
|
void insert(User user);
|
||
|
|
||
|
@Query("DELETE FROM users")
|
||
|
void deleteAllUsers();
|
||
|
|
||
|
@Query("SELECT * FROM users WHERE user_name = :userName LIMIT 1")
|
||
|
User getUserData(String userName);
|
||
|
}
|