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

Binary encoder for numeric datatype #9

Merged
merged 7 commits into from Aug 11, 2021

Conversation

Gustl22
Copy link
Contributor

@Gustl22 Gustl22 commented Aug 9, 2021

It seems that the implementation is quite heavy, but when I looked into other repositories, they also have a bulk of code:

  • BigDecimal Implementation of a14n, which cannot be applied 1:1, as Postgres Numeric uses another binary format than BigDecimal.
  • BigDecimal Implementation of Java: Same applies to Java.
  • You may find another lib which implements the binary format, then let me know (e.g. node-postgres doesn't).

Copy link
Owner

@isoos isoos left a comment

Choose a reason for hiding this comment

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

I think this looks good, but I'd like to see the RegExp values to be extracted as top-level fields. There is a chance to optimize the string concatenations a bit, but I don't mind the current state, it doesn't seem to have too much runtime benefit to do it right away.

lib/src/binary_codec.dart Outdated Show resolved Hide resolved
lib/src/binary_codec.dart Outdated Show resolved Hide resolved
lib/src/binary_codec.dart Outdated Show resolved Hide resolved
@isoos
Copy link
Owner

isoos commented Aug 11, 2021

I've resolved the merge conflicts in the CHANGELOG, thanks for doing this! I think combined with your other PR, this is worth to get released right away :)

@isoos isoos merged commit 983df6e into isoos:master Aug 11, 2021
@isoos
Copy link
Owner

isoos commented Aug 11, 2021

Pubilshed as 2.4.0

@Gustl22 Gustl22 deleted the 164-numeric-datatype branch August 11, 2021 08:43
@Gustl22
Copy link
Contributor Author

Gustl22 commented Aug 11, 2021

@isoos Big thanks for reviewing contributions, and for maintaining and providing such projects!

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.

Problems with numeric data type
2 participants