64 static const string_t OPTION_AFTER_RECORDS; |
64 static const string_t OPTION_AFTER_RECORDS; |
65 static const string_t OPTION_FOR_EACH; |
65 static const string_t OPTION_FOR_EACH; |
66 static const string_t OPTION_WHERE; |
66 static const string_t OPTION_WHERE; |
67 static const string_t OPTION_DROP; |
67 static const string_t OPTION_DROP; |
68 static const string_t OPTION_DEFINE; |
68 static const string_t OPTION_DEFINE; |
|
69 static const string_t OPTION_HAS_MORE_RECORDS; |
69 |
70 |
70 Configuration parse(const std::vector<string_t>& arguments) { |
71 Configuration parse(const std::vector<string_t>& arguments) { |
71 Configuration c; |
72 Configuration c; |
72 RelationConfiguration currentRelation; |
73 RelationConfiguration currentRelation; |
73 |
74 |
77 |
78 |
78 if (option == OPTION_BEFORE_RECORDS) currentRelation.guileBeforeRecords = readNext(arguments, i); |
79 if (option == OPTION_BEFORE_RECORDS) currentRelation.guileBeforeRecords = readNext(arguments, i); |
79 else if (option == OPTION_AFTER_RECORDS) currentRelation.guileAfterRecords = readNext(arguments, i); |
80 else if (option == OPTION_AFTER_RECORDS) currentRelation.guileAfterRecords = readNext(arguments, i); |
80 else if (option == OPTION_FOR_EACH) currentRelation.guileForEach = readNext(arguments, i); |
81 else if (option == OPTION_FOR_EACH) currentRelation.guileForEach = readNext(arguments, i); |
81 else if (option == OPTION_WHERE) currentRelation.guileWhere = readNext(arguments, i); |
82 else if (option == OPTION_WHERE) currentRelation.guileWhere = readNext(arguments, i); |
|
83 else if (option == OPTION_HAS_MORE_RECORDS) currentRelation.guileHasMoreRecords = readNext(arguments, i); |
82 else if (option == OPTION_DROP) currentRelation.drop = true; |
84 else if (option == OPTION_DROP) currentRelation.drop = true; |
83 else if (option == OPTION_INPUT_ATTRIBUTES_APPEND) currentRelation.inputAttributesAppend = true; |
85 else if (option == OPTION_INPUT_ATTRIBUTES_APPEND) currentRelation.inputAttributesAppend = true; |
84 else if (option == OPTION_INPUT_ATTRIBUTES_PREPEND) currentRelation.inputAttributesPrepend = true; |
86 else if (option == OPTION_INPUT_ATTRIBUTES_PREPEND) currentRelation.inputAttributesPrepend = true; |
85 else if (option == OPTION_RELATION) { |
87 else if (option == OPTION_RELATION) { |
86 addRelation(c, currentRelation); // previous relation |
88 addRelation(c, currentRelation); // previous relation |
119 const string_t CLIParser::OPTION_AFTER_RECORDS = L"--after-records"; |
121 const string_t CLIParser::OPTION_AFTER_RECORDS = L"--after-records"; |
120 const string_t CLIParser::OPTION_FOR_EACH = L"--for-each"; |
122 const string_t CLIParser::OPTION_FOR_EACH = L"--for-each"; |
121 const string_t CLIParser::OPTION_WHERE = L"--where"; |
123 const string_t CLIParser::OPTION_WHERE = L"--where"; |
122 const string_t CLIParser::OPTION_DROP = L"--drop"; |
124 const string_t CLIParser::OPTION_DROP = L"--drop"; |
123 const string_t CLIParser::OPTION_DEFINE = L"--define"; |
125 const string_t CLIParser::OPTION_DEFINE = L"--define"; |
|
126 const string_t CLIParser::OPTION_HAS_MORE_RECORDS = L"--has-more-records"; |
124 |
127 |
125 } |
128 } |
126 } |
129 } |
127 } |
130 } |