aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/FriendCodeDao.java
blob: 1b0788e71610dcf9072cf314be1ced066b617ed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package me.brysonsteck.wiimmfiwatcher.database;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

import me.brysonsteck.wiimmfiwatcher.model.FriendCode;

@Dao
public interface FriendCodeDao {

    @Query("SELECT * FROM friendcode")
    public List<FriendCode> getAll();

//    @Query("SELECT * FROM friendcodeobj")
//    public FriendCodeObj findByCode(String friendCode);

    @Insert
    public void insert(FriendCode friendCode);

    @Update
    public void update(FriendCode friendCode);

    @Delete
    public void delete(FriendCode friendCode);

    @Query("DELETE FROM friendcode")
    public void nukeTable();

}