Exemplo n.º 1
0
 public static Task UpsertGuild(this IPKConnection conn, ulong guild, GuildPatch patch)
 {
     var(query, pms) = patch.Apply(UpdateQueryBuilder.Upsert("servers", "id"))
                       .WithConstant("id", guild)
                       .Build();
     return(conn.ExecuteAsync(query, pms));
 }
Exemplo n.º 2
0
 public Task UpsertGuild(IPKConnection conn, ulong guild, GuildPatch patch)
 {
     _logger.Information("Updated guild {GuildId}: {@GuildPatch}", guild, patch);
     var(query, pms) = patch.Apply(UpdateQueryBuilder.Upsert("servers", "id"))
                       .WithConstant("id", guild)
                       .Build();
     return(conn.ExecuteAsync(query, pms));
 }
Exemplo n.º 3
0
 public static Task UpsertMemberGuild(this IPKConnection conn, MemberId member, ulong guild,
                                      MemberGuildPatch patch)
 {
     var(query, pms) = patch.Apply(UpdateQueryBuilder.Upsert("member_guild", "member, guild"))
                       .WithConstant("member", member)
                       .WithConstant("guild", guild)
                       .Build();
     return(conn.ExecuteAsync(query, pms));
 }
Exemplo n.º 4
0
 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));
 }
Exemplo n.º 5
0
 public Task UpsertMemberGuild(IPKConnection conn, MemberId member, ulong guild,
                               MemberGuildPatch patch)
 {
     _logger.Information("Updated {MemberId} in guild {GuildId}: {@MemberGuildPatch}", member, guild, patch);
     var(query, pms) = patch.Apply(UpdateQueryBuilder.Upsert("member_guild", "member, guild"))
                       .WithConstant("member", member)
                       .WithConstant("guild", guild)
                       .Build();
     return(conn.ExecuteAsync(query, pms));
 }
Exemplo n.º 6
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));
 }