Story #5402
closedAs a developer, Package content allows ORDER_BY in postgres based on EVR comparisons
100%
Description
In order to be able to do things like ORDER BY (EVR) in postgres on the Package
content unit, we need to have a type and a comparison method available. Some examples of this include:
Debian:
Spacewalk:
- https://github.com/spacewalkproject/spacewalk/blob/master/schema/spacewalk/postgres/class/evr_t.sql
- https://github.com/spacewalkproject/spacewalk/blob/master/schema/spacewalk/postgres/packages/rpm.pkb#L194
VMaaS:
We should probably adopt one of the existing methods for the Package model.
Related issues
Updated by bmbouter about 5 years ago
- Subject changed from As Pulp3, I need to be able to do ORDER_BY in postgres based on EVR comparisons to As a developer, Package content allows ORDER_BY in postgres based on EVR comparisons
- Description updated (diff)
Is the idea that there will be a field on the model and a DB trigger would populate it?
Updated by ggainey about 5 years ago
bmbouter wrote:
Is the idea that there will be a field on the model and a DB trigger would populate it?
Depends on the exact approach - VMaaS, for example, creates the evr_t array and inserts it directly:
https://github.com/RedHatInsights/vmaas/blob/master/reposcan/database/package_store.py#L45
Updated by bmbouter about 5 years ago
ggainey wrote:
bmbouter wrote:
Is the idea that there will be a field on the model and a DB trigger would populate it?
Depends on the exact approach - VMaaS, for example, creates the evr_t array and inserts it directly:
https://github.com/RedHatInsights/vmaas/blob/master/reposcan/database/package_store.py#L45
I see thank you. So we could do it either way.
Updated by ttereshc over 4 years ago
- Priority changed from Normal to High
- Sprint/Milestone set to Priority items (outside of planned milestones/releases)
Priority is high assuming this is blocking support of "keep N versions of RPMs in a repo"
Updated by ttereshc over 4 years ago
- Blocked by Story #5950: Add database support for comparing EVRs added
Updated by ttereshc over 4 years ago
- Blocks Story #5367: As a user, I can have a sync option that retains the latest N packages of the same name added
Updated by ttereshc over 4 years ago
- Sprint/Milestone changed from Priority items (outside of planned milestones/releases) to Pulp 3.x RPM (Katello 4.1)
Updated by dalley over 4 years ago
- Blocked by deleted (Story #5950: Add database support for comparing EVRs)
Updated by dalley over 4 years ago
- Status changed from NEW to POST
- Assignee set to dalley
Added by dalley over 4 years ago
Updated by dalley over 4 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset ce6c3644b2a912e37837e782b8c1aa02e157c282.
Updated by ttereshc over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Updated by ttereshc over 4 years ago
- Sprint/Milestone changed from Pulp 3.x RPM (Katello 4.1) to Pulp RPM 3.5.0
Add database support for comparing EVR
closes: #5402 https://pulp.plan.io/issues/5402
[nocoverage]