aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-08-26 07:58:38 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-08-26 07:58:38 +0000
commitd30afcb961a8cd81ed00ad51de459b05fe708dbd (patch)
tree2ef0dd4853546da3bc35e4dff3256746f74411cb /app/src
parent285bb0c385a3f46566491a7da5e58ef2fb840d44 (diff)
downloadinfinity-for-reddit-d30afcb961a8cd81ed00ad51de459b05fe708dbd.tar
infinity-for-reddit-d30afcb961a8cd81ed00ad51de459b05fe708dbd.tar.gz
infinity-for-reddit-d30afcb961a8cd81ed00ad51de459b05fe708dbd.tar.bz2
infinity-for-reddit-d30afcb961a8cd81ed00ad51de459b05fe708dbd.tar.lz
infinity-for-reddit-d30afcb961a8cd81ed00ad51de459b05fe708dbd.tar.xz
infinity-for-reddit-d30afcb961a8cd81ed00ad51de459b05fe708dbd.tar.zst
infinity-for-reddit-d30afcb961a8cd81ed00ad51de459b05fe708dbd.zip
Add COLLATE NOCASE to some sqlite syntaxes.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubreddit/SubscribedSubredditDao.java8
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserDatabase/SubscribedUserDao.java10
2 files changed, 9 insertions, 9 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubreddit/SubscribedSubredditDao.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubreddit/SubscribedSubredditDao.java
index aa62e088..225c4cb4 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubreddit/SubscribedSubredditDao.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubreddit/SubscribedSubredditDao.java
@@ -19,15 +19,15 @@ public interface SubscribedSubredditDao {
@Query("SELECT * from subscribed_subreddits WHERE username = :accountName ORDER BY name COLLATE NOCASE ASC")
LiveData<List<SubscribedSubredditData>> getAllSubscribedSubreddits(String accountName);
- @Query("SELECT * from subscribed_subreddits WHERE username = :accountName ORDER BY name COLLATE NOCASE ASC")
+ @Query("SELECT * from subscribed_subreddits WHERE username = :accountName COLLATE NOCASE ORDER BY name COLLATE NOCASE ASC")
List<SubscribedSubredditData> getAllSubscribedSubredditsList(String accountName);
- @Query("SELECT * from subscribed_subreddits WHERE username = :accountName AND is_favorite = 1 ORDER BY name COLLATE NOCASE ASC")
+ @Query("SELECT * from subscribed_subreddits WHERE username = :accountName COLLATE NOCASE AND is_favorite = 1 ORDER BY name COLLATE NOCASE ASC")
LiveData<List<SubscribedSubredditData>> getAllFavoriteSubscribedSubreddits(String accountName);
- @Query("SELECT * from subscribed_subreddits WHERE name = :subredditName AND username = :accountName COLLATE NOCASE LIMIT 1")
+ @Query("SELECT * from subscribed_subreddits WHERE name = :subredditName COLLATE NOCASE AND username = :accountName COLLATE NOCASE LIMIT 1")
SubscribedSubredditData getSubscribedSubreddit(String subredditName, String accountName);
- @Query("DELETE FROM subscribed_subreddits WHERE name = :subredditName AND username = :accountName")
+ @Query("DELETE FROM subscribed_subreddits WHERE name = :subredditName COLLATE NOCASE AND username = :accountName COLLATE NOCASE")
void deleteSubscribedSubreddit(String subredditName, String accountName);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserDatabase/SubscribedUserDao.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserDatabase/SubscribedUserDao.java
index 661eb988..66660b8c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserDatabase/SubscribedUserDao.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserDatabase/SubscribedUserDao.java
@@ -13,18 +13,18 @@ public interface SubscribedUserDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
void insert(SubscribedUserData subscribedUserData);
- @Query("SELECT * FROM subscribed_users WHERE username = :accountName ORDER BY name COLLATE NOCASE ASC")
+ @Query("SELECT * FROM subscribed_users WHERE username = :accountName COLLATE NOCASE ORDER BY name COLLATE NOCASE ASC")
LiveData<List<SubscribedUserData>> getAllSubscribedUsers(String accountName);
- @Query("SELECT * FROM subscribed_users WHERE username = :accountName ORDER BY name COLLATE NOCASE ASC")
+ @Query("SELECT * FROM subscribed_users WHERE username = :accountName COLLATE NOCASE ORDER BY name COLLATE NOCASE ASC")
List<SubscribedUserData> getAllSubscribedUsersList(String accountName);
- @Query("SELECT * FROM subscribed_users WHERE username = :accountName AND is_favorite = 1 ORDER BY name COLLATE NOCASE ASC")
+ @Query("SELECT * FROM subscribed_users WHERE username = :accountName COLLATE NOCASE AND is_favorite = 1 ORDER BY name COLLATE NOCASE ASC")
LiveData<List<SubscribedUserData>> getAllFavoriteSubscribedUsers(String accountName);
- @Query("SELECT * FROM subscribed_users WHERE name = :name AND username = :accountName COLLATE NOCASE LIMIT 1")
+ @Query("SELECT * FROM subscribed_users WHERE name = :name COLLATE NOCASE AND username = :accountName COLLATE NOCASE LIMIT 1")
SubscribedUserData getSubscribedUser(String name, String accountName);
- @Query("DELETE FROM subscribed_users WHERE name = :name AND username = :accountName")
+ @Query("DELETE FROM subscribed_users WHERE name = :name COLLATE NOCASE AND username = :accountName COLLATE NOCASE")
void deleteSubscribedUser(String name, String accountName);
}