equal
deleted
inserted
replaced
69 } |
69 } |
70 |
70 |
71 public: |
71 public: |
72 |
72 |
73 static const relpipe::writer::string_t OPTION_RELATION; |
73 static const relpipe::writer::string_t OPTION_RELATION; |
|
74 static const relpipe::writer::string_t OPTION_WRITE_HEADER; |
74 static const relpipe::writer::string_t OPTION_ATTRIBUTE; |
75 static const relpipe::writer::string_t OPTION_ATTRIBUTE; |
75 static const relpipe::writer::string_t OPTION_RECORD; |
76 static const relpipe::writer::string_t OPTION_RECORD; |
76 static const relpipe::writer::string_t OPTION_RECORDS; |
77 static const relpipe::writer::string_t OPTION_RECORDS; |
77 static const relpipe::writer::string_t OPTION_RECORDS_STDIN; |
78 static const relpipe::writer::string_t OPTION_RECORDS_STDIN; |
78 |
79 |
84 relpipe::writer::string_t option = readNext(arguments, i); |
85 relpipe::writer::string_t option = readNext(arguments, i); |
85 |
86 |
86 if (option == OPTION_RELATION) { |
87 if (option == OPTION_RELATION) { |
87 addRelation(c, currentRelation); // previous relation |
88 addRelation(c, currentRelation); // previous relation |
88 currentRelation.relation = readNext(arguments, i); |
89 currentRelation.relation = readNext(arguments, i); |
|
90 } else if (option == OPTION_WRITE_HEADER) { |
|
91 currentRelation.writeHeader = parseBoolean(readNext(arguments, i)); |
89 } else if (option == OPTION_ATTRIBUTE) { |
92 } else if (option == OPTION_ATTRIBUTE) { |
90 AttributeRecipe attribute; |
93 AttributeRecipe attribute; |
91 attribute.name = readNext(arguments, i); |
94 attribute.name = readNext(arguments, i); |
92 attribute.type = parseTypeId(readNext(arguments, i)); |
95 attribute.type = parseTypeId(readNext(arguments, i)); |
93 currentRelation.attributes.push_back(attribute); |
96 currentRelation.attributes.push_back(attribute); |
108 virtual ~CLIParser() { |
111 virtual ~CLIParser() { |
109 } |
112 } |
110 }; |
113 }; |
111 |
114 |
112 const relpipe::writer::string_t CLIParser::OPTION_RELATION = L"--relation"; |
115 const relpipe::writer::string_t CLIParser::OPTION_RELATION = L"--relation"; |
|
116 const relpipe::writer::string_t CLIParser::OPTION_WRITE_HEADER = L"--write-header"; |
113 const relpipe::writer::string_t CLIParser::OPTION_ATTRIBUTE = L"--attribute"; |
117 const relpipe::writer::string_t CLIParser::OPTION_ATTRIBUTE = L"--attribute"; |
114 const relpipe::writer::string_t CLIParser::OPTION_RECORD = L"--record"; |
118 const relpipe::writer::string_t CLIParser::OPTION_RECORD = L"--record"; |
115 const relpipe::writer::string_t CLIParser::OPTION_RECORDS = L"--records"; |
119 const relpipe::writer::string_t CLIParser::OPTION_RECORDS = L"--records"; |
116 const relpipe::writer::string_t CLIParser::OPTION_RECORDS_STDIN = L"--records-from-stdin"; |
120 const relpipe::writer::string_t CLIParser::OPTION_RECORDS_STDIN = L"--records-from-stdin"; |
117 |
121 |