Complete GRPC sending
Closes the sending channel in a client or bidirectional stream
- Parameters
- Advanced call ?
Function CompleteGRPCSending(Val Connection, Val StreamID) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Connection | - | Arbitrary | ✔ | Connection object |
| StreamID | - | String | ✔ | Stream Identifier |
Returns
Map Of KeyAndValue - Processing result
This method has no additional advanced call parameters.
Caution
NOCLI: this method is not available in CLI version
1C:Enterprise/OneScript code example
URL = "http://localhost:9101";
Login = "bayselonarrend";
Password = "12we...";
Authorization = New Structure(Login, Password);
ConnectionSettings = OPI_ClickHouse.GetGRPCConnectionSettings(URL, Authorization);
Connection = OPI_ClickHouse.CreateGRPCConnection(ConnectionSettings);
Timeout = 10000;
OpeningResult = OPI_ClickHouse.OpenGRPCStream(Connection, Timeout);
If Not OpeningResult["result"] Then
Raise OpeningResult["error"];
Else
StreamID = OpeningResult["streamId"];
EndIf;
QueryText = "SELECT number FROM system.numbers LIMIT 1";
Request = OPI_ClickHouse.GetRequestSettings(QueryText, , , , "JSON");
Sending = OPI_ClickHouse.SendGRPCMessage(Connection, StreamID, Request);
Result = OPI_ClickHouse.CompleteGRPCSending(Connection, StreamID);
Result
{
"result": true
}