From 34669098e138d595aadc39fbf8c0cdd004c0916d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 28 Mar 2015 22:22:16 +0100 Subject: o Adding back SQL output. --- apps/sample-convert.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'apps') diff --git a/apps/sample-convert.cpp b/apps/sample-convert.cpp index 1cedf42..baa1447 100644 --- a/apps/sample-convert.cpp +++ b/apps/sample-convert.cpp @@ -16,9 +16,14 @@ using boost::tokenizer; namespace po = boost::program_options; class sample_convert : public app { +private: string fields; string timestamp_field; bool add_timestamp; + string input_file, output_file; + sample_format_type output_format; + + string table_name; public: void add_options(po::options_description_easy_init &options) override { @@ -74,6 +79,11 @@ public: options.push_back(&tf); + table_name_option tno(table_name); + if (table_name != "") { + options.push_back(&tno); + } + tokenizer<> tok(fields); output_fields_option fs; std::copy(tok.begin(), tok.end(), std::back_inserter(fs.fields)); @@ -100,12 +110,6 @@ public: return EXIT_SUCCESS; } - -private: - string input_file, output_file; - sample_format_type output_format; - - string table_name; }; } -- cgit v1.2.3