src/TabularPrefetchingHandler.h
branchv_0
changeset 39 f33464965693
parent 38 2cc2d3f658f4
child 40 59f3cb26bfe7
--- a/src/TabularPrefetchingHandler.h	Mon Jun 20 00:55:56 2022 +0200
+++ b/src/TabularPrefetchingHandler.h	Fri Jul 01 22:56:30 2022 +0200
@@ -40,6 +40,10 @@
 
 class TabularPrefetchingHandler : public handlers::RelationalReaderStringHandler {
 private:
+	
+	class ColorScheme {
+	};
+	
 	std::wstring_convert<std::codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
 	const char* ESC_BRIGHT = "\u001b[1m";
 	const char* ESC_RED = "\u001b[31m";
@@ -51,7 +55,9 @@
 	const char* ESC_HEADER = ESC_BRIGHT;
 	const char* ESC_BORDER = ESC_GREEN;
 	const char* ESC_VALUE = ESC_CYAN;
+	const char* ESC_RELATION = ESC_RED;
 	const char* ESC_REPLACEMENT = ESC_RED;
+	const char* ESC_COUNT = ESC_YELLOW;
 
 	const char* INDENT = " "; // table indent from the left
 
@@ -220,7 +226,7 @@
 
 		if (getConfiguration(writeRecordCount)) {
 			integer_t recordCount = values.size() / columnCount;
-			output << ESC_YELLOW << "Record count: " << ESC_RESET << recordCount << std::endl;
+			output << ESC_COUNT << "Record count: " << ESC_RESET << recordCount << std::endl;
 		}
 
 		values.clear();
@@ -242,7 +248,7 @@
 			}
 		}
 
-		if (getConfiguration(writeRelationName)) output << ESC_RED << convertor.to_bytes(name) << ":" << ESC_RESET << endl;
+		if (getConfiguration(writeRelationName)) output << ESC_RELATION << convertor.to_bytes(name) << ":" << ESC_RESET << endl;
 		columnCount = attributes.size();
 		columnTypes.resize(columnCount);
 		columnTypeCodes.resize(columnCount);