1 | // |
---|---|
2 | // RowFormatter.cpp |
3 | // |
4 | // Library: SQL |
5 | // Package: SQLCore |
6 | // Module: RowFormatter |
7 | // |
8 | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. |
9 | // and Contributors. |
10 | // |
11 | // SPDX-License-Identifier: BSL-1.0 |
12 | // |
13 | |
14 | |
15 | #include "Poco/SQL/RowFormatter.h" |
16 | #include <iomanip> |
17 | |
18 | |
19 | namespace Poco { |
20 | namespace SQL { |
21 | |
22 | |
23 | RowFormatter::RowFormatter(const std::string& rPrefix, |
24 | const std::string& rPostfix, |
25 | Mode mode): |
26 | _prefix(rPrefix), |
27 | _postfix(rPostfix), |
28 | _mode(mode), |
29 | _totalRowCount(0) |
30 | { |
31 | } |
32 | |
33 | |
34 | RowFormatter::~RowFormatter() |
35 | { |
36 | } |
37 | |
38 | |
39 | std::string& RowFormatter::formatNames(const NameVecPtr pNames, std::string& formattedNames) |
40 | { |
41 | formattedNames.clear(); |
42 | return formattedNames; |
43 | } |
44 | |
45 | |
46 | void RowFormatter::formatNames(const NameVecPtr pNames) |
47 | { |
48 | return; |
49 | } |
50 | |
51 | |
52 | std::string& RowFormatter::formatValues(const ValueVec& /*vals*/, std::string& formattedValues) |
53 | { |
54 | formattedValues.clear(); |
55 | return formattedValues; |
56 | } |
57 | |
58 | |
59 | void RowFormatter::formatValues(const ValueVec& /*vals*/) |
60 | { |
61 | return; |
62 | } |
63 | |
64 | |
65 | const std::string& RowFormatter::toString() |
66 | { |
67 | throw NotImplementedException("RowFormatter::toString()"); |
68 | } |
69 | |
70 | |
71 | void RowFormatter::reset() |
72 | { |
73 | _prefix = ""; |
74 | _postfix = ""; |
75 | _totalRowCount = INVALID_ROW_COUNT; |
76 | } |
77 | |
78 | |
79 | } } // namespace Poco::SQL |
80 |