@ -29,7 +30,7 @@ public class FileStoreUserServiceTest extends UserServiceTest {
@@ -29,7 +30,7 @@ public class FileStoreUserServiceTest extends UserServiceTest {
@ -24,16 +24,15 @@ public class SqliteUserService extends SqliteStore implements UserService {
@@ -24,16 +24,15 @@ public class SqliteUserService extends SqliteStore implements UserService {
privatestaticfinalStringCOUNT_USERS="SELECT count(*) FROM users";
privatestaticfinalStringLOAD_USER="SELECT * FROM users WHERE uuid = ?";
privatestaticfinalStringLOAD_PERMISSIONS="SELECT permission FROM user_permissions WHERE uuid = ?";
privatestaticfinalStringFIND_USER="SELECT * FROM users WHERE uuid = ? OR username LIKE ? OR realname LIKE ? ORDER BY COALESCE(uuid, ?), username";
privatestaticfinalStringFIND_USER="SELECT * FROM users WHERE uuid = ? OR username LIKE ? OR realname LIKE ? OR email = ? ORDER BY COALESCE(uuid, ?), username";
privatestaticfinalStringLIST_USERS="SELECT * FROM users";
privatestaticfinalStringSELECT_USERSTORE_VERSION="SELECT * FROM metainfo WHERE key = 'user_store_version'";
privatestaticfinalStringSET_USERSTORE_VERSION="UPDATE metainfo SET value = ? WHERE key = 'user_store_version'";
privatestaticfinalStringINSERT_USER="INSERT INTO users (uuid,password,email,session_duration,username,realname) VALUES (?,?,?,?,?,?)";
privatestaticfinalStringINSERT_USER="INSERT INTO users (uuid,password,email,session_duration,username,realname) VALUES (?,?,?,?,?,?) ON CONFLICT DO UPDATE SET password = ?, email = ?, session_duration = ?, username = ?, realname = ?;";
privatestaticfinalStringINSERT_PERMISSIONS="INSERT INTO user_permissions (uuid, permission) VALUES (?,?)";
privatestaticfinalStringDROP_PERMISSIONS="DELETE FROM user_permissions WHERE uuid = ?";
privatestaticfinalStringDROP_USER="DELETE FROM users WHERE uuid = ?";
privatestaticfinalStringUPDATE_PASSWORD="UPDATE users SET password = ? WHERE uuid = ?";
privatestaticfinalStringDROP_PERMISSIONS="DELETE FROM user_permissions WHERE uuid = ?";
privatestaticfinalStringDROP_USER="DELETE FROM users WHERE uuid = ?";
privatestaticfinalStringUPDATE_PASSWORD="UPDATE users SET password = ? WHERE uuid = ?";