mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +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)
|
void writeAnyEscapedString(const char * begin, const char * end, WriteBuffer & buf)
|
||||||
{
|
{
|
||||||
const char * pos = begin;
|
const char * pos = begin;
|
||||||
@ -304,7 +304,7 @@ void writeAnyEscapedString(const char * begin, const char * end, WriteBuffer & b
|
|||||||
writeChar('\\', buf);
|
writeChar('\\', buf);
|
||||||
break;
|
break;
|
||||||
case c:
|
case c:
|
||||||
writeChar(symbol, buf);
|
writeChar(escape_symbol, buf);
|
||||||
writeChar(c, buf);
|
writeChar(c, buf);
|
||||||
break;
|
break;
|
||||||
default:
|
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)
|
void writeAnyQuotedString(const char * begin, const char * end, WriteBuffer & buf)
|
||||||
{
|
{
|
||||||
writeChar(c, buf);
|
writeChar(c, buf);
|
||||||
writeAnyEscapedString<c, symbol>(begin, end, buf);
|
writeAnyEscapedString<c, escape_symbol>(begin, end, buf);
|
||||||
writeChar(c, buf);
|
writeChar(c, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <char c, char symbol = '\\'>
|
template <char c, char escape_symbol = '\\'>
|
||||||
void writeAnyQuotedString(const String & s, WriteBuffer & buf)
|
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)
|
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 <IO/WriteHelpers.h>
|
||||||
#include <Parsers/ASTLiteral.h>
|
#include <Parsers/ASTLiteral.h>
|
||||||
#include <mysqlxx/Transaction.h>
|
#include <mysqlxx/Transaction.h>
|
||||||
#include <Parsers/ASTInsertQuery.h>
|
|
||||||
#include <Parsers/ASTIdentifier.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
|
Loading…
Reference in New Issue
Block a user