不要怂,就是干,撸起袖子干!

Commit 2bdcc5dc by LittleSaya Committed by Sushant

docs(upsert): return value when using MySQL / MariaDB (#11093)

1 parent cd8ee566
Showing with 1 additions and 1 deletions
...@@ -2424,7 +2424,7 @@ class Model { ...@@ -2424,7 +2424,7 @@ class Model {
* @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging).
* @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only)
* *
* @returns {Promise<boolean>} Returns a boolean indicating whether the row was created or updated. For Postgres/MSSQL with (options.returning=true), it returns record and created boolean with signature `<Model, created>`. * @returns {Promise<boolean>} Returns a boolean indicating whether the row was created or updated. For MySQL/MariaDB, it returns `true` when inserted and `false` when updated. For Postgres/MSSQL with (options.returning=true), it returns record and created boolean with signature `<Model, created>`.
*/ */
static upsert(values, options) { static upsert(values, options) {
options = Object.assign({ options = Object.assign({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!