ref: Little refactoring

This commit is contained in:
Maksim Eltyshev
2025-08-25 17:23:59 +02:00
parent 4d77a1f596
commit 60a94f33fc
5 changed files with 28 additions and 55 deletions

View File

@@ -21,8 +21,8 @@ const makeWhereQueryBuilder = (Model) => (criteria) => {
throw new Error('Unknown column');
}
parts.push(`${columnName} = $${index + 1}`);
values.push(value);
parts.push(`${columnName} = $${values.length}`);
}
return [parts.join(' AND '), values];