equal
deleted
inserted
replaced
5 #include <string> |
5 #include <string> |
6 #include <vector> |
6 #include <vector> |
7 #include <algorithm> |
7 #include <algorithm> |
8 |
8 |
9 #include <relpipe/writer/typedefs.h> |
9 #include <relpipe/writer/typedefs.h> |
|
10 #include <relpipe/writer/AttributeMetadata.h> |
10 |
11 |
11 #include "Command.h" |
12 #include "Command.h" |
12 |
13 |
13 namespace relpipe { |
14 namespace relpipe { |
14 namespace in { |
15 namespace in { |
27 |
28 |
28 // TODO: check argument count |
29 // TODO: check argument count |
29 |
30 |
30 std::shared_ptr<RelationalWriter> writer(Factory::create(output)); |
31 std::shared_ptr<RelationalWriter> writer(Factory::create(output)); |
31 |
32 |
32 std::vector<std::pair<string_t, TypeId >> attributes(attributeCount); |
33 std::vector<AttributeMetadata> attributes(attributeCount); |
33 |
34 |
34 for (size_t j = 0; j < attributeCount; j++) { |
35 for (size_t j = 0; j < attributeCount; j++) { |
35 string_t attributeName = arguments[i++]; |
36 string_t attributeName = arguments[i++]; |
36 TypeId attributeType = writer->toTypeId(arguments[i++]); |
37 TypeId attributeType = writer->toTypeId(arguments[i++]); |
37 attributes[j] = {attributeName, attributeType}; |
38 attributes[j] = {attributeName, attributeType}; |