# HG changeset patch # User František Kučera # Date 1662830867 -7200 # Node ID e5421eea05836ca5edc3d6fd5de8e2145a3e91bf # Parent c8e34cb506a4e70483f9b13cd85362823d8f4e3e write record count (as a comment at the end of the relation) diff -r c8e34cb506a4 -r e5421eea0583 src/RecfileHandler.h --- a/src/RecfileHandler.h Sat Dec 04 21:14:52 2021 +0100 +++ b/src/RecfileHandler.h Sat Sep 10 19:27:47 2022 +0200 @@ -84,12 +84,20 @@ output << std::endl; } + void writeRecordCount() { + if (attributeCount) { + output << std::endl << "# Record count: " << (valueCount / attributeCount) << std::endl; + } + } + public: RecfileHandler(std::ostream& output) : output(output) { } void startRelation(string_t name, std::vector attributes) override { + writeRecordCount(); + valueCount = 0; attributeCount = 0; @@ -118,6 +126,7 @@ } void endOfPipe() { + writeRecordCount(); if (valueCount) writeSeparator(); }