refactor: add SqlKata for SQL generation, move connection handling into ModelRepository
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#nullable enable
|
||||
|
||||
using SqlKata;
|
||||
|
||||
namespace PluralKit.Core
|
||||
{
|
||||
public class MemberGuildPatch: PatchObject
|
||||
@@ -6,8 +9,9 @@ namespace PluralKit.Core
|
||||
public Partial<string?> DisplayName { get; set; }
|
||||
public Partial<string?> AvatarUrl { get; set; }
|
||||
|
||||
public override UpdateQueryBuilder Apply(UpdateQueryBuilder b) => b
|
||||
public override Query Apply(Query q) => q.ApplyPatch(wrapper => wrapper
|
||||
.With("display_name", DisplayName)
|
||||
.With("avatar_url", AvatarUrl);
|
||||
.With("avatar_url", AvatarUrl)
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user