From 8c76c5c5719e7896839de571d4ccc702b9b3843e Mon Sep 17 00:00:00 2001 From: Pavol Date: Sat, 24 Jan 2026 09:12:21 +0100 Subject: [PATCH] fix: DBUpdate sql syntax --- forloop_modules/function_handlers/database_handlers.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/forloop_modules/function_handlers/database_handlers.py b/forloop_modules/function_handlers/database_handlers.py index a0f32a1..5ee0cc3 100644 --- a/forloop_modules/function_handlers/database_handlers.py +++ b/forloop_modules/function_handlers/database_handlers.py @@ -1154,18 +1154,12 @@ def _get_sql_update_statements(self, db_instance, dbtable, set_value, set_column_name, where_value, where_column_name, where_operator): - quote = db_instance.identifier_quote # Gets the correct quote (` or ") - - # This function correctly adds single quotes for strings but not numbers. set_value_sql = _parse_float_sql(set_value) where_value_sql = _parse_float_sql(where_value) - # Correctly build the SET statement, quoting ONLY the column name. - set_statement = f"{quote}{set_column_name}{quote} = {set_value_sql}" + set_statement = f"{set_column_name} = {set_value_sql}" - # Correctly build the WHERE statement, quoting ONLY the column name. - # DEPENDENCY in dbhydra update - where_statement = f"{quote}{where_column_name}{quote} {where_operator} {where_value_sql}" + where_statement = f"{where_column_name} {where_operator} {where_value_sql}" return set_statement, where_statement