IODA Bundle
SQLOutputConfig.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 1996-2012 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 /// @author Simon Smart
12 /// Aug 2018
13 
14 #ifndef odc_sql_SQLOutputConfig_H
15 #define odc_sql_SQLOutputConfig_H
16 
17 #include "eckit/sql/SQLOutputConfig.h"
18 
19 
20 namespace odc {
21 namespace sql {
22 
23 //----------------------------------------------------------------------------------------------------------------------
24 
25 class SQLOutputConfig : public eckit::sql::SQLOutputConfig {
26 
27 public: // methods
28 
29  SQLOutputConfig(bool noColumnNames=false,
30  bool noNULL=false,
31  const std::string& delimiter=defaultDelimiter,
32  const std::string& format=defaultOutputFormat,
33  bool bitfieldsBinary=false,
34  bool noColumnAlignment=false,
35  bool fullPrecision=false);
36 
37  SQLOutputConfig(const std::string& odbFilename);
38 
39  ~SQLOutputConfig() override;
40 
41  eckit::sql::SQLOutput* buildOutput(const eckit::PathName& path) const override;
42 
43  void setOutputStream(std::ostream& s);
44 
45 private: // members
46 
47  std::reference_wrapper<std::ostream> outStream_;
48 };
49 
50 
51 //----------------------------------------------------------------------------------------------------------------------
52 
53 } // namespace sql
54 } // namespace odc
55 
56 #endif
eckit::sql::SQLOutput * buildOutput(const eckit::PathName &path) const override
void setOutputStream(std::ostream &s)
SQLOutputConfig(bool noColumnNames=false, bool noNULL=false, const std::string &delimiter=defaultDelimiter, const std::string &format=defaultOutputFormat, bool bitfieldsBinary=false, bool noColumnAlignment=false, bool fullPrecision=false)
std::reference_wrapper< std::ostream > outStream_
Definition: ColumnInfo.h:23