mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
Repositories Dao作成
This commit is contained in:
parent
b49dda2e18
commit
0804bfb8f6
|
@ -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);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user