Skip to content

Add PostgisGeometryCodec #491

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

Closed
wants to merge 1 commit into from

Conversation

earlbread
Copy link
Contributor

Make sure that:

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You use the code formatters provided here and have them applied to your changes. Don't submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

Issue description

This supports Postgis Geometry type. #483

@@ -48,6 +49,8 @@
switch (this) {
case HSTORE:
return new HStoreCodec(byteBufAllocator, oid);
case POSTGIS_GEOMETRY:
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code should include a guard to verify that the required classes for jts-core are on the class path.

Copy link
Contributor Author

@earlbread earlbread Feb 8, 2022

Choose a reason for hiding this comment

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

@mp911de mp911de added the type: enhancement A general enhancement label Feb 7, 2022
@earlbread earlbread force-pushed the postgis-geometry-codec branch 2 times, most recently from 820140b to 7f0c10a Compare February 8, 2022 14:31
@earlbread earlbread requested a review from mp911de February 11, 2022 06:34
[resolves pgjdbc#483]

Signed-off-by: Seunghun Lee <[email protected]>
@earlbread earlbread force-pushed the postgis-geometry-codec branch from 7f0c10a to 2a44b8f Compare February 16, 2022 09:10
@earlbread
Copy link
Contributor Author

Since WkbReader is not thread-safe, I changed decode to create a WkbReader instance every time.

@mp911de
Copy link
Collaborator

mp911de commented Feb 16, 2022

Codecs aren't really used concurrently, they are rather used sequentially and each connection maintains its own codec instances. In any case, codecs might be used by different threads and that can introduce visibility issues so it's perfectly fine to maintain individual instances.

@mp911de mp911de added this to the 0.9.1.RELEASE milestone Feb 16, 2022
mp911de pushed a commit that referenced this pull request Feb 16, 2022
[resolves #483][#491]

Signed-off-by: Seunghun Lee <[email protected]>
@mp911de mp911de closed this in 8f2c18f Feb 16, 2022
mp911de pushed a commit that referenced this pull request Feb 16, 2022
[resolves #483][#491]

Signed-off-by: Seunghun Lee <[email protected]>
mp911de added a commit that referenced this pull request Feb 16, 2022
Use this. for instance field access. Align license headers. Simplify classpath detection.

[#483][closes #491]

Signed-off-by: Mark Paluch <[email protected]>
@mp911de
Copy link
Collaborator

mp911de commented Feb 16, 2022

Thank you for your contribution. That's merged, polished, and backported now.

@earlbread earlbread deleted the postgis-geometry-codec branch February 16, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants