スキーマ更新, Dao更新

This commit is contained in:
ろむねこ 2024-01-17 12:11:12 +09:00
parent 8c9dc14f16
commit c82952f397
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168
2 changed files with 18 additions and 0 deletions

View File

@ -1,8 +1,23 @@
package one.nem.lacerta.source.database.dao;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import one.nem.lacerta.source.database.entity.FolderEntity;
@Dao
public interface FolderDao {
@Query("SELECT * FROM Folder WHERE id = :id")
FolderEntity findById(String id);
@Query("SELECT * FROM Folder WHERE public_path = :publicPath")
FolderEntity findByPublicPath(String publicPath);
@Insert
void insert(FolderEntity folderEntity);
@Insert
void insertAll(FolderEntity... folderEntities);
}

View File

@ -16,4 +16,7 @@ public class FolderEntity {
@ColumnInfo(name = "title")
public String name; // フォルダ名
@ColumnInfo(name = "public_path")
public String publicPath; // 公開パス
}