Refactor money update execution in BaseWorker: Simplified the SQL execution by directly constructing the update query without parameterized placeholders, addressing serialization issues. Updated comments for clarity on the handling of money values and ensured compatibility with trusted data sources. Additionally, modified the casting of money in the director query to text for consistent mapping in Rust.
This commit is contained in:
@@ -82,10 +82,9 @@ const QUERY_GET_DIRECTORS: &str = r#"
|
||||
const QUERY_GET_BEST_PRODUCTION: &str = r#"
|
||||
SELECT
|
||||
fdu.id falukant_user_id,
|
||||
-- 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,
|
||||
-- Geld explizit als Text casten, damit das Mapping im Rust-Code
|
||||
-- zuverlässig funktioniert (unabhängig vom nativen DB-Typ wie `money`).
|
||||
CAST(fdu.money AS text) AS money,
|
||||
fdu.certificate,
|
||||
ftp.id product_id,
|
||||
ftp.label_tr,
|
||||
|
||||
Reference in New Issue
Block a user