mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-24 17:34:13 +00:00
Clean up some lines
This commit is contained in:
parent
0ff7443493
commit
fab6bd8080
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue