feature/prisma-to-raw-query-phase1-complete #82

Merged
kjs merged 29 commits from feature/prisma-to-raw-query-phase1-complete into main 2025-10-01 15:07:17 +09:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit e444dd9d39 - Show all commits

View File

@ -991,18 +991,18 @@ export class MultiConnectionQueryService {
switch (operation) {
case "select":
let query = `SELECT * FROM ${tableName}`;
let sql = `SELECT * FROM ${tableName}`;
const queryParams: any[] = [];
if (conditions && Object.keys(conditions).length > 0) {
const whereClause = Object.keys(conditions)
.map((key, index) => `${key} = $${index + 1}`)
.join(" AND ");
query += ` WHERE ${whereClause}`;
sql += ` WHERE ${whereClause}`;
queryParams.push(...Object.values(conditions));
}
return await query(query, queryParams);
return await query(sql, queryParams);
case "insert":
if (!data) throw new Error("INSERT 작업에는 데이터가 필요합니다.");