modified: backend/src/services/SqlExecutor.ts

This commit is contained in:
GEgorov
2025-11-28 20:44:42 +03:00
parent f4fee36582
commit 2459dfcdb8

View File

@@ -46,6 +46,10 @@ export class SqlExecutor {
// Security: Prevent multiple statements and dangerous commands // Security: Prevent multiple statements and dangerous commands
this.validateQuery(sqlQuery); this.validateQuery(sqlQuery);
// Log SQL query and parameters before execution
console.log('\n[SQL Query]', sqlQuery);
console.log('[SQL Params]', params);
// Execute with retry mechanism // Execute with retry mechanism
const result = await this.retryQuery(async () => { const result = await this.retryQuery(async () => {
return await pool.query(sqlQuery, params); return await pool.query(sqlQuery, params);