use excluded where relevant

This commit is contained in:
Ruben Fiszel
2025-10-16 09:19:44 +00:00
parent 95b1dbf958
commit c5acb4785d
53 changed files with 125 additions and 104 deletions
@@ -413,7 +413,7 @@ pub async fn uv_pip_compile(
);
if let Some(db) = conn.as_sql() {
sqlx::query!(
"INSERT INTO pip_resolution_cache (hash, lockfile, expiration) VALUES ($1, $2, now() + ('5 mins')::interval) ON CONFLICT (hash) DO UPDATE SET lockfile = $2",
"INSERT INTO pip_resolution_cache (hash, lockfile, expiration) VALUES ($1, $2, now() + ('5 mins')::interval) ON CONFLICT (hash) DO UPDATE SET lockfile = EXCLUDED.lockfile",
req_hash,
lockfile
).fetch_optional(db).await?;