mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
スキーマ更新, Dao更新
This commit is contained in:
parent
8c9dc14f16
commit
c82952f397
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -16,4 +16,7 @@ public class FolderEntity {
|
|||
@ColumnInfo(name = "title")
|
||||
public String name; // フォルダ名
|
||||
|
||||
@ColumnInfo(name = "public_path")
|
||||
public String publicPath; // 公開パス
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user