Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Feb 14, 2024
1 parent 83e12c3 commit a21764f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

## Version History

### v15.11.0

- :bug: Fix `query.order` in list API

### v15.10.2

- :arrow_up: Update Core Deps
Expand Down
2 changes: 1 addition & 1 deletion generic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default class Drizzle<T extends Table<TableConfig<Column<ColumnBaseConfig
}

async list(query: GenericListInput = {}): Promise<GenericList<InferSelectModel<T>>> {
const order = query.sort && query.sort === 'desc' ? desc : asc;
const order = query.order && query.order === 'desc' ? desc : asc;
const orderBy = order(query.sort ? this.#key(query.sort) : this.#requiredPrimaryKey());

const pgres = await this.pool.select({
Expand Down

0 comments on commit a21764f

Please sign in to comment.