mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
style check
This commit is contained in:
parent
0ed77453d3
commit
baa62f2aba
@ -154,8 +154,8 @@ public:
|
||||
class PacketPayloadReadBuffer : public ReadBuffer
|
||||
{
|
||||
public:
|
||||
PacketPayloadReadBuffer(ReadBuffer & in, size_t & sequence_id): ReadBuffer(in.position(), 0), in(in), sequence_id(sequence_id) {
|
||||
nextImpl();
|
||||
PacketPayloadReadBuffer(ReadBuffer & in, size_t & sequence_id): ReadBuffer(in.position(), 0), in(in), sequence_id(sequence_id)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
@ -645,7 +645,7 @@ class LengthEncodedNumber : public WritePacket
|
||||
{
|
||||
uint64_t value;
|
||||
public:
|
||||
LengthEncodedNumber(uint64_t value): value(value)
|
||||
explicit LengthEncodedNumber(uint64_t value): value(value)
|
||||
{
|
||||
}
|
||||
|
||||
@ -657,20 +657,18 @@ public:
|
||||
|
||||
class ResultsetRow : public WritePacket
|
||||
{
|
||||
std::vector<Vector> columns;
|
||||
std::vector<String> columns;
|
||||
public:
|
||||
ResultsetRow()
|
||||
{
|
||||
}
|
||||
ResultsetRow() = default;
|
||||
|
||||
void appendColumn(Vector value)
|
||||
void appendColumn(String & value)
|
||||
{
|
||||
columns.emplace_back(std::move(value));
|
||||
}
|
||||
|
||||
void writePayload(WriteBuffer & buffer) const override
|
||||
{
|
||||
for (const Vector & column : columns)
|
||||
for (const String & column : columns)
|
||||
writeLengthEncodedString(column, buffer);
|
||||
}
|
||||
};
|
||||
|
@ -49,7 +49,8 @@ inline void writeChar(char x, WriteBuffer & buf)
|
||||
|
||||
inline void writeChar(char c, size_t n, WriteBuffer & buf)
|
||||
{
|
||||
while (n) {
|
||||
while (n)
|
||||
{
|
||||
buf.nextIfAtEnd();
|
||||
size_t count = std::min(n, buf.available());
|
||||
memset(buf.position(), c, count);
|
||||
|
Loading…
Reference in New Issue
Block a user