rename function name

This commit is contained in:
nautaa 2020-12-02 17:00:27 +08:00
parent eb0c442763
commit 4cc56c2501
7 changed files with 17 additions and 17 deletions

View File

@ -243,7 +243,7 @@ void DataTypeAggregateFunction::deserializeTextJSON(IColumn & column, ReadBuffer
void DataTypeAggregateFunction::serializeTextXML(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const
{
writeXMLString(serializeToString(function, column, row_num), ostr);
writeXMLStringForTextElement(serializeToString(function, column, row_num), ostr);
}

View File

@ -85,7 +85,7 @@ void DataTypeCustomSimpleTextSerialization::deserializeTextJSON(IColumn & column
void DataTypeCustomSimpleTextSerialization::serializeTextXML(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings & settings) const
{
writeXMLString(serializeToString(*this, column, row_num, settings), ostr);
writeXMLStringForTextElement(serializeToString(*this, column, row_num, settings), ostr);
}
}

View File

@ -195,7 +195,7 @@ void DataTypeEnum<Type>::serializeTextJSON(const IColumn & column, size_t row_nu
template <typename Type>
void DataTypeEnum<Type>::serializeTextXML(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const
{
writeXMLString(getNameForValue(assert_cast<const ColumnType &>(column).getData()[row_num]), ostr);
writeXMLStringForTextElement(getNameForValue(assert_cast<const ColumnType &>(column).getData()[row_num]), ostr);
}
template <typename Type>

View File

@ -198,7 +198,7 @@ void DataTypeFixedString::deserializeTextJSON(IColumn & column, ReadBuffer & ist
void DataTypeFixedString::serializeTextXML(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const
{
const char * pos = reinterpret_cast<const char *>(&assert_cast<const ColumnFixedString &>(column).getChars()[n * row_num]);
writeXMLString(pos, pos + n, ostr);
writeXMLStringForTextElement(pos, pos + n, ostr);
}

View File

@ -295,7 +295,7 @@ void DataTypeString::deserializeTextJSON(IColumn & column, ReadBuffer & istr, co
void DataTypeString::serializeTextXML(const IColumn & column, size_t row_num, WriteBuffer & ostr, const FormatSettings &) const
{
writeXMLString(assert_cast<const ColumnString &>(column).getDataAt(row_num), ostr);
writeXMLStringForTextElement(assert_cast<const ColumnString &>(column).getDataAt(row_num), ostr);
}

View File

@ -581,7 +581,7 @@ void writeCSVString(const StringRef & s, WriteBuffer & buf)
writeCSVString<quote>(s.data, s.data + s.size, buf);
}
inline void writeHTMLString(const char * begin, const char * end, WriteBuffer & buf)
inline void writeXMLStringForTextElementOrAttributeValue(const char * begin, const char * end, WriteBuffer & buf)
{
const char * pos = begin;
while (true)
@ -625,18 +625,18 @@ inline void writeHTMLString(const char * begin, const char * end, WriteBuffer &
}
}
inline void writeHTMLString(const String & s, WriteBuffer & buf)
inline void writeXMLStringForTextElementOrAttributeValue(const String & s, WriteBuffer & buf)
{
writeHTMLString(s.data(), s.data() + s.size(), buf);
writeXMLStringForTextElementOrAttributeValue(s.data(), s.data() + s.size(), buf);
}
inline void writeHTMLString(const StringRef & s, WriteBuffer & buf)
inline void writeXMLStringForTextElementOrAttributeValue(const StringRef & s, WriteBuffer & buf)
{
writeHTMLString(s.data, s.data + s.size, buf);
writeXMLStringForTextElementOrAttributeValue(s.data, s.data + s.size, buf);
}
/// Writing a string to a text node in XML (not into an attribute - otherwise you need more escaping).
inline void writeXMLString(const char * begin, const char * end, WriteBuffer & buf)
inline void writeXMLStringForTextElement(const char * begin, const char * end, WriteBuffer & buf)
{
const char * pos = begin;
while (true)
@ -666,14 +666,14 @@ inline void writeXMLString(const char * begin, const char * end, WriteBuffer & b
}
}
inline void writeXMLString(const String & s, WriteBuffer & buf)
inline void writeXMLStringForTextElement(const String & s, WriteBuffer & buf)
{
writeXMLString(s.data(), s.data() + s.size(), buf);
writeXMLStringForTextElement(s.data(), s.data() + s.size(), buf);
}
inline void writeXMLString(const StringRef & s, WriteBuffer & buf)
inline void writeXMLStringForTextElement(const StringRef & s, WriteBuffer & buf)
{
writeXMLString(s.data, s.data + s.size, buf);
writeXMLStringForTextElement(s.data, s.data + s.size, buf);
}
template <typename IteratorSrc, typename IteratorDst>

View File

@ -67,10 +67,10 @@ void XMLRowOutputFormat::writePrefix()
writeCString("\t\t\t<column>\n", *ostr);
writeCString("\t\t\t\t<name>", *ostr);
writeXMLString(field.name, *ostr);
writeXMLStringForTextElement(field.name, *ostr);
writeCString("</name>\n", *ostr);
writeCString("\t\t\t\t<type>", *ostr);
writeXMLString(field.type->getName(), *ostr);
writeXMLStringForTextElement(field.type->getName(), *ostr);
writeCString("</type>\n", *ostr);
writeCString("\t\t\t</column>\n", *ostr);