src/CLIParser.h
branchv_0
changeset 15 051e58022783
parent 14 82bd0f57a889
child 16 2dcc22b7a424
equal deleted inserted replaced
14:82bd0f57a889 15:051e58022783
    56 
    56 
    57 public:
    57 public:
    58 
    58 
    59 	static const string_t OPTION_RELATION;
    59 	static const string_t OPTION_RELATION;
    60 	static const string_t OPTION_OUTPUT_ATTRIBUTE;
    60 	static const string_t OPTION_OUTPUT_ATTRIBUTE;
       
    61 	static const string_t OPTION_INPUT_ATTRIBUTES_APPEND;
       
    62 	static const string_t OPTION_INPUT_ATTRIBUTES_PREPEND;
    61 	static const string_t OPTION_BEFORE_RECORDS;
    63 	static const string_t OPTION_BEFORE_RECORDS;
    62 	static const string_t OPTION_AFTER_RECORDS;
    64 	static const string_t OPTION_AFTER_RECORDS;
    63 	static const string_t OPTION_FOR_EACH;
    65 	static const string_t OPTION_FOR_EACH;
    64 	static const string_t OPTION_WHERE;
    66 	static const string_t OPTION_WHERE;
    65 	static const string_t OPTION_DROP;
    67 	static const string_t OPTION_DROP;
    76 				if (option == OPTION_BEFORE_RECORDS) currentRelation.guileBeforeRecords = readNext(arguments, i);
    78 				if (option == OPTION_BEFORE_RECORDS) currentRelation.guileBeforeRecords = readNext(arguments, i);
    77 				else if (option == OPTION_AFTER_RECORDS) currentRelation.guileAfterRecords = readNext(arguments, i);
    79 				else if (option == OPTION_AFTER_RECORDS) currentRelation.guileAfterRecords = readNext(arguments, i);
    78 				else if (option == OPTION_FOR_EACH) currentRelation.guileForEach = readNext(arguments, i);
    80 				else if (option == OPTION_FOR_EACH) currentRelation.guileForEach = readNext(arguments, i);
    79 				else if (option == OPTION_WHERE) currentRelation.guileWhere = readNext(arguments, i);
    81 				else if (option == OPTION_WHERE) currentRelation.guileWhere = readNext(arguments, i);
    80 				else if (option == OPTION_DROP) currentRelation.drop = true;
    82 				else if (option == OPTION_DROP) currentRelation.drop = true;
       
    83 				else if (option == OPTION_INPUT_ATTRIBUTES_APPEND) currentRelation.inputAttributesAppend = true;
       
    84 				else if (option == OPTION_INPUT_ATTRIBUTES_PREPEND) currentRelation.inputAttributesPrepend = true;
    81 				else if (option == OPTION_RELATION) {
    85 				else if (option == OPTION_RELATION) {
    82 					addRelation(c, currentRelation); // previous relation
    86 					addRelation(c, currentRelation); // previous relation
    83 					currentRelation.relation = readNext(arguments, i);
    87 					currentRelation.relation = readNext(arguments, i);
    84 				} else if (option == OPTION_OUTPUT_ATTRIBUTE) {
    88 				} else if (option == OPTION_OUTPUT_ATTRIBUTE) {
    85 					relpipe::writer::AttributeMetadata attribute;
    89 					relpipe::writer::AttributeMetadata attribute;
   107 	}
   111 	}
   108 };
   112 };
   109 
   113 
   110 const string_t CLIParser::OPTION_RELATION = L"--relation";
   114 const string_t CLIParser::OPTION_RELATION = L"--relation";
   111 const string_t CLIParser::OPTION_OUTPUT_ATTRIBUTE = L"--output-attribute";
   115 const string_t CLIParser::OPTION_OUTPUT_ATTRIBUTE = L"--output-attribute";
       
   116 const string_t CLIParser::OPTION_INPUT_ATTRIBUTES_APPEND = L"--input-attributes-append";
       
   117 const string_t CLIParser::OPTION_INPUT_ATTRIBUTES_PREPEND = L"--input-attributes-prepend";
   112 const string_t CLIParser::OPTION_BEFORE_RECORDS = L"--before-records";
   118 const string_t CLIParser::OPTION_BEFORE_RECORDS = L"--before-records";
   113 const string_t CLIParser::OPTION_AFTER_RECORDS = L"--after-records";
   119 const string_t CLIParser::OPTION_AFTER_RECORDS = L"--after-records";
   114 const string_t CLIParser::OPTION_FOR_EACH = L"--for-each";
   120 const string_t CLIParser::OPTION_FOR_EACH = L"--for-each";
   115 const string_t CLIParser::OPTION_WHERE = L"--where";
   121 const string_t CLIParser::OPTION_WHERE = L"--where";
   116 const string_t CLIParser::OPTION_DROP = L"--drop";
   122 const string_t CLIParser::OPTION_DROP = L"--drop";