diff --git a/src/DatabaseLibrary/query.py b/src/DatabaseLibrary/query.py index f8e381e..38a5eba 100644 --- a/src/DatabaseLibrary/query.py +++ b/src/DatabaseLibrary/query.py @@ -188,11 +188,11 @@ def delete_all_rows_from_table(self, tableName, sansTran=False, alias=None): """ dbconnection, _ = self._cache.switch(alias) cur = None - selectStatement = "DELETE FROM %s" % tableName + query = "DELETE FROM %s" % tableName try: cur = dbconnection.cursor() - logger.info("Executing : Delete All Rows From Table | %s " % selectStatement) - result = self.__execute_sql(cur, selectStatement) + logger.info(f"Executing : Delete All Rows From Table | {query}") + result = self.__execute_sql(cur, query) if result is not None: if not sansTran: dbconnection.commit() @@ -269,7 +269,7 @@ def execute_sql_script(self, sqlScriptFileName, sansTran=False, alias=None): try: statements_to_execute = [] cur = dbconnection.cursor() - logger.info("Executing : Execute SQL Script | %s " % sqlScriptFileName) + logger.info(f"Executing : Execute SQL Script | {sqlScriptFileName}") current_statement = "" inside_statements_group = False @@ -351,7 +351,7 @@ def execute_sql_string(self, sqlString, sansTran=False, alias=None): cur = None try: cur = dbconnection.cursor() - logger.info("Executing : Execute SQL String | %s " % sqlString) + logger.info(f"Executing : Execute SQL String | {sqlString}") self.__execute_sql(cur, sqlString) if not sansTran: dbconnection.commit() @@ -404,7 +404,7 @@ def call_stored_procedure(self, spName, spParams=None, sansTran=False, alias=Non spParams = [] cur = None try: - logger.info("Executing : Call Stored Procedure | %s | %s " % (spName, spParams)) + logger.info(f"Executing : Call Stored Procedure | {spName} | {spName} ") if db_api_module_name == "pymssql": cur = dbconnection.cursor(as_dict=False) else: