Skip to content

Commit

Permalink
Added keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Jul 7, 2024
1 parent c0b9d02 commit d32f88e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/drivers/base/BaseDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export abstract class BaseDriver {
const values = [];
let i = 1;
const { quote } = this.compiler;
for (const iterator of type.nonKeys) {
for (const iterator of type.columns) {
if (columns) {
columns += ",\r\n\t\t";
}
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/postgres/PostgreSqlDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class PostgreSqlDriver extends BaseDriver {
} else {
returning = "RETURNING ";
}
returning += iterator.columnName + " as " + quote(iterator.name);
returning += iterator.quotedColumnName + " as " + iterator.quotedName;
continue;
}
const value = entity[iterator.name];
Expand All @@ -135,7 +135,7 @@ export default class PostgreSqlDriver extends BaseDriver {
fields += ",\r\n\t\t";
valueParams += ",\r\n\t\t";
}
fields += iterator.columnName;
fields += iterator.quotedColumnName;
valueParams += `$${i++}`;
values.push(value);
}
Expand Down

0 comments on commit d32f88e

Please sign in to comment.