Skip to content

Commit

Permalink
docs: correct documentation on bulkCreate updateOnDuplicate option (#…
Browse files Browse the repository at this point in the history
…13443)

Evidenced by #13442

Co-authored-by: AllAwesome497 <47748690+AllAwesome497@users.noreply.github.com>
Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>
Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
  • Loading branch information
4 people committed Dec 15, 2021
1 parent 3d39c5c commit 5657a34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/model.js
Expand Up @@ -2544,7 +2544,7 @@ class Model {
* @param {boolean} [options.hooks=true] Run before / after bulk create hooks?
* @param {boolean} [options.individualHooks=false] Run before / after create hooks for each individual Instance? BulkCreate hooks will still be run if options.hooks is true.
* @param {boolean} [options.ignoreDuplicates=false] Ignore duplicate values for primary keys? (not supported by MSSQL or Postgres < 9.5)
* @param {Array} [options.updateOnDuplicate] Fields to update if row key already exists (on duplicate key update)? (only supported by MySQL, MariaDB, SQLite >= 3.24.0 & Postgres >= 9.5). By default, all fields are updated.
* @param {Array} [options.updateOnDuplicate] Fields to update if row key already exists (on duplicate key update)? (only supported by MySQL, MariaDB, SQLite >= 3.24.0 & Postgres >= 9.5).
* @param {Transaction} [options.transaction] Transaction to run query under
* @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql.
* @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging).
Expand Down
2 changes: 1 addition & 1 deletion types/lib/model.d.ts
Expand Up @@ -784,7 +784,7 @@ export interface BulkCreateOptions<TAttributes = any> extends Logging, Transacti

/**
* Fields to update if row key already exists (on duplicate key update)? (only supported by MySQL,
* MariaDB, SQLite >= 3.24.0 & Postgres >= 9.5). By default, all fields are updated.
* MariaDB, SQLite >= 3.24.0 & Postgres >= 9.5).
*/
updateOnDuplicate?: (keyof TAttributes)[];

Expand Down

0 comments on commit 5657a34

Please sign in to comment.