Repositories Dao作成

This commit is contained in:
r-ca 2023-12-13 18:44:51 +09:00
parent b49dda2e18
commit 0804bfb8f6
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -0,0 +1,25 @@
package one.nem.lacerta.source.db.dao;
import androidx.room.Dao;
import androidx.room.Query;
import java.util.List;
import one.nem.lacerta.source.db.entity.Repositories;
@Dao
public interface RepositoriesDao {
@Query("SELECT * FROM repositories")
List<Repositories> getAll();
@Query("SELECT * FROM repositories WHERE id IN (:ids)")
List<Repositories> loadAllByIds(int[] ids);
@Query("SELECT * FROM repositories WHERE relative_path LIKE :relativePath LIMIT 1")
Repositories findByRelativePath(String relativePath);
@Query("SELECT * FROM repositories WHERE id LIKE :id LIMIT 1")
Repositories findById(String id);
}