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

Compatible with DAX? #28

Open
igorescobar opened this issue Sep 3, 2018 · 3 comments
Open

Compatible with DAX? #28

igorescobar opened this issue Sep 3, 2018 · 3 comments

Comments

@igorescobar
Copy link

Hi,

Is this library somehow compatible with DAX? I think that reason that it doesn't work for us is because of #14 .

Does anyone managed to make it work with: https://www.npmjs.com/package/amazon-dax-client or Any DAX client?

@igorescobar
Copy link
Author

igorescobar commented Sep 4, 2018

@rh389 I managed to make the query to be compatible with DocumentClient(). You can see the change here:
master...igorescobar:master

Not sure if it helps at all but I think it can be useful if someone ever needs to make it work with DocumentClient (required by DynamoDB DAX).

@robhogan
Copy link
Owner

robhogan commented Sep 4, 2018

Hi @igorescobar. Thanks for this - looks like a good start and should be backwards compatible. Do you want to make a PR out of it?

@robhogan
Copy link
Owner

robhogan commented Sep 4, 2018

One thing to watch out for - casting to Number will lose precision because javascript's Number can't store a full S2 cell ID (hence the use of long in this library) - in practice Number typically rounds the last three digits of a cell ID to 0. DynamoDB's numbers internally support 38 digits via string representation so they are safe, but we need to be careful not to lose precision on the client side.

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