modified: backend/src/services/SqlExecutor.ts
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user