Dao修正のクエリ修正

This commit is contained in:
ろむねこ 2023-12-14 11:13:44 +09:00
parent 374986816f
commit ca82fe5e55
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -16,13 +16,13 @@ public interface TagDao {
// Select // Select
@Query("SELECT * FROM TagEntity WHERE id = :id") @Query("SELECT * FROM Tag WHERE id = :id")
TagEntity findById(String id); TagEntity findById(String id);
@Query("SELECT * FROM TagEntity") @Query("SELECT * FROM Tag")
ArrayList<TagEntity> findAll(); ArrayList<TagEntity> findAll();
@Query("SELECT * FROM TagEntity WHERE id IN (:ids)") @Query("SELECT * FROM Tag WHERE id IN (:ids)")
ArrayList<TagEntity> findByIds(ArrayList<String> ids); ArrayList<TagEntity> findByIds(ArrayList<String> ids);
// Insert // Insert
@ -55,6 +55,6 @@ public interface TagDao {
@Delete @Delete
void deleteAll(List<TagEntity> tags); void deleteAll(List<TagEntity> tags);
@Query("DELETE FROM TagEntity WHERE id = :id") @Query("DELETE FROM Tag WHERE id = :id")
void deleteById(String id); void deleteById(String id);
} }