Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

How to handle IntegerType and DecimalType #22

Closed
ctavan opened this Issue · 7 comments

4 participants

@ctavan

Cassandra's IntegerType is implemented as arbitrary precision Java BigIntegers and DecimalType is implemented as arbitrary precision Java BigDecimals, see the documentation and the marshallers from the cassandra source:

How should this be handled in the node driver? For now (since I haven't had a use case yet) I'm ok with just using javascript numbers, but maybe we'll have to switch to something like node-bigint at some point? What do you thing?

@devdazed
Owner

i was also thinking node-bigint is the way to go, however, that would require a compiled dependency and the target installation location have gmp installed on it. What do you think?

@ctavan
@devdazed
Owner

I'm not sure about that one. Its a direct port from a browser version and it doesn't have any tests. Furthermore, the last time it had anything doen to it was over a year ago.

@simpleseeker

When I pull very large Ints (64bit), I loss precision. Because I have to work with large values, I'm already working with node-bigint. These are lookup UIDs, which causes havac for me. Being able to retrieve large Ints without lossing precision will make a lot of problems go away.

@duyleekun

https://github.com/justmoon/node-bignum doesn't required compiled dependency

@devdazed
Owner

how do you figure? bignum.cc is in the root and the install script is "node-gyp configure build". More than likely I'll be working in this, or node-num which is a pure JS version.

@devdazed devdazed closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.