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

fix: return empty catalog name #174

Merged
merged 2 commits into from Jun 30, 2020
Merged

fix: return empty catalog name #174

merged 2 commits into from Jun 30, 2020

Conversation

olavloite
Copy link
Collaborator

The JDBC connection would return the current database name as the current catalog name, but that catalog name would not be returned in the ResultSet returned by getCatalogs(). This discrepancy causes some tools to ignore or misinterpret the catalog and schema structure of a Cloud Spanner database. Specifically, it breaks the autocomplete feature of DBeaver.

See also dbeaver/dbeaver#9127

The JDBC connection would return the current database name as the
current catalog name, but that catalog name would not be returned
in the ResultSet returned by getCatalogs(). This discrepancy causes
some tools to ignore or misinterpret the catalog and schema structure
of a Cloud Spanner database. Specifically, it breaks the autocomplete
feature of DBeaver.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 29, 2020
@olavloite olavloite requested a review from skuruppu June 29, 2020 20:03
@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

Merging #174 into master will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #174      +/-   ##
============================================
- Coverage     72.20%   72.15%   -0.06%     
+ Complexity     1095     1094       -1     
============================================
  Files            24       24              
  Lines          3292     3282      -10     
  Branches        495      490       -5     
============================================
- Hits           2377     2368       -9     
+ Misses          722      720       -2     
- Partials        193      194       +1     
Impacted Files Coverage Δ Complexity Δ
.../com/google/cloud/spanner/jdbc/JdbcConnection.java 49.72% <100.00%> (ø) 42.00 <0.00> (ø)
...gle/cloud/spanner/jdbc/AbstractJdbcConnection.java 63.88% <0.00%> (-1.39%) 20.00% <0.00%> (-1.00%)
...ud/spanner/jdbc/AbstractJdbcPreparedStatement.java 90.24% <0.00%> (-0.61%) 52.00% <0.00%> (ø%)
...oogle/cloud/spanner/jdbc/JdbcDatabaseMetaData.java 95.23% <0.00%> (-0.01%) 180.00% <0.00%> (ø%)
...m/google/cloud/spanner/jdbc/JdbcTypeConverter.java 73.91% <0.00%> (+0.11%) 91.00% <0.00%> (ø%)
...a/com/google/cloud/spanner/jdbc/JdbcResultSet.java 79.02% <0.00%> (+0.20%) 186.00% <0.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 7c336d0...692d4c7. Read the comment docs.

@skuruppu skuruppu merged commit cedd167 into master Jun 30, 2020
@skuruppu skuruppu deleted the catalog-name branch June 30, 2020 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants