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(spanner): support for the PG.JSONB data type #10098

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

devbww
Copy link
Contributor

@devbww devbww commented Oct 25, 2022

Introduce google::cloud::spanner::JsonB for PostgreSQL databases. The interface is the same as Json (just a strongly-typed string), but JsonB values are stored in the database in a decomposed, binary format, which affects performance: JsonB is slower to input, but faster to process as it avoids reparsing.

Note: Support for arrays of JSONB will come later.


This change is Reviewable

Introduce `google::cloud::spanner::JsonB` for PostgreSQL databases.
The interface is the same as `Json` (just a strongly-typed string),
but `JsonB` values are stored in the database in a decomposed, binary
format, which affects performance: `JsonB` is slower to input, but
faster to process as it avoids reparsing.

Note: Support for arrays of `JSONB` will come later.
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Oct 25, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 17f7b78be409f9b8451afddd111302dab7b70d4d

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Base: 94.14% // Head: 94.08% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (17f7b78) compared to base (6228499).
Patch coverage: 57.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10098      +/-   ##
==========================================
- Coverage   94.14%   94.08%   -0.06%     
==========================================
  Files        1511     1511              
  Lines      139757   139960     +203     
==========================================
+ Hits       131569   131679     +110     
- Misses       8188     8281      +93     
Impacted Files Coverage Δ
google/cloud/spanner/samples/postgresql_samples.cc 0.72% <0.00%> (-0.06%) ⬇️
...cloud/spanner/testing/database_integration_test.cc 78.50% <ø> (ø)
...r/integration_tests/data_types_integration_test.cc 74.24% <22.41%> (-11.94%) ⬇️
google/cloud/spanner/value.cc 90.67% <90.90%> (-0.02%) ⬇️
...gle/cloud/spanner/internal/connection_impl_test.cc 97.79% <96.00%> (-0.03%) ⬇️
google/cloud/spanner/value_test.cc 98.42% <97.91%> (-0.03%) ⬇️
google/cloud/spanner/json.h 100.00% <100.00%> (ø)
google/cloud/spanner/value.h 93.75% <100.00%> (+0.03%) ⬆️
...loud/spanner/internal/logging_result_set_reader.cc 88.00% <0.00%> (-4.00%) ⬇️
...e/cloud/spanner/testing/cleanup_stale_instances.cc 75.40% <0.00%> (-3.28%) ⬇️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@devbww devbww marked this pull request as ready for review October 25, 2022 03:37
@devbww devbww requested a review from a team as a code owner October 25, 2022 03:37
@snippet-bot
Copy link

snippet-bot bot commented Oct 25, 2022

Here is the summary of changes.

You are about to add 3 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@devbww devbww merged commit 11d2d51 into googleapis:main Oct 25, 2022
@devbww devbww deleted the pg-jsonb branch October 25, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants