コード例 #1
0
ファイル: ModelPatchExt.cs プロジェクト: AidensNose/PluralKit
 public static Task UpsertSystemGuild(this IPKConnection conn, SystemId system, ulong guild,
                                      SystemGuildPatch patch)
 {
     var(query, pms) = patch.Apply(UpdateQueryBuilder.Upsert("system_guild", "system, guild"))
                       .WithConstant("system", system)
                       .WithConstant("guild", guild)
                       .Build();
     return(conn.ExecuteAsync(query, pms));
 }
コード例 #2
0
 public Task UpsertSystemGuild(IPKConnection conn, SystemId system, ulong guild,
                               SystemGuildPatch patch)
 {
     _logger.Information("Updated {SystemId} in guild {GuildId}: {@SystemGuildPatch}", system, guild, patch);
     var(query, pms) = patch.Apply(UpdateQueryBuilder.Upsert("system_guild", "system, guild"))
                       .WithConstant("system", system)
                       .WithConstant("guild", guild)
                       .Build();
     return(conn.ExecuteAsync(query, pms));
 }