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

Commit 47ee5345 by Gabe Gorelick Committed by Sushant

docs(model): document skipLocked (#11361)

1 parent 5860ef5f
Showing with 6 additions and 0 deletions
...@@ -1663,6 +1663,7 @@ class Model { ...@@ -1663,6 +1663,7 @@ class Model {
* @param {number} [options.offset] Offset for result * @param {number} [options.offset] Offset for result
* @param {Transaction} [options.transaction] Transaction to run query under * @param {Transaction} [options.transaction] Transaction to run query under
* @param {string|Object} [options.lock] Lock the selected rows. Possible options are transaction.LOCK.UPDATE and transaction.LOCK.SHARE. Postgres also supports transaction.LOCK.KEY_SHARE, transaction.LOCK.NO_KEY_UPDATE and specific model locks with joins. See [transaction.LOCK for an example](transaction#lock) * @param {string|Object} [options.lock] Lock the selected rows. Possible options are transaction.LOCK.UPDATE and transaction.LOCK.SHARE. Postgres also supports transaction.LOCK.KEY_SHARE, transaction.LOCK.NO_KEY_UPDATE and specific model locks with joins. See [transaction.LOCK for an example](transaction#lock)
* @param {boolean} [options.skipLocked] Skip locked rows. Only supported in Postgres.
* @param {boolean} [options.raw] Return raw result. See sequelize.query for more information. * @param {boolean} [options.raw] Return raw result. See sequelize.query for more information.
* @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. * @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). * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging).
......
...@@ -545,6 +545,11 @@ export interface FindOptions extends QueryOptions, Filterable, Projectable, Para ...@@ -545,6 +545,11 @@ export interface FindOptions extends QueryOptions, Filterable, Projectable, Para
lock?: Transaction.LOCK | { level: Transaction.LOCK; of: typeof Model }; lock?: Transaction.LOCK | { level: Transaction.LOCK; of: typeof Model };
/** /**
* Skip locked rows. Only supported in Postgres.
*/
skipLocked?: boolean;
/**
* Return raw result. See sequelize.query for more information. * Return raw result. See sequelize.query for more information.
*/ */
raw?: boolean; raw?: boolean;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!