Improved SQL statements #219
This commit is contained in:
parent
d42b76ba87
commit
f7dc8d135a
@ -118,7 +118,8 @@ class UserJoinedGameServer(TableABC):
|
||||
return str(
|
||||
f"""
|
||||
UPDATE `UserJoinedGameServer`
|
||||
{"SET " if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
|
||||
SET
|
||||
{"" if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
|
||||
`LastModifiedAt` = '{self._modified_at}'
|
||||
WHERE `Id` = {self._id};
|
||||
"""
|
||||
|
@ -116,7 +116,8 @@ class UserJoinedServer(TableABC):
|
||||
return str(
|
||||
f"""
|
||||
UPDATE `UserJoinedServers`
|
||||
{"SET " if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
|
||||
SET
|
||||
{"" if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
|
||||
`LastModifiedAt` = '{self._modified_at}'
|
||||
WHERE `UserId` = {self._user.id};
|
||||
"""
|
||||
|
@ -125,7 +125,8 @@ class UserJoinedVoiceChannel(TableABC):
|
||||
return str(
|
||||
f"""
|
||||
UPDATE `UserJoinedVoiceChannel`
|
||||
{"SET " if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
|
||||
SET
|
||||
{"" if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
|
||||
`LastModifiedAt` = '{self._modified_at}'
|
||||
WHERE `JoinId` = {self._join_id};
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user