Skip to content

Commit

Permalink
fix(knex): use driver name to identify client (#3527)
Browse files Browse the repository at this point in the history
  • Loading branch information
jawadst authored Sep 2, 2024
1 parent 6330134 commit bb075ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/knex/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ export class KnexAdapter<
return Promise.all(data.map((current) => this._create(current, params)))
}

const { client } = this.db(params).client.config
const returning = RETURNING_CLIENTS.includes(client as string) ? [this.id] : []
const { client } = this.db(params)
const returning = RETURNING_CLIENTS.includes(client.driverName) ? [this.id] : []
const rows: any = await this.db(params)
.insert(data, returning, { includeTriggerModifications: true })
.catch(errorHandler)
Expand Down

0 comments on commit bb075ec

Please sign in to comment.