You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbAccount.cs
+64-4Lines changed: 64 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
usingSystem.Data.Common;
3
3
usingSystem.Text;
4
4
usingArrowgene.Ddon.Database.Model;
5
+
usingArrowgene.Ddon.Shared.Model;
5
6
6
7
namespaceArrowgene.Ddon.Database.Sql.Core;
7
8
@@ -19,9 +20,13 @@ public partial class DdonSqlDb : SqlDb
19
20
privatestaticreadonlystringSqlSelectAccountById=$"SELECT \"id\", {BuildQueryField(AccountFields)} FROM \"account\" WHERE \"id\"=@id;";
20
21
privatestaticreadonlystringSqlSelectAccountByName=$"SELECT \"id\", {BuildQueryField(AccountFields)} FROM \"account\" WHERE \"normal_name\"=@normal_name;";
21
22
privatestaticreadonlystringSqlSelectAccountByLoginToken=$"SELECT \"id\", {BuildQueryField(AccountFields)} FROM \"account\" WHERE \"login_token\"=@login_token;";
23
+
privatestaticreadonlystringSqlSelectAccountByPasswordTokenAndName=$"SELECT \"id\", {BuildQueryField(AccountFields)} FROM \"account\" WHERE \"password_token\"=@password_token AND \"normal_name\"=@normal_name;";
24
+
privatestaticreadonlystringSqlSelectAccountByMailTokenAndName=$"SELECT \"id\", {BuildQueryField(AccountFields)} FROM \"account\" WHERE \"mail_token\"=@mail_token AND \"normal_name\"=@normal_name;";
25
+
privatestaticreadonlystringSqlSelectAccountByEmail=$"SELECT \"id\", {BuildQueryField(AccountFields)} FROM \"account\" WHERE UPPER(\"mail\")=UPPER(@mail);";
26
+
privatestaticreadonlystringSqlSelectAccountByEmailAndName=$"SELECT \"id\", {BuildQueryField(AccountFields)} FROM \"account\" WHERE UPPER(\"mail\")=UPPER(@mail) AND \"normal_name\"=@normal_name;";
22
27
privatestaticreadonlystringSqlUpdateAccount=$"UPDATE \"account\" SET {BuildQueryUpdate(AccountFields)} WHERE \"id\"=@id;";
??thrownewResponseErrorException(ErrorCode.ERROR_CODE_AUTH_ACCOUNT_GENERATION_FAIL,"Could not create account from OneTimeToken, choose another token");
71
73
72
74
Logger.Info(client,"Created new account from OneTimeToken");
0 commit comments