From eecddf878f98bb921622a5a5bb2600aedb5a53fa Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 8 Mar 2015 19:38:15 +0100 Subject: o Improved SQL output. --- apps/sm-serial-read.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'apps/sm-serial-read.cpp') diff --git a/apps/sm-serial-read.cpp b/apps/sm-serial-read.cpp index 955d262..a203847 100644 --- a/apps/sm-serial-read.cpp +++ b/apps/sm-serial-read.cpp @@ -120,23 +120,14 @@ public: cerr << "port is not open" << endl; } - auto field_names = vector({ - "hostname", - "device_type", - "device", - "timestamp", - "sensor", - "value" - }); - shared_ptr output; if (format == Format::JSON) { - output = make_shared(cout, field_names); + output = make_shared(cout); } else if (format == Format::SQL) { - output = make_shared(cout, field_names); + output = make_shared(cout, "raw"); } else if (format == Format::PLAIN) { - output = make_shared(cout, field_names); + output = make_shared(cout); } else { cerr << "Unsupported format: " << boost::lexical_cast(format) << endl; return EXIT_FAILURE; -- cgit v1.2.3