-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: properly select SRID if present #11763
Conversation
Fix SRID problem. Now short SRID is selected if present.
Codecov Report
@@ Coverage Diff @@
## master #11763 +/- ##
=======================================
Coverage 96.27% 96.27%
=======================================
Files 94 94
Lines 9197 9197
=======================================
Hits 8854 8854
Misses 343 343
Continue to review full report at Codecov.
|
Hello! I see you are a first-time contributor, thank you for taking the time to help Sequelize! I hope to see more PRs from you in the future! Please add at least one test to make sure your implementation works as intended and to prevent regressions in the future. Take a look into recent merged PRs to see how others created tests. If you have trouble, let me know. |
Updated tests, but somehow irrelevant sqlite tests are failing. Care to inspect ? |
Hi @Nymria I see that you are working on top of my modifications, great 😬 hopefully you will manage to get everything green! By the way, you can ignore errors of the form |
Let me know when the PR is ready for review again! |
Well seems everything is in order. Only postgresql test are failing the way you described
|
Hi @Nymria, looks good overall! I have one question: it seems that you added a |
Not necessary optional. if crs field is provided you should receive back. want me to revert other test cases ? Maybe that is more convenient |
Yes, please revert the other test cases then. If you think it's worth testing |
Alright, i wasnt using GEOGRAPHY type and interested in GEOMETRY type. For geometry type SRID can be optional, but as much as i understand GEOGRAPHY type will have an SRID field by default. Here it says it will use EPSG:4326 if none is pointed out. https://postgis.net/docs/using_postgis_dbmanagement.html#PostGIS_Geography
So i will add CRS field test for whole geography types. If you prefer, i can remove CRS retrieval from DB for GEOGRAPHY type aswell. |
Hi @Nymria, thanks, I am a bit confused though, can you explain again why you added |
@papb Yeah , it is not like geometry type, geography type fails without them. Since srid is always defined by postgis for the geography type, query returns crs value weather it is given by user or not. Therefore test input goes in without crs and comes out with default crs , which seems to be the behaviour of postgis. previous comment contains postgis link regarding subject. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add short crs selection for mysql and mariadb remove tests to geometry model
LGTM, however I would like to wait for a final review by @sushantdhiman before merging. |
IMO I think adding:
I would be happy to send a PR to amend this and not include the |
Fix SRID problem. Now short SRID is selected if present.
Pull Request check-list
Please make sure to review and check all of these items:
npm run test
ornpm run test-DIALECT
pass with this change (including linting)?Description of change
Add short SRID selection as default if present at the database cell.
Closes #11615