MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / write

Method write

src/QueryPipeline/RemoteInserter.cpp:108–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107
108void RemoteInserter::write(Block block)
109{
110 try
111 {
112 connection.sendData(block, /* name */"", /* scalar */false);
113 }
114 catch (const NetException &)
115 {
116 /// Try to get more detailed exception from server
117 auto packet_type = connection.checkPacket(/* timeout_microseconds */0);
118 if (packet_type && *packet_type == Protocol::Server::Exception)
119 {
120 Packet packet = connection.receivePacket();
121 packet.exception->rethrow();
122 }
123
124 throw;
125 }
126}
127
128
129void RemoteInserter::writePrepared(ReadBuffer & buf, size_t size)

Callers

nothing calls this directly

Calls 4

sendDataMethod · 0.45
checkPacketMethod · 0.45
receivePacketMethod · 0.45
rethrowMethod · 0.45

Tested by

no test coverage detected