--- a/src/StreamRelationalWriter.h Wed Dec 25 00:54:54 2019 +0100
+++ b/src/StreamRelationalWriter.h Fri Jan 24 20:49:46 2020 +0100
@@ -88,23 +88,27 @@
currentColumn = 0;
// Write table name and column count:
- integerWriter.writeValue(output, DATA_PART_START);
- stringWriter.writeValue(output, tableName);
- integerWriter.writeValue(output, columnCount);
+ if (writeHeader) {
+ integerWriter.writeValue(output, DATA_PART_START);
+ stringWriter.writeValue(output, tableName);
+ integerWriter.writeValue(output, columnCount);
+ }
columnTypes.clear();
columnTypes.resize(columnCount);
// Write column names:
- for (size_t c = 0; c < columnCount; c++) {
- wstring columnName = attributes[c].attributeName;
- stringWriter.writeValue(output, columnName);
+ if (writeHeader) {
+ for (size_t c = 0; c < columnCount; c++) {
+ wstring columnName = attributes[c].attributeName;
+ stringWriter.writeValue(output, columnName);
+ }
}
// Write column types:
for (size_t c = 0; c < columnCount; c++) {
TypeId typeId = attributes[c].typeId;
- integerWriter.writeValue(output, static_cast<integer_t> (typeId));
+ if (writeHeader) integerWriter.writeValue(output, static_cast<integer_t> (typeId));
columnTypes[c] = typeId;
}