Closed abhijeettmr closed 5 years ago
I think that is a mistake I've made.
I'll check the documents for help, and fix it ASAP.
I haven't choose stringstream
because stringstream
will be influenced by locale settings by default.
Thank you for your deep feedback and detailed use case.
Hi, thanks for giving your time and looking into the issue. Sorry to interrupt you I would like just to know have you check that and adding any fix in this.
I fixed it coz I'm available today. Remember to double check it again by yourself. Thanks.
Hi, when i tried to insert
float64 or double
value through InfluxDB cpp api then it return -7 as a error code but samefloat64
value inserted through command line of InfludxDB then it inserted successfully so my conclusion is InfluxDB cpp api is not supportedfloat64
bit values. First of all '-7' status code is not understandable at first impression because their is no related document for return codes meaning so i decide to look into InfluxDB.hpp file then i found some string length issue. When i increase the length of format buffer#define FMT_BUF_LEN 25
to
#define FMT_BUF_LEN 35then it works fine for me and i am able to handle
float64bit values upto a certain range not upto maximum range of
float64`.Usecase: if i tried to insert
float flVal = 3.14e18
then the value is not inserted into database and it returns '-7' as a error code and if insertfloat flVal = 3.14e17
then it inserted successfully into database. But after increasing buffer length to 35 thenfloat flVal = 3.14e27
can be inserted into DB and bigger than that value cannot be inserted if buffer length is set to 35.So my question is, this is correct way to handle the
float64
bit values or have to choose other way round. Thanks.