Skip to content

Commit

Permalink
make OnConflictDatabase use Updateable types of tables.
Browse files Browse the repository at this point in the history
  • Loading branch information
igalklebanov authored and koskimas committed Dec 29, 2023
1 parent 4d75b4e commit 04f8c26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/query-builder/on-conflict-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
UpdateObjectExpression,
parseUpdateObjectExpression,
} from '../parser/update-set-parser.js'
import { Updateable } from '../util/column-type.js'
import { freeze } from '../util/object-utils.js'
import { preventAwait } from '../util/prevent-await.js'
import { AnyColumn, SqlBool } from '../util/type-utils.js'
Expand Down Expand Up @@ -257,7 +258,7 @@ export interface OnConflictBuilderProps {
preventAwait(OnConflictBuilder, "don't await OnConflictBuilder instances.")

export type OnConflictDatabase<DB, TB extends keyof DB> = {
[K in keyof DB | 'excluded']: K extends keyof DB ? DB[K] : DB[TB]
[K in keyof DB | 'excluded']: Updateable<K extends keyof DB ? DB[K] : DB[TB]>
}

export type OnConflictTables<TB> = TB | 'excluded'
Expand Down

0 comments on commit 04f8c26

Please sign in to comment.