mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat(apiv2): database changes
This commit is contained in:
parent
fb4aaad19f
commit
dbe040f852
10 changed files with 54 additions and 7 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
|
@ -23,6 +24,9 @@ namespace PluralKit.Core
|
|||
new { hid = hid.ToLowerInvariant(), System = system }
|
||||
);
|
||||
|
||||
public Task<PKGroup?> GetGroupByGuid(IPKConnection conn, Guid guid) =>
|
||||
conn.QueryFirstOrDefaultAsync<PKGroup?>("select * from groups where uuid = @Uuid", new { Uuid = guid });
|
||||
|
||||
public Task<int> GetGroupMemberCount(IPKConnection conn, GroupId id, PrivacyLevel? privacyFilter = null)
|
||||
{
|
||||
var query = new StringBuilder("select count(*) from group_members");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue