Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optionally wrap INT64 in BigQueryInt or provide a custom INT64 value type cast options #873

Merged
merged 19 commits into from
Oct 28, 2020

Conversation

steffnay
Copy link
Contributor

@steffnay steffnay commented Oct 12, 2020

Adds ability to wrap 'INT64' values in a BigQueryInt type.

  • Add BigQueryInt class

  • Allow user to pass a custom typeCastFunction to be used to convert integer values

  • Give user option to specify schema fields to be converted by typeCastFunction

  • Ensure the tests and linter pass

  • Code coverage does not decrease (if any source code was changed)

  • Appropriate docs were updated (if necessary)

Fixes #6 🦕

@steffnay steffnay requested a review from a team October 12, 2020 17:45
@steffnay steffnay requested a review from a team as a code owner October 12, 2020 17:45
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 12, 2020
@codecov
Copy link

codecov bot commented Oct 12, 2020

Codecov Report

Merging #873 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #873      +/-   ##
==========================================
+ Coverage   98.60%   98.65%   +0.04%     
==========================================
  Files           9        9              
  Lines        6719     6967     +248     
  Branches      422      463      +41     
==========================================
+ Hits         6625     6873     +248     
  Misses         94       94              
Impacted Files Coverage Δ
src/bigquery.ts 99.95% <100.00%> (+<0.01%) ⬆️
src/index.ts 100.00% <100.00%> (ø)
src/job.ts 100.00% <100.00%> (ø)
src/table.ts 100.00% <100.00%> (ø)

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 3f5efa9...f943736. Read the comment docs.

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/nodejs-bigquery API. label Oct 14, 2020
src/bigquery.ts Outdated Show resolved Hide resolved
src/bigquery.ts Show resolved Hide resolved
src/bigquery.ts Outdated Show resolved Hide resolved
src/bigquery.ts Outdated Show resolved Hide resolved
@stephenplusplus
Copy link
Contributor

@steffnay What is the part that is a breaking change? It looks like an upgrade wouldn't break anything for a user, but let me know if I missed it.

@steffnay steffnay changed the title feat!: optionally wrap INT64 in BigQueryInt or provide a custom INT64 value type cast options feat: optionally wrap INT64 in BigQueryInt or provide a custom INT64 value type cast options Oct 28, 2020
@steffnay
Copy link
Contributor Author

@stephenplusplus it's not breaking, updated the PR title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/nodejs-bigquery API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

losing precision in converting TIMESTAMP and INT64 to Javascript Number
2 participants