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: support VIEW in metadata queries #633

Merged
merged 1 commit into from Oct 11, 2021
Merged

feat: support VIEW in metadata queries #633

merged 1 commit into from Oct 11, 2021

Conversation

olavloite
Copy link
Collaborator

  • Report views with table type VIEW in metadata queries.
  • Allow applications to filter for VIEWs in metadata queries

Fixes #632

- Report views with table type VIEW in metadata queries.
- Allow applications to filter for VIEWs in metadata queries

Fixes #632
@olavloite olavloite requested review from a team as code owners October 2, 2021 10:09
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner-jdbc API. label Oct 2, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 2, 2021
@@ -15,16 +15,16 @@
*/

SELECT TABLE_CATALOG AS TABLE_CAT, TABLE_SCHEMA AS TABLE_SCHEM, TABLE_NAME,
CASE WHEN TABLE_SCHEMA = '' THEN 'TABLE' ELSE 'VIEW' END AS TABLE_TYPE,
CASE WHEN TABLE_TYPE = 'BASE TABLE' THEN 'TABLE' ELSE TABLE_TYPE END AS TABLE_TYPE,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures that we continue to report what is called BASE_TABLE in Spanner as TABLE in JDBC to retain backwards compatibility. So this basically means:

  • Return 'TABLE' if Spanner calls it a 'BASE TABLE'
  • Return the TABLE_TYPE in all other cases

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When was this renamed?

@thiagotnunes thiagotnunes merged commit b929191 into main Oct 11, 2021
@thiagotnunes thiagotnunes deleted the views-metadata branch October 11, 2021 01:17
gcf-merge-on-green bot pushed a commit that referenced this pull request Oct 25, 2021
🤖 I have created a release \*beep\* \*boop\*
---
## [2.5.0](https://www.github.com/googleapis/java-spanner-jdbc/compare/v2.4.5...v2.5.0) (2021-10-25)


### Features

* support VIEW in metadata queries ([#633](https://www.github.com/googleapis/java-spanner-jdbc/issues/633)) ([b929191](https://www.github.com/googleapis/java-spanner-jdbc/commit/b929191a7b6699f9daf9a7c06097e9794c79ff8d)), closes [#632](https://www.github.com/googleapis/java-spanner-jdbc/issues/632)


### Bug Fixes

* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-spanner-jdbc/issues/1266)) ([#645](https://www.github.com/googleapis/java-spanner-jdbc/issues/645)) ([0474502](https://www.github.com/googleapis/java-spanner-jdbc/commit/0474502936ff1a43244fcb830fecfc5f42895899))


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#641](https://www.github.com/googleapis/java-spanner-jdbc/issues/641)) ([ab26010](https://www.github.com/googleapis/java-spanner-jdbc/commit/ab26010ba107d4ba9591d661743ad542ae3b227f))
* update dependency com.google.cloud:google-cloud-spanner-bom to v6.13.0 ([#637](https://www.github.com/googleapis/java-spanner-jdbc/issues/637)) ([d981c8c](https://www.github.com/googleapis/java-spanner-jdbc/commit/d981c8c744829aa039b16df0b150caf49a99f1cc))
* update dependency com.google.cloud:google-cloud-spanner-bom to v6.14.0 ([#647](https://www.github.com/googleapis/java-spanner-jdbc/issues/647)) ([3cda837](https://www.github.com/googleapis/java-spanner-jdbc/commit/3cda83737c25c8878d19bee1727de84e086065b6))
* upgrade Mockito to support Java17 ([#635](https://www.github.com/googleapis/java-spanner-jdbc/issues/635)) ([d78792f](https://www.github.com/googleapis/java-spanner-jdbc/commit/d78792f7acdd2fdac8a655fba06789ba50457679))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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 googleapis/java-spanner-jdbc API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support VIEWs in metadata queries
2 participants