equal
deleted
inserted
replaced
51 * @param writer |
51 * @param writer |
52 * @param field |
52 * @param field |
53 */ |
53 */ |
54 virtual void writeEmptyField(RelationalWriter* writer, const RequestedField& field) { |
54 virtual void writeEmptyField(RelationalWriter* writer, const RequestedField& field) { |
55 // TODO: better handling of null values (when null values are supported by the format specification) |
55 // TODO: better handling of null values (when null values are supported by the format specification) |
56 for (AttributeMetadata m : toMetadata(field)) { |
56 for (AttributeMetadata m : toMetadata(writer, field)) { |
57 switch (m.typeId) { |
57 switch (m.typeId) { |
58 case TypeId::BOOLEAN: |
58 case TypeId::BOOLEAN: |
59 writer->writeAttribute(L"false"); |
59 writer->writeAttribute(L"false"); |
60 break; |
60 break; |
61 case TypeId::INTEGER: |
61 case TypeId::INTEGER: |
73 public: |
73 public: |
74 |
74 |
75 /** |
75 /** |
76 * Single requested fields might generate multiple attributes in the relation. |
76 * Single requested fields might generate multiple attributes in the relation. |
77 * But usually it is 1:1. |
77 * But usually it is 1:1. |
|
78 * @param writer can be used for TypeId coversion from string_t |
78 * @param field requested field from the user (usually from CLI arguments) |
79 * @param field requested field from the user (usually from CLI arguments) |
79 * @return attribute metadata to be used in the RelationalWriter.startRelation() |
80 * @return attribute metadata to be used in the RelationalWriter.startRelation() |
80 */ |
81 */ |
81 virtual vector<AttributeMetadata> toMetadata(const RequestedField& field) = 0; |
82 virtual vector<AttributeMetadata> toMetadata(RelationalWriter* writer, const RequestedField& field) = 0; |
82 |
83 |
83 /** |
84 /** |
84 * Writing of the record for current file is starting. |
85 * Writing of the record for current file is starting. |
85 * Following writeField() calls are related to this file. |
86 * Following writeField() calls are related to this file. |
86 * @param file path to the file |
87 * @param file path to the file |