src/Configuration.h
branchv_0
changeset 12 0b38339b871b
parent 10 7da7173d84b0
child 14 eacacf060755
--- a/src/Configuration.h	Tue Oct 22 16:04:23 2019 +0200
+++ b/src/Configuration.h	Tue Oct 22 16:04:56 2019 +0200
@@ -49,6 +49,15 @@
 	std::vector<Parameter> parameters;
 };
 
+enum class KeepFile {
+	/** The file will be kept even if it was created during this transformation, so all the input data will stay on the disk. */
+	Always,
+	/** The file will be deleted at the end of this transformation – even if the file already existed. This is potentially dangerous, because we can unintentionally delete a database file. */
+	Never,
+	/** The file will be kept only if it was already present before the transformation. */
+	Automatic
+};
+
 class Configuration {
 public:
 
@@ -61,9 +70,9 @@
 	relpipe::writer::string_t file;
 
 	/**
-	 * If true, the file (if any was created) will not be deleted when this transformation finishes.
+	 * see KeepFile documentation
 	 */
-	relpipe::writer::boolean_t keepFile = false;
+	KeepFile keepFile = KeepFile::Automatic;
 
 	std::vector<Statement> statements;