Improved SQL statements #219
This commit is contained in:
parent
6585576266
commit
d42b76ba87
@ -118,8 +118,8 @@ class UserJoinedGameServer(TableABC):
|
||||
return str(
|
||||
f"""
|
||||
UPDATE `UserJoinedGameServer`
|
||||
{"" if self._leaved_on is None else f"SET `LeavedOn` = '{self._leaved_on}',"}
|
||||
{"SET " if self._leaved_on is None else ""}`LastModifiedAt` = '{self._modified_at}'
|
||||
{"SET " if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
|
||||
`LastModifiedAt` = '{self._modified_at}'
|
||||
WHERE `Id` = {self._id};
|
||||
"""
|
||||
)
|
||||
|
@ -116,8 +116,8 @@ class UserJoinedServer(TableABC):
|
||||
return str(
|
||||
f"""
|
||||
UPDATE `UserJoinedServers`
|
||||
{"" if self._leaved_on is None else f"SET `LeavedOn` = '{self._leaved_on}',"}
|
||||
{"SET " if self._leaved_on is None else ""}`LastModifiedAt` = '{self._modified_at}'
|
||||
{"SET " if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
|
||||
`LastModifiedAt` = '{self._modified_at}'
|
||||
WHERE `UserId` = {self._user.id};
|
||||
"""
|
||||
)
|
||||
|
@ -125,8 +125,8 @@ class UserJoinedVoiceChannel(TableABC):
|
||||
return str(
|
||||
f"""
|
||||
UPDATE `UserJoinedVoiceChannel`
|
||||
{"" if self._leaved_on is None else f"SET `LeavedOn` = '{self._leaved_on}',"}
|
||||
{"SET " if self._leaved_on is None else ""}`LastModifiedAt` = '{self._modified_at}'
|
||||
{"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