Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

feature: batch queries#132

Merged
stephenplusplus merged 4 commits intogoogleapis:masterfrom
callmehiphop:dg--batch-queries
Mar 1, 2018
Merged

feature: batch queries#132
stephenplusplus merged 4 commits intogoogleapis:masterfrom
callmehiphop:dg--batch-queries

Conversation

@callmehiphop
Copy link
Copy Markdown
Contributor

@callmehiphop callmehiphop commented Feb 26, 2018

  • Tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@ghost ghost assigned callmehiphop Feb 26, 2018
@ghost ghost added the cla: yes This human has signed the Contributor License Agreement. label Feb 26, 2018
@@ -0,0 +1,246 @@
/**
* Copyright 2018, Google, Inc.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 26, 2018

Codecov Report

Merging #132 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #132   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          11     12    +1     
  Lines        1257   1355   +98     
=====================================
+ Hits         1257   1355   +98
Impacted Files Coverage Δ
src/index.js 100% <ø> (ø) ⬆️
src/database.js 100% <100%> (ø) ⬆️
src/transaction-request.js 100% <100%> (ø) ⬆️
src/batch-transaction.js 100% <100%> (ø)
src/codec.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44bd63f...fca9c6e. Read the comment docs.

* @private
*
* @param {object} config The request config.
* @param {function} Callback function.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

* 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.

* });
* });
*/
BatchTransaction.prototype.executeStream = function(partition) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

* 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.

* @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.

* });
* });
*/
BatchTransaction.prototype.executeStream = function(partition) {

This comment was marked as spam.

This comment was marked as spam.

* @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.

* - **`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.

* @private
*
* @param {object} config The request config.
* @param {function} Callback function.

This comment was marked as spam.

* @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.

This comment was marked as spam.

/**
* @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.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

/**
* @typedef {object} ReadPartition
* @mixes ReadRequestOptions
* @property {string} partitionToken The partition token.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

*
* 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.

This comment was marked as spam.

This comment was marked as spam.

@stephenplusplus stephenplusplus merged commit 2857101 into googleapis:master Mar 1, 2018
@ghost ghost removed the cla: yes This human has signed the Contributor License Agreement. label Mar 1, 2018
@stephenplusplus stephenplusplus mentioned this pull request Mar 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants