blob: ec6bb7e2c0efa44a25dbbb61763f54003039fbb8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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);
}
|