Skip to content

Commit

Permalink
feat: reuse saved _vercomop to speedup lagging computation
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Jun 15, 2024
1 parent 4d39fec commit d0c35ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ ORDER BY
";

pub const SQL_GET_PACKAGE_LAGGING: &str = "
SELECT * FROM (SELECT
SELECT name, dpkg_version, full_version FROM (SELECT
p.name AS name,
dpkg.dpkg_version dpkg_version,
dpkg._vercomp dpkg_vercomp,
(
(
CASE
Expand Down Expand Up @@ -138,7 +139,7 @@ WHERE
)
AND (coalesce(spabhost.value, '') = 'noarch') = (dpkg.architecture = 'noarch')) AS temp
WHERE
comparable_dpkgver(dpkg_version) < comparable_dpkgver(full_version)
dpkg_vercomp < comparable_dpkgver(full_version)
ORDER BY
name
";
Expand Down

0 comments on commit d0c35ba

Please sign in to comment.