mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Add super basic group model/command
This commit is contained in:
parent
0fadc81cda
commit
253ae43c7f
15 changed files with 199 additions and 2 deletions
|
|
@ -111,4 +111,14 @@ begin
|
|||
if not exists (select 1 from members where hid = new_hid) then return new_hid; end if;
|
||||
end loop;
|
||||
end
|
||||
$$ language plpgsql volatile;
|
||||
|
||||
create function find_free_group_hid() returns char(5) as $$
|
||||
declare new_hid char(5);
|
||||
begin
|
||||
loop
|
||||
new_hid := generate_hid();
|
||||
if not exists (select 1 from groups where hid = new_hid) then return new_hid; end if;
|
||||
end loop;
|
||||
end
|
||||
$$ language plpgsql volatile;
|
||||
Loading…
Add table
Add a link
Reference in a new issue