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

Maybe the method Types.isCountable is wrong? #5

Closed
pablogrisafi1975 opened this issue Mar 4, 2021 · 3 comments
Closed

Maybe the method Types.isCountable is wrong? #5

pablogrisafi1975 opened this issue Mar 4, 2021 · 3 comments
Assignees

Comments

@pablogrisafi1975
Copy link
Contributor

Describe the bug
Maybe the method Types.isCountable is wrong?

The code is :

    public boolean isCountable() {
        return this == IntegerType || this == integerType || this == LongType || this == longType || this == byteType || this == ByteType
                || this == ShortType || this == shortType || this == DoubleType || this == doubleType || this == BigDecimalType;
    }

DoubleType, doubleType and BigDecimalType seem to be included by mistake , and BigInteger seems to be missing.

Of course, maybe you have your reasons, but in that case please write them.

Thanks for this project! Great idea and compact implementation!

@sproket
Copy link
Owner

sproket commented Mar 4, 2021

Thanks! Yeah, this method is too vague. It's only used to test if you map an autoinc to something sensible. Now I realize that it's kind of silly anyway. Autoinc to Byte? I'll fix this - it should really only test for long or integer. Those are the only sensible mappings.

Thanks for this project! Great idea and compact implementation!

Thanks. Please star it. Maybe it can trend eventually. :)

@pablogrisafi1975
Copy link
Contributor Author

BigInteger should be possible too.
I suggest changing the name to something more descriptive

Starred!

@sproket sproket self-assigned this Mar 5, 2021
@sproket
Copy link
Owner

sproket commented Mar 9, 2021

It only makes sense to have auto-inc as long or int so I clarified the method name and the logged text. See next release.

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

No branches or pull requests

2 participants