-
Notifications
You must be signed in to change notification settings - Fork 80
Fix Encoding/Escaping according to the InfluxDb Line-Protocol #55
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
Conversation
Travis fails with
It doesn't seem to be related to changes in this PR. By the way, all tests are green, including the integration ones, at least on my PC. Do you have an idea how we can deal with it? |
Thanks for opening this PR 🚀
I found this resource from Rust announcements, apparently over 800 Crates are affected by this 😓 When the CI passes I will give this PR a thorough review and merge it. Am I seeing it right, that this should close #53? |
Ah, ok. Hopefully will be fixed some day. Well, this PR deals with spaces for sure. \n's aren't supported by the line protocol. Might be a good idea to add a check for that. \r and \t aren't mentioned in the docs. So needs more tests to figure out a way to handle them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotless and well written code with tests 👍
I'm fine with merging it like this, unless you want to add a check for line breaks and tabs, but since InfluxDb don't mention them, I don't think that's strictly necessary.
Thank you for the fast response. I will test how it works with \r's and \t's once have time, maybe on the next week, and file a new PR if it comes. |
Thank you, feel free to open more issues for any issues you encounter or features you're missing from the library :) |
I tested the PR and it works as expected. Thanks a lot for the work. 👍 |
Description
This PR contains the following changes:
Tested it on ~1.2 million records during a conversion from mongodb. Better than nothing.
Fixes #52, closes #53
Checklist
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo readme > README.md