feature: batch queries#132
feature: batch queries#132stephenplusplus merged 4 commits intogoogleapis:masterfrom callmehiphop:dg--batch-queries
Conversation
| @@ -0,0 +1,246 @@ | |||
| /** | |||
| * Copyright 2018, Google, Inc. | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #132 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 11 12 +1
Lines 1257 1355 +98
=====================================
+ Hits 1257 1355 +98
Continue to review full report at Codecov.
|
| * @private | ||
| * | ||
| * @param {object} config The request config. | ||
| * @param {function} Callback function. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/batch-transaction.js
Outdated
| * Executes partition in streaming mode. | ||
| * | ||
| * @see {@link Transaction#createReadStream} when using {@link ReadPartition}. | ||
| * @see {@link Transaction#runStream} when using {@link QueryParition}. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * }); | ||
| * }); | ||
| */ | ||
| BatchTransaction.prototype.executeStream = function(partition) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * operation in parallel. Partitions become invalid when the transaction used | ||
| * to create them is closed. | ||
| * | ||
| * @param {ReadRequestOptions} options Configuration object, describing what to |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * @example <caption>include:samples/batch.js</caption> | ||
| * region_tag:execute_partition | ||
| */ | ||
| BatchTransaction.prototype.execute = function(partition, callback) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * }); | ||
| * }); | ||
| */ | ||
| BatchTransaction.prototype.executeStream = function(partition) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * @example <caption>include:samples/batch.js</caption> | ||
| * region_tag:create_batch_transaction | ||
| */ | ||
| Database.prototype.createBatchTransaction = function(options, callback) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * - **`labels.env:dev`** The instance's label env has the value dev. | ||
| * - **`name:howl labels.env:dev`** The instance's name is howl and it has | ||
| * the label env with value dev. | ||
| * @property {number} [maxApiCalls] Maximum number of API calls to make. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * @private | ||
| * | ||
| * @param {object} config The request config. | ||
| * @param {function} Callback function. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * @callback CreateReadPartitionsCallback | ||
| * @param {?Error} err Request error, if any. | ||
| * @param {ReadPartition[]} partitions List of read partitions. | ||
| * @param {object} apiResponse The full API response. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| /** | ||
| * @typedef {array} CreateReadPartitionsResponse | ||
| * @property {ReadPartition[]} 0 List of read partitions. | ||
| * @property {object} 1 The full API response. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| /** | ||
| * @typedef {object} ReadPartition | ||
| * @mixes ReadRequestOptions | ||
| * @property {string} partitionToken The partition token. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/batch-transaction.js
Outdated
| * | ||
| * const instance = spanner.instance('my-instance'); | ||
| * const database = instance.database('my-database'); | ||
| * const transaction = database.batchTransaction(identifier); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.