Clean up some lines

This commit is contained in:
Noi 2020-04-27 13:21:04 -07:00
parent 0ff7443493
commit fab6bd8080

View file

@ -1,4 +1,5 @@
''' <summary> Imports NpgsqlTypes
''' <summary>
''' Automatically removes database information for guilds that have not been accessed in a long time. ''' Automatically removes database information for guilds that have not been accessed in a long time.
''' </summary> ''' </summary>
Class StaleDataCleaner Class StaleDataCleaner
@ -30,14 +31,14 @@ Class StaleDataCleaner
Dim cUpdateGuild = db.CreateCommand() Dim cUpdateGuild = db.CreateCommand()
cUpdateGuild.CommandText = $"update {GuildStateInformation.BackingTable} set last_seen = now() " + cUpdateGuild.CommandText = $"update {GuildStateInformation.BackingTable} set last_seen = now() " +
"where guild_id = @Gid" "where guild_id = @Gid"
Dim pUpdateG = cUpdateGuild.Parameters.Add("@Gid", NpgsqlTypes.NpgsqlDbType.Bigint) Dim pUpdateG = cUpdateGuild.Parameters.Add("@Gid", NpgsqlDbType.Bigint)
cUpdateGuild.Prepare() cUpdateGuild.Prepare()
Dim cUpdateGuildUser = db.CreateCommand() Dim cUpdateGuildUser = db.CreateCommand()
cUpdateGuildUser.CommandText = $"update {GuildUserSettings.BackingTable} set last_seen = now() " + cUpdateGuildUser.CommandText = $"update {GuildUserSettings.BackingTable} set last_seen = now() " +
"where guild_id = @Gid and user_id = @Uid" "where guild_id = @Gid and user_id = @Uid"
Dim pUpdateGU_g = cUpdateGuildUser.Parameters.Add("@Gid", NpgsqlTypes.NpgsqlDbType.Bigint) Dim pUpdateGU_g = cUpdateGuildUser.Parameters.Add("@Gid", NpgsqlDbType.Bigint)
Dim pUpdateGU_u = cUpdateGuildUser.Parameters.Add("@Uid", NpgsqlTypes.NpgsqlDbType.Bigint) Dim pUpdateGU_u = cUpdateGuildUser.Parameters.Add("@Uid", NpgsqlDbType.Bigint)
cUpdateGuildUser.Prepare() cUpdateGuildUser.Prepare()
' Do actual updates ' Do actual updates