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

Commit a27de748 by Jan Aagaard Meier

[ci skip] 📝 Add transaction option to api docs for a couple of methods. Closes #4136

1 parent 53795052
Showing with 3 additions and 0 deletions
......@@ -1339,6 +1339,7 @@ Model.prototype.aggregate = function(field, aggregateFunction, options) {
* @param {boolean} [options.distinct] Apply COUNT(DISTINCT(col))
* @param {Object} [options.attributes] Used in conjustion with `group`
* @param {Object} [options.group] For creating complex counts. Will return multiple rows as needed.
* @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.
*
* @return {Promise<Integer>}
......@@ -1729,6 +1730,7 @@ Model.prototype.findOrCreate = function(options) {
* @param {Object} [options]
* @param {Boolean} [options.validate=true] Run validations before the row is inserted
* @param {Array} [options.fields=Object.keys(this.attributes)] The fields to insert / update. Defaults to all fields
* @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.
*
* @alias insertOrUpdate
......@@ -1937,6 +1939,7 @@ Model.prototype.bulkCreate = function(records, options) {
* @param {object} [options] The options passed to Model.destroy in addition to truncate
* @param {Boolean|function} [options.transaction] Transaction to run query under
* @param {Boolean|function} [options.cascade = false] Only used in conjuction with TRUNCATE. Truncates all tables that have foreign-key references to the named table, or to any tables added to the group due to CASCADE.
* @param {Transaction} [options.transaction] Transaction to run query under
* @param {Boolean|function} [options.logging] A function that logs sql queries, or false for no logging
* @return {Promise}
*
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!