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

Rename query.toJSON to query.json.#122

Merged
stephenplusplus merged 2 commits intogoogleapis:masterfrom
stephenplusplus:spp--options.json
Feb 15, 2018
Merged

Rename query.toJSON to query.json.#122
stephenplusplus merged 2 commits intogoogleapis:masterfrom
stephenplusplus:spp--options.json

Conversation

@stephenplusplus
Copy link
Copy Markdown
Contributor

The original PR, #94, made a poor choice in variable naming. We haven't released to npm, so we'd like to change the name before it's permanent.

Instead of:

table.read({
  keys: [...],
  columns: [...],
  toJSON: true
}, function(err, rows) {
  var row = rows[0]
  // row.Name = 'value'
})

This seems better:

table.read({
  keys: [...],
  columns: [...],
  json: true // <--
}, function(err, rows) {
  var row = rows[0]
  // row.Name = 'value'
})

@ghost ghost assigned stephenplusplus Feb 15, 2018
@ghost ghost added the cla: yes This human has signed the Contributor License Agreement. label Feb 15, 2018
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 15, 2018

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #122   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          11     11           
  Lines        1257   1257           
=====================================
  Hits         1257   1257
Impacted Files Coverage Δ
src/table.js 100% <ø> (ø) ⬆️
src/database.js 100% <100%> (ø) ⬆️
src/transaction-request.js 100% <100%> (ø) ⬆️
src/partial-result-stream.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 7223ed2...e75e2e8. Read the comment docs.

src/database.js Outdated
* // Error handling omitted.
* }
*
* const row1 = rows[0];

This comment was marked as spam.

@stephenplusplus stephenplusplus merged commit e0d8330 into googleapis:master Feb 15, 2018
@ghost ghost removed the cla: yes This human has signed the Contributor License Agreement. label Feb 15, 2018
@stephenplusplus stephenplusplus deleted the spp--options.json branch February 15, 2018 20:17
@stephenplusplus stephenplusplus mentioned this pull request Feb 15, 2018
@WaldoJeffers
Copy link
Copy Markdown
Contributor

@stephenplusplus Good call 👍


delete reqOpts.toJSON;
delete reqOpts.toJSONOptions;
delete reqOpts.json;

This comment was marked as spam.

This comment was marked as spam.

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.

5 participants