--- a/src/StreamRelationalReader.h Mon Sep 03 23:40:12 2018 +0200
+++ b/src/StreamRelationalReader.h Sat Sep 08 19:42:29 2018 +0200
@@ -67,6 +67,11 @@
throw RelpipeReaderException(L"Unsupported data type: " + (int) typeId);
}
+ void endOfPipe() {
+ for (int i = 0; i < stringHandlers.size(); i++) stringHandlers[i]->endOfPipe();
+ for (int i = 0; i < valueHandlers.size(); i++) valueHandlers[i]->endOfPipe();
+ }
+
public:
StreamRelationalReader(std::istream &input) :
@@ -100,11 +105,13 @@
// input was fully read
// we are finished
// TODO: printCachedData(output); ???
+ endOfPipe();
return;
} else if (dataPart == DATA_PART_START) {
// Empty relation might be weird but it is valid data.
// Actually, it is not so weird as it looks.
// fwprintf(stderr, L"Warning: The table has no rows. Weird… but OK.\n");
+ endOfPipe();
return;
} else {
// in current format, there is no other data part
@@ -182,4 +189,4 @@
};
}
-}
\ No newline at end of file
+}