src/CSVHandler.h
branchv_0
changeset 17 ea36eed9683f
parent 14 a7596589a5b0
child 21 af4cb72127c1
--- a/src/CSVHandler.h	Sat Oct 24 00:08:18 2020 +0200
+++ b/src/CSVHandler.h	Sun Apr 18 10:42:54 2021 +0200
@@ -56,7 +56,7 @@
 	void startRelation(string_t name, std::vector<AttributeMetadata> attributes) override {
 		if (firstAttributes.empty()) {
 			firstAttributes = attributes;
-			if (configuration.writeHeader) for (auto attr : attributes) attribute(attr.getAttributeName());
+			if (configuration.writeHeader) for (auto attr : attributes) attribute(configuration.writeTypes ? attr.getAttributeName() + L"::" + attr.getTypeName() : attr.getAttributeName());
 		} else {
 			// TODO: UNION ALL if data types and attribute count matches
 			throw RelpipeCSVWriterException(L"Only a single relation can be converted to the CSV format.");