Improves performance for queries with large result sets.
The "group by" clause can be removed for all search types but the keywords.
Signed-off-by: moson-mo <mo-son@mailbox.org>
Fixes:
Keyword-links on the package page pass wrong query-parameter.
Thus a name/description search is performed instead of keywords
Issue report: #397
Signed-off-by: moson-mo <mo-son@mailbox.org>
Fix glitch on the package page:
"Show more..." not displayed for the "Required by" list
Fix test case:
Function name does not start with "test" hence it was never executed during test runs
Issue report: #363
Signed-off-by: moson-mo <mo-son@mailbox.org>
FastAPI 0.87.0 switched to the httpx library for their TestClient
* cookies need to be defined on the request instance instead of method calls
Signed-off-by: moson-mo <mo-son@mailbox.org>
FastAPI 0.87.0 switched to the httpx library for their TestClient
* allow_redirects is deprecated and replaced by follow_redirects
Signed-off-by: moson-mo <mo-son@mailbox.org>
The default page shows the pending requests which were working OK if one
used the Filters button. This fixes the case when someone submits by
using the pager (Next, Last etc).
Closes: #405
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
We can omit the "distinct" from some queries
because constraints in the DB ensure uniqueness:
* Groups sub-query
PackageGroup: Primary key makes "PackageID" + "GroupID" unique
Groups: Unique index on "Name" column
-> Technically we can't have a package with the same group-name twice
* Licenses sub-query:
PackageLicense -> Primary key makes "PackageID" + "LicenseID" unique
Licenses -> Unique index on "Name" column
-> Technically we can't have a package with the same license-name twice
* Keywords sub-query:
PackageKeywords -> Primary key makes "PackageBaseID" + "KeywordID" unique
(And a Package can only have one PackageBase)
Keywords -> Unique index on "Name" column
-> Technically we can't have a package with the same Keyword twice
* Packages main-query:
We join PackageBases and Users on their primary key columns
(which are guaranteed to be unique)
-> There is no way we could end up with more than one record for a Package
Signed-off-by: moson-mo <mo-son@mailbox.org>
With the 3dcbee5a the filenames inside the .gz archives contained .tmp
at the end. This fixes those by using Gzip Class constructor instead of
the gzip.open method.
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
we should be suggesting to make a shallow clone to reduce
the amount of data that is being transferred initially
Signed-off-by: moson-mo <mo-son@mailbox.org>
See doc/git-archive.md for general Git archive specifications
See doc/repos/metadata-repo.md for info and direction related to the new Git metadata archive