mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
some review fixes
This commit is contained in:
parent
1786407621
commit
b9cb1feb4c
@ -255,7 +255,7 @@ inline void writeJSONString(const char * begin, const char * end, WriteBuffer &
|
||||
}
|
||||
|
||||
|
||||
template <char c, char symbol = '\\'>
|
||||
template <char c, char escape_symbol = '\\'>
|
||||
void writeAnyEscapedString(const char * begin, const char * end, WriteBuffer & buf)
|
||||
{
|
||||
const char * pos = begin;
|
||||
@ -304,7 +304,7 @@ void writeAnyEscapedString(const char * begin, const char * end, WriteBuffer & b
|
||||
writeChar('\\', buf);
|
||||
break;
|
||||
case c:
|
||||
writeChar(symbol, buf);
|
||||
writeChar(escape_symbol, buf);
|
||||
writeChar(c, buf);
|
||||
break;
|
||||
default:
|
||||
@ -353,27 +353,27 @@ inline void writeEscapedString(const StringRef & ref, WriteBuffer & buf)
|
||||
}
|
||||
|
||||
|
||||
template <char c, char symbol = '\\'>
|
||||
template <char c, char escape_symbol = '\\'>
|
||||
void writeAnyQuotedString(const char * begin, const char * end, WriteBuffer & buf)
|
||||
{
|
||||
writeChar(c, buf);
|
||||
writeAnyEscapedString<c, symbol>(begin, end, buf);
|
||||
writeAnyEscapedString<c, escape_symbol>(begin, end, buf);
|
||||
writeChar(c, buf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <char c, char symbol = '\\'>
|
||||
template <char c, char escape_symbol = '\\'>
|
||||
void writeAnyQuotedString(const String & s, WriteBuffer & buf)
|
||||
{
|
||||
writeAnyQuotedString<c, symbol>(s.data(), s.data() + s.size(), buf);
|
||||
writeAnyQuotedString<c, escape_symbol>(s.data(), s.data() + s.size(), buf);
|
||||
}
|
||||
|
||||
|
||||
template <char c, char symbol = '\\'>
|
||||
template <char c, char escape_symbol = '\\'>
|
||||
void writeAnyQuotedString(const StringRef & ref, WriteBuffer & buf)
|
||||
{
|
||||
writeAnyQuotedString<c, symbol>(ref.data, ref.data + ref.size, buf);
|
||||
writeAnyQuotedString<c, escape_symbol>(ref.data, ref.data + ref.size, buf);
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,8 +15,6 @@
|
||||
#include <IO/WriteHelpers.h>
|
||||
#include <Parsers/ASTLiteral.h>
|
||||
#include <mysqlxx/Transaction.h>
|
||||
#include <Parsers/ASTInsertQuery.h>
|
||||
#include <Parsers/ASTIdentifier.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
|
Loading…
Reference in New Issue
Block a user