mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
Repositories Dao作成
This commit is contained in:
1 file changed
+25
@@ -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);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user