Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Possible to separate Point definition and db->write call ? #47

Closed
jguiban opened this issue Jan 12, 2020 · 2 comments
Closed

Possible to separate Point definition and db->write call ? #47

jguiban opened this issue Jan 12, 2020 · 2 comments

Comments

@jguiban
Copy link

jguiban commented Jan 12, 2020

Could you please tell me if it is possible to separate the "Point" definition and the db->write() call:

I did not find it in the exemples and the following test code I wrote failed to compile:

 influxdb = influxdb::InfluxDBFactory::Get("http:/127.0.0.1/?db=dbtest");
 Point point = Point{"test"}.addField("value", 10);
 point.addField("value2", 20);
 influxdb->write(point);

decoder.cpp:89:18: error: ‘class std::unique_ptrinfluxdb::InfluxDB’ has no member named ‘write’
influxdb.write(point);
^~~~~

@awegrzyn
Copy link
Owner

@jguiban Yes, of course, just use influxdb->write(std::move(point));

@jguiban
Copy link
Author

jguiban commented Jan 14, 2020

Many thanks @awegrzyn .

@jguiban jguiban closed this as completed Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants