src/Configuration.h
branchv_0
changeset 16 3c51a2c32c86
parent 15 0ecde5272f8e
child 24 884ece10575d
--- a/src/Configuration.h	Sat Oct 26 17:45:37 2019 +0200
+++ b/src/Configuration.h	Sat Oct 26 19:28:39 2019 +0200
@@ -58,6 +58,25 @@
 	Automatic
 };
 
+/**
+ * Allows copying relations from the input stream to the output stream.
+ * Such relations are specified by a regular expression.
+ * We can also specify the regex replacement string and rename such relations. 
+ */
+class CopyRelations {
+public:
+
+	CopyRelations(const relpipe::writer::string_t pattern, const relpipe::writer::string_t replacement, const relpipe::writer::boolean_t replace) : pattern(pattern), replacement(replacement), replace(replace) {
+	}
+
+	virtual ~CopyRelations() {
+	}
+
+	const relpipe::writer::string_t pattern;
+	const relpipe::writer::string_t replacement;
+	const relpipe::writer::boolean_t replace;
+};
+
 class Configuration {
 public:
 
@@ -80,13 +99,13 @@
 	 * SQL script to be executed before the relational input.
 	 */
 	std::wistream* sqlBeforeRelational = nullptr;
-	
+
 	/**
 	 * SQL script to be executed after the relational input.
 	 */
 	std::wistream* sqlAfterRelational = nullptr;
 
-	std::wstring dumpRelations;
+	std::vector<CopyRelations> copyRelations;
 
 	virtual ~Configuration() {
 	}