mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
166 lines
7.3 KiB
Python
166 lines
7.3 KiB
Python
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
import grpc
|
|
|
|
import clickhouse_grpc_pb2 as clickhouse__grpc__pb2
|
|
|
|
|
|
class ClickHouseStub(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.ExecuteQuery = channel.unary_unary(
|
|
'/clickhouse.grpc.ClickHouse/ExecuteQuery',
|
|
request_serializer=clickhouse__grpc__pb2.QueryInfo.SerializeToString,
|
|
response_deserializer=clickhouse__grpc__pb2.Result.FromString,
|
|
)
|
|
self.ExecuteQueryWithStreamInput = channel.stream_unary(
|
|
'/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamInput',
|
|
request_serializer=clickhouse__grpc__pb2.QueryInfo.SerializeToString,
|
|
response_deserializer=clickhouse__grpc__pb2.Result.FromString,
|
|
)
|
|
self.ExecuteQueryWithStreamOutput = channel.unary_stream(
|
|
'/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamOutput',
|
|
request_serializer=clickhouse__grpc__pb2.QueryInfo.SerializeToString,
|
|
response_deserializer=clickhouse__grpc__pb2.Result.FromString,
|
|
)
|
|
self.ExecuteQueryWithStreamIO = channel.stream_stream(
|
|
'/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamIO',
|
|
request_serializer=clickhouse__grpc__pb2.QueryInfo.SerializeToString,
|
|
response_deserializer=clickhouse__grpc__pb2.Result.FromString,
|
|
)
|
|
|
|
|
|
class ClickHouseServicer(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
def ExecuteQuery(self, request, context):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def ExecuteQueryWithStreamInput(self, request_iterator, context):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def ExecuteQueryWithStreamOutput(self, request, context):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def ExecuteQueryWithStreamIO(self, request_iterator, context):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_ClickHouseServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'ExecuteQuery': grpc.unary_unary_rpc_method_handler(
|
|
servicer.ExecuteQuery,
|
|
request_deserializer=clickhouse__grpc__pb2.QueryInfo.FromString,
|
|
response_serializer=clickhouse__grpc__pb2.Result.SerializeToString,
|
|
),
|
|
'ExecuteQueryWithStreamInput': grpc.stream_unary_rpc_method_handler(
|
|
servicer.ExecuteQueryWithStreamInput,
|
|
request_deserializer=clickhouse__grpc__pb2.QueryInfo.FromString,
|
|
response_serializer=clickhouse__grpc__pb2.Result.SerializeToString,
|
|
),
|
|
'ExecuteQueryWithStreamOutput': grpc.unary_stream_rpc_method_handler(
|
|
servicer.ExecuteQueryWithStreamOutput,
|
|
request_deserializer=clickhouse__grpc__pb2.QueryInfo.FromString,
|
|
response_serializer=clickhouse__grpc__pb2.Result.SerializeToString,
|
|
),
|
|
'ExecuteQueryWithStreamIO': grpc.stream_stream_rpc_method_handler(
|
|
servicer.ExecuteQueryWithStreamIO,
|
|
request_deserializer=clickhouse__grpc__pb2.QueryInfo.FromString,
|
|
response_serializer=clickhouse__grpc__pb2.Result.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'clickhouse.grpc.ClickHouse', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
# This class is part of an EXPERIMENTAL API.
|
|
class ClickHouse(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
@staticmethod
|
|
def ExecuteQuery(request,
|
|
target,
|
|
options=(),
|
|
channel_credentials=None,
|
|
call_credentials=None,
|
|
insecure=False,
|
|
compression=None,
|
|
wait_for_ready=None,
|
|
timeout=None,
|
|
metadata=None):
|
|
return grpc.experimental.unary_unary(request, target, '/clickhouse.grpc.ClickHouse/ExecuteQuery',
|
|
clickhouse__grpc__pb2.QueryInfo.SerializeToString,
|
|
clickhouse__grpc__pb2.Result.FromString,
|
|
options, channel_credentials,
|
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
|
|
@staticmethod
|
|
def ExecuteQueryWithStreamInput(request_iterator,
|
|
target,
|
|
options=(),
|
|
channel_credentials=None,
|
|
call_credentials=None,
|
|
insecure=False,
|
|
compression=None,
|
|
wait_for_ready=None,
|
|
timeout=None,
|
|
metadata=None):
|
|
return grpc.experimental.stream_unary(request_iterator, target, '/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamInput',
|
|
clickhouse__grpc__pb2.QueryInfo.SerializeToString,
|
|
clickhouse__grpc__pb2.Result.FromString,
|
|
options, channel_credentials,
|
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
|
|
@staticmethod
|
|
def ExecuteQueryWithStreamOutput(request,
|
|
target,
|
|
options=(),
|
|
channel_credentials=None,
|
|
call_credentials=None,
|
|
insecure=False,
|
|
compression=None,
|
|
wait_for_ready=None,
|
|
timeout=None,
|
|
metadata=None):
|
|
return grpc.experimental.unary_stream(request, target, '/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamOutput',
|
|
clickhouse__grpc__pb2.QueryInfo.SerializeToString,
|
|
clickhouse__grpc__pb2.Result.FromString,
|
|
options, channel_credentials,
|
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
|
|
@staticmethod
|
|
def ExecuteQueryWithStreamIO(request_iterator,
|
|
target,
|
|
options=(),
|
|
channel_credentials=None,
|
|
call_credentials=None,
|
|
insecure=False,
|
|
compression=None,
|
|
wait_for_ready=None,
|
|
timeout=None,
|
|
metadata=None):
|
|
return grpc.experimental.stream_stream(request_iterator, target, '/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamIO',
|
|
clickhouse__grpc__pb2.QueryInfo.SerializeToString,
|
|
clickhouse__grpc__pb2.Result.FromString,
|
|
options, channel_credentials,
|
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|