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: added support for Django specific statement #382

Merged
merged 10 commits into from
Oct 11, 2022

Conversation

gauravsnj
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 10, 2022

Codecov Report

Merging #382 (d02d2f0) into postgresql-dialect (a84945e) will increase coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head d02d2f0 differs from pull request most recent head cb4b6c8. Consider uploading reports for the commit cb4b6c8 to get more accurate results

@@                   Coverage Diff                    @@
##             postgresql-dialect     #382      +/-   ##
========================================================
+ Coverage                 86.36%   86.41%   +0.05%     
- Complexity                 1844     1847       +3     
========================================================
  Files                       121      122       +1     
  Lines                      6056     6064       +8     
  Branches                    838      838              
========================================================
+ Hits                       5230     5240      +10     
+ Misses                      594      592       -2     
  Partials                    232      232              
Flag Coverage Δ
all_tests 86.41% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ud/spanner/pgadapter/utils/ClientAutoDetector.java 93.18% <ø> (ø)
...statements/local/DjangoGetTableNamesStatement.java 100.00% <100.00%> (ø)
...om/google/cloud/spanner/pgadapter/ProxyServer.java 80.95% <0.00%> (+1.19%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

import com.google.common.collect.ImmutableList;

@InternalApi
public class DjangoSpecificStatement implements LocalStatement {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Could we rename this to something like DjangoGetTableNamesStatement and add a comment that this statement is used by Django to check whether the migrations tables exists. If it does not, then Django will assume that migrations are disabled, which makes it safe to mock this statement with an empty result set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@gauravsnj gauravsnj enabled auto-merge (squash) October 11, 2022 12:45
@gauravsnj gauravsnj merged commit 1137ed1 into postgresql-dialect Oct 11, 2022
@gauravsnj gauravsnj deleted the django-specific-statement branch October 11, 2022 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants