--- a/src/AwkHandler.h Tue May 07 16:38:12 2019 +0200
+++ b/src/AwkHandler.h Tue May 07 17:03:07 2019 +0200
@@ -257,20 +257,14 @@
void attribute(const string_t& value) override {
if (currentRelationConfiguration) {
- string_t variableName = a2v(currentReaderMetadata[currentAttributeIndex].getAttributeName());
- string_t variableValue = escapeAwkValue(value);
-
currentAttributeIndex++;
currentAttributeIndex = currentAttributeIndex % currentReaderMetadata.size();
- // TODO: just the value – move name to the AWK function
- std::string variablePair = convertor.to_bytes(variableName + L"=" + variableValue);
+ std::string awkValue = convertor.to_bytes(escapeAwkValue(value));
+ if (currentAttributeIndex == 0) awkValue += "\n";
+ else awkValue += "\t";
- if (currentAttributeIndex == 0) variablePair += "\n";
- else variablePair += "\t";
-
- write(awkInputWriterFD, variablePair.c_str(), variablePair.length());
-
+ write(awkInputWriterFD, awkValue.c_str(), awkValue.length());
} else {
relationalWriter->writeAttribute(value);
}