Skip to content

Commit

Permalink
datastore docs: add param tags for mixin methods (#2449)
Browse files Browse the repository at this point in the history
  • Loading branch information
callmehiphop authored and stephenplusplus committed Jul 17, 2017
1 parent 2c19dd1 commit ed894cb
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions packages/datastore/src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,16 @@ DatastoreRequest.prototype.get = function(keys, options, callback) {

/**
* Maps to {module:datastore#save}, forcing the method to be `insert`.
*
* @param {object|object[]} entities - Datastore key object(s).
* @param {Key} entities.key - Datastore key object.
* @param {object|object[]} entities.data - Data to save with the provided key.
* If you provide an array of objects, you must use the explicit syntax:
* `name` for the name of the property and `value` for its value. You may
* also specify an `excludeFromIndexes` property, set to `true` or `false`.
* @param {function} callback - The callback function.
* @param {?error} callback.err - An error returned while making this request
* @param {object} callback.apiResponse - The full API response.
*/
DatastoreRequest.prototype.insert = function(entities, callback) {
entities = arrify(entities)
Expand Down Expand Up @@ -990,6 +1000,16 @@ DatastoreRequest.prototype.save = function(entities, callback) {

/**
* Maps to {module:datastore#save}, forcing the method to be `update`.
*
* @param {object|object[]} entities - Datastore key object(s).
* @param {Key} entities.key - Datastore key object.
* @param {object|object[]} entities.data - Data to save with the provided key.
* If you provide an array of objects, you must use the explicit syntax:
* `name` for the name of the property and `value` for its value. You may
* also specify an `excludeFromIndexes` property, set to `true` or `false`.
* @param {function} callback - The callback function.
* @param {?error} callback.err - An error returned while making this request
* @param {object} callback.apiResponse - The full API response.
*/
DatastoreRequest.prototype.update = function(entities, callback) {
entities = arrify(entities)
Expand All @@ -1001,6 +1021,16 @@ DatastoreRequest.prototype.update = function(entities, callback) {

/**
* Maps to {module:datastore#save}, forcing the method to be `upsert`.
*
* @param {object|object[]} entities - Datastore key object(s).
* @param {Key} entities.key - Datastore key object.
* @param {object|object[]} entities.data - Data to save with the provided key.
* If you provide an array of objects, you must use the explicit syntax:
* `name` for the name of the property and `value` for its value. You may
* also specify an `excludeFromIndexes` property, set to `true` or `false`.
* @param {function} callback - The callback function.
* @param {?error} callback.err - An error returned while making this request
* @param {object} callback.apiResponse - The full API response.
*/
DatastoreRequest.prototype.upsert = function(entities, callback) {
entities = arrify(entities)
Expand Down

0 comments on commit ed894cb

Please sign in to comment.