android.arch.persistence.room.Query Java Examples

The following examples show how to use android.arch.persistence.room.Query. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EarthquakeDAO.java    From Wrox-ProfessionalAndroid-4E with Apache License 2.0 5 votes vote down vote up
@Query("SELECT mId as _id, " +
         "mDetails as suggest_text_1, " +
         "mId as suggest_intent_data_id " +
         "FROM earthquake " +
         "WHERE mDetails LIKE :query " +
         "ORDER BY mdate DESC")
public Cursor generateSearchSuggestions(String query);
 
Example #2
Source File: TopicDetailDao.java    From JReadHub with GNU General Public License v3.0 5 votes vote down vote up
@Query("DELETE FROM topic_detail WHERE id = :topicId")
void deleteTopicById(@NonNull String topicId);
 
Example #3
Source File: AppPermissionDao.java    From notSABS with MIT License 4 votes vote down vote up
@Query("SELECT * FROM AppPermission")
List<AppPermission> getAll();
 
Example #4
Source File: BitsharesDao.java    From guarda-android-wallets with GNU General Public License v3.0 4 votes vote down vote up
@Query("select * from balance where type = 1")
List<BitsharesAsset> queryOrderBalance();
 
Example #5
Source File: CredentialDao.java    From android-webauthn-authenticator with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Query("SELECT * FROM credentials")
public abstract List<PublicKeyCredentialSource> getAll();
 
Example #6
Source File: EarthquakeDAO.java    From Wrox-ProfessionalAndroid-4E with Apache License 2.0 4 votes vote down vote up
@Query("SELECT * FROM earthquake ORDER BY mDate DESC")
List<Earthquake> loadAllEarthquakesBlocking();
 
Example #7
Source File: AppDao.java    From cashuwallet with MIT License 4 votes vote down vote up
@Query("SELECT * FROM `multiwallet` WHERE `coin` = :coin AND `address` = :address LIMIT 1")
Multiwallet findMultiwallet(String coin, String address);
 
Example #8
Source File: PortfolioRepository.java    From Building-Professional-Android-Applications with MIT License 4 votes vote down vote up
@Query("SELECT * FROM StockPortfolioItem")
List<StockPortfolioItem> getPortfolioItems();
 
Example #9
Source File: AdministratorDao.java    From mobikul-standalone-pos with MIT License 4 votes vote down vote up
@Query("UPDATE Administrator SET first_name = :firstName, last_name = :lastName, username = :username WHERE uid = :uId")
void updateAdminById(String firstName, String lastName, String username, int uId);
 
Example #10
Source File: CredentialDao.java    From android-webauthn-authenticator with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Query("SELECT * FROM credentials WHERE id = :id LIMIT 1")
public abstract PublicKeyCredentialSource getById(byte[] id);
 
Example #11
Source File: BitsharesDao.java    From guarda-android-wallets with GNU General Public License v3.0 4 votes vote down vote up
@Query("select * from asset_object where asset_id = :strAssetId ")
BitsharesAssetObject queryAssetObjectById(String strAssetId);
 
Example #12
Source File: NewsDao.java    From JReadHub with GNU General Public License v3.0 4 votes vote down vote up
@Query("DELETE FROM news Where id = :newsId")
void deleteNewsById(@NonNull String newsId);
 
Example #13
Source File: AdministratorDao.java    From mobikul-standalone-pos with MIT License 4 votes vote down vote up
@Query("SELECT * FROM Administrator WHERE uid IN (:AdministratorIds)")
List<Administrator> loadAllByIds(int[] AdministratorIds);
 
Example #14
Source File: HoldCartDao.java    From mobikul-standalone-pos with MIT License 4 votes vote down vote up
@Query("SELECT * FROM HoldCart WHERE holdCartId LIKE (:searchText)")
List<HoldCart> getSearchHoldCart(String searchText);
 
Example #15
Source File: UserDao.java    From Tok-Android with GNU General Public License v3.0 4 votes vote down vote up
@Query("UPDATE users SET login_time=:loginTime WHERE username=:userName")
int updateLoginTime(long loginTime, String userName);
 
Example #16
Source File: HoardDAO.java    From Wrox-ProfessionalAndroid-4E with Apache License 2.0 4 votes vote down vote up
@Query("SELECT * FROM hoard")
public LiveData<List<Hoard>> monitorAllHoards();
 
Example #17
Source File: EarthquakeDAO.java    From Wrox-ProfessionalAndroid-4E with Apache License 2.0 4 votes vote down vote up
@Query("SELECT * " +
         "FROM earthquake " +
         "WHERE mId = :id " +
         "LIMIT 1")
public LiveData<Earthquake> getEarthquake(String id);
 
Example #18
Source File: PortfolioRepository.java    From Building-Professional-Android-Applications with MIT License 4 votes vote down vote up
@Query("SELECT * FROM StockPortfolioItem")
List<StockPortfolioItem> getPortfolioItems();
 
Example #19
Source File: OptionDao.java    From mobikul-standalone-pos with MIT License 4 votes vote down vote up
@Query("UPDATE Options SET option_name = :optionName, option_type = :optionType, option_values = :optionValues WHERE option_id = :oId")
void updateOptionsById(String optionName
        , String optionType
        , String optionValues
        , int oId);
 
Example #20
Source File: CashDrawerDao.java    From mobikul-standalone-pos with MIT License 4 votes vote down vote up
@Query("DELETE FROM CashDrawerModel")
void delete();
 
Example #21
Source File: BlockUrlProviderDao.java    From SABS with MIT License 4 votes vote down vote up
@Query("SELECT * FROM BlockUrlProviders WHERE url = :url")
BlockUrlProvider getByUrl(String url);
 
Example #22
Source File: AppInfoDao.java    From SABS with MIT License 4 votes vote down vote up
@Query("SELECT * FROM AppInfo WHERE disabled = 0 ORDER BY adhellWhitelisted DESC, appName ASC")
LiveData<List<AppInfo>> getAllSortedByWhitelist();
 
Example #23
Source File: BlockUrlProviderDao.java    From notSABS with MIT License 4 votes vote down vote up
@Query("SELECT * FROM BlockUrlProviders WHERE url = :url")
BlockUrlProvider getByUrl(String url);
 
Example #24
Source File: EarthquakeDAO.java    From Wrox-ProfessionalAndroid-4E with Apache License 2.0 4 votes vote down vote up
@Query("SELECT * " +
         "FROM earthquake " +
         "WHERE mId = :id " +
         "LIMIT 1")
public LiveData<Earthquake> getEarthquake(String id);
 
Example #25
Source File: ContactsDao.java    From Tok-Android with GNU General Public License v3.0 4 votes vote down vote up
@Query("delete from friend_contacts")
int delAll();
 
Example #26
Source File: CurrencyDao.java    From mobikul-standalone-pos with MIT License 4 votes vote down vote up
@Query("SELECT * FROM Currency WHERE code IN (:currencyCode)")
List<Currency> loadAllByIds(int[] currencyCode);
 
Example #27
Source File: ContactsDao.java    From Tok-Android with GNU General Public License v3.0 4 votes vote down vote up
@Query("update friend_contacts set received_avatar=:receivedAvatar")
int setAllFriendReceivedAvatar(boolean receivedAvatar);
 
Example #28
Source File: AppInfoDao.java    From SABS with MIT License 4 votes vote down vote up
@Query("SELECT * FROM AppInfo WHERE (appName LIKE :str OR packageName LIKE :str) ORDER BY disabled DESC, appName ASC")
List<AppInfo> getAllAppsWithStrInNameDisabledOrder(String str);
 
Example #29
Source File: ConsumedEntriesDao.java    From privacy-friendly-food-tracker with GNU General Public License v3.0 4 votes vote down vote up
@Query("SELECT * FROM consumedEntries")
List<ConsumedEntries> getAllConsumedEntries();
 
Example #30
Source File: PolicyPackageDao.java    From notSABS with MIT License 4 votes vote down vote up
@Query("SELECT * FROM PolicyPackage")
LiveData<PolicyPackage> getAllLiveData();