Skip to content

Conversation

@AyanKoche
Copy link

Motivation: CIDR Data type support in vertx-pg-client

Explain here the context, and why you're making that change, what is the problem you're trying to solve.
There are several data types supported by vertx-pg-client but CIDR was missing implementation. As the project I am working on requires that support, contributing it is the better way.
Changes:

  • Have added a CIDR class
  • Have added 3 methods : binaryEncodeCidr, binaryDecodeCidr, textDecodeCidr
  • Have added tests for CIDR class
  • Have made relevant changes to the docs as well

Conformance:

You should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md
Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines

@AyanKoche AyanKoche changed the title Cidr change CIDR Support in vertx-pg-client Feb 28, 2024
@vietj vietj added this to the 5.0.0 milestone Mar 6, 2024
case 2:
// IPV4
try {
address = Inet4Address.getByAddress(data);
Copy link
Member

Choose a reason for hiding this comment

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

Actually InetAddress.getByAddress

Copy link
Author

Choose a reason for hiding this comment

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

Addressed.

Copy link
Member

@vietj vietj left a comment

Choose a reason for hiding this comment

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

a few concerns to address

@AyanKoche
Copy link
Author

Addressed the previous comments. Please re-review it. @vietj

@vietj
Copy link
Member

vietj commented Mar 15, 2024

can you squash your commits in a single one ?

@AyanKoche
Copy link
Author

Sure ,doing it

@AyanKoche
Copy link
Author

@vietj Hi sorry for delayed response, I have made the changes and squashed the commits into single commit. Kindly have a look at it

@AyanKoche
Copy link
Author

Hi @vietj , any review comments on the PR?

@AyanKoche AyanKoche requested a review from vietj April 1, 2024 18:33
Copy link
Member

@vietj vietj left a comment

Choose a reason for hiding this comment

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

I cannot see any tests with a real database and the CIDR type, we need to have at least a test that read / write CIDR objects to a test container postgresql instance. Look at how other specific types are tested.

@AyanKoche
Copy link
Author

@vietj I have added test cases dependent on a real database. I have tested them with pg embedded version 12 as previous versions didn't have CIDR support. Please review and provide input.

@vietj vietj merged commit 014d29f into eclipse-vertx:master May 9, 2024
@vietj
Copy link
Member

vietj commented May 9, 2024

great feature thanks @AyanKoche

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.

3 participants