Skip to content

Commit

Permalink
Add sql to distinct on column separator
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Mario564 committed Nov 4, 2023
1 parent 1a482ce commit fbf2627
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drizzle-orm/src/pg-core/dialect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class PgDialect {

let distinctSql: SQL | undefined;
if (distinct) {
distinctSql = distinct === true ? sql` distinct` : sql` distinct on (${sql.join(distinct.on, ', ')})`;
distinctSql = distinct === true ? sql` distinct` : sql` distinct on (${sql.join(distinct.on, sql`, `)})`;
}

const selection = this.buildSelection(fieldsList, { isSingleTable });
Expand Down

0 comments on commit fbf2627

Please sign in to comment.