Refactor SQL parameter handling in BaseWorker: Updated the execution of the money update query to pass parameters in their natural types, allowing PostgreSQL to handle type casting automatically. Improved comments for clarity on the changes made to ensure compatibility with the existing database schema.

This commit is contained in:
Torsten Schulz (local)
2025-12-01 11:18:54 +01:00
parent 25b69e48fe
commit 260b3b2962
2 changed files with 14 additions and 17 deletions

View File

@@ -82,7 +82,10 @@ const QUERY_GET_DIRECTORS: &str = r#"
const QUERY_GET_BEST_PRODUCTION: &str = r#"
SELECT
fdu.id falukant_user_id,
fdu.money,
-- Geld explizit in einen numerischen Wert casten, damit das Mapping im
-- Rust-Code zuverlässig funktioniert (kein Sonderformat des PostgreSQL-
-- Typs `money` o.Ä.).
CAST(fdu.money AS numeric) AS money,
fdu.certificate,
ftp.id product_id,
ftp.label_tr,