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 | Mark spatial datatypes as valid #1035

Merged
merged 3 commits into from
May 13, 2019
Merged

Conversation

peterbae
Copy link
Contributor

@peterbae peterbae commented Apr 13, 2019

Addresses issue #1031 and #1038.

For #1031, I changed the isValid bit to be set to true by default, as it is stated in the CLR specs. Leaving this isValid bit to false makes some of the Spatial Datatype operations on the server's end fail.

For #1038, I've declared the default constructors as protected, to allow extension of Geometry and Geography classes.

I've also noticed that setObject() using Geography/Geometry weren't working as intended, so I'm fixing that as well.

@peterbae
Copy link
Contributor Author

mssql-jdbc-7.3.1-SNAPSHOT-preview-PR1035.zip

Attaching the driver from this PR for testing.

@codecov-io
Copy link

codecov-io commented Apr 13, 2019

Codecov Report

Merging #1035 into dev will increase coverage by 0.02%.
The diff coverage is 87.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #1035      +/-   ##
============================================
+ Coverage     50.83%   50.85%   +0.02%     
- Complexity     2964     2967       +3     
============================================
  Files           120      120              
  Lines         28001    28011      +10     
  Branches       4686     4686              
============================================
+ Hits          14233    14245      +12     
+ Misses        11616    11613       -3     
- Partials       2152     2153       +1
Flag Coverage Δ Complexity Δ
#JDBC42 50.43% <87.5%> (-0.01%) 2928 <4> (ø)
#JDBC43 50.7% <87.5%> (+0.02%) 2963 <4> (+6) ⬆️
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java 68.78% <100%> (+0.07%) 0 <0> (ø) ⬇️
...osoft/sqlserver/jdbc/SQLServerSpatialDatatype.java 85.49% <100%> (+0.11%) 289 <0> (ø) ⬇️
...n/java/com/microsoft/sqlserver/jdbc/DataTypes.java 80.07% <100%> (+0.15%) 6 <0> (ø) ⬇️
...in/java/com/microsoft/sqlserver/jdbc/Geometry.java 51.56% <66.66%> (-0.82%) 15 <2> (ø)
...n/java/com/microsoft/sqlserver/jdbc/Geography.java 51.56% <66.66%> (-0.82%) 15 <2> (ø)
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 63.36% <0%> (-0.44%) 95% <0%> (-1%)
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 47.3% <0%> (-0.22%) 112% <0%> (+1%)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 44.14% <0%> (ø) 327% <0%> (+2%) ⬆️
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 58.03% <0%> (+0.03%) 0% <0%> (ø) ⬇️
... and 2 more

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 e1f3d7e...6fd40a9. Read the comment docs.

@cheenamalhotra cheenamalhotra changed the title Mark spatial datatypes as valid Fix | Mark spatial datatypes as valid May 1, 2019
@peterbae peterbae merged commit 31d37cc into microsoft:dev May 13, 2019
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.

5 participants