mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: add co-maintainers to RPC
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
This commit is contained in:
parent
bcd808ddc1
commit
500d6b403b
2 changed files with 45 additions and 0 deletions
|
@ -284,6 +284,22 @@ class RPC:
|
|||
)
|
||||
.distinct()
|
||||
.order_by("Name"),
|
||||
# Co-Maintainer
|
||||
db.query(models.PackageComaintainer)
|
||||
.join(models.User, models.User.ID == models.PackageComaintainer.UsersID)
|
||||
.join(
|
||||
models.Package,
|
||||
models.Package.PackageBaseID
|
||||
== models.PackageComaintainer.PackageBaseID,
|
||||
)
|
||||
.with_entities(
|
||||
models.Package.ID,
|
||||
literal("CoMaintainers").label("Type"),
|
||||
models.User.Username.label("Name"),
|
||||
literal(str()).label("Cond"),
|
||||
)
|
||||
.distinct() # A package could have the same co-maintainer multiple times
|
||||
.order_by("Name"),
|
||||
]
|
||||
|
||||
# Union all subqueries together.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue