Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
DjellalAbdou committed Mar 4, 2024
1 parent db7d36a commit f5546b4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/core/src/model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,16 @@ export interface CreateOptions<TAttributes = any>
* dialect specific ON CONFLICT DO NOTHING / INSERT IGNORE
*/
ignoreDuplicates?: boolean;

/**
* Fields to update if row key already exists (on duplicate key update)? (only supported by MySQL,
* MariaDB, SQLite >= 3.24.0 & Postgres >= 9.5).
*/
updateOnDuplicate?: Array<keyof TAttributes>;
/**
* An optional parameter that specifies a where clause for the 'ON CONFLICT DO UPDATE SET ... WHERE' part of the query
* Only supported in Postgres >= 9.5 and SQLite >= 3.35.0
*/
onConflictUpdateWhere?: WhereOptions<TAttributes>;
/**
* Return the affected rows (only for postgres)
*/
Expand Down Expand Up @@ -1151,6 +1160,11 @@ export interface UpsertOptions<TAttributes = any>
* Only supported in Postgres >= 9.5 and SQLite >= 3.24.0
*/
conflictWhere?: WhereOptions<TAttributes>;
/**
* An optional parameter that specifies a where clause for the 'ON CONFLICT DO UPDATE SET ... WHERE' part of the query
* Only supported in Postgres >= 9.5 and SQLite >= 3.35.0
*/
onConflictUpdateWhere?: WhereOptions<TAttributes>;
/**
* Optional override for the conflict fields in the ON CONFLICT part of the query.
* Only supported in Postgres >= 9.5 and SQLite >= 3.24.0
Expand Down

0 comments on commit f5546b4

Please sign in to comment.