src/StreamRelationalWriter.h
branchv_0
changeset 13 e7234dd45166
parent 12 640e88aedf8f
child 14 733334eca89b
--- a/src/StreamRelationalWriter.h	Sat Jul 21 23:01:47 2018 +0200
+++ b/src/StreamRelationalWriter.h	Sat Jul 21 23:46:29 2018 +0200
@@ -6,6 +6,7 @@
 
 #include "../include/typedefs.h"
 #include "../include/RelationalWriter.h"
+#include "../include/TypeId.h"
 #include "format.h"
 #include "DataTypeWriterBase.h"
 #include "types/BooleanDataTypeWriter.h"
@@ -54,7 +55,7 @@
 		throw RelpipeWriterException(L"Unsupported data type: " + typeId);
 	}
 
-	void startRelation(string_t name, std::vector<std::pair<string_t, string_t> > attributes, boolean_t writeHeader) override {
+	void startRelation(string_t name, std::vector<std::pair<string_t, TypeId> > attributes, boolean_t writeHeader) override {
 		string_t tableName = name;
 		columnCount = attributes.size();
 
@@ -74,8 +75,7 @@
 
 		// Write column types:
 		for (size_t c = 0; c < columnCount; c++) {
-			wstring typeCode = attributes[c].second;
-			integer_t typeId = toTypeId(typeCode);
+			integer_t typeId = static_cast<integer_t>(attributes[c].second);
 			integerWriter.writeValue(output, typeId);
 			columnTypes[c] = typeId;
 		}