From d52cc61fb9bf9b578c28c92f4f26cfbaaf4463e0 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Mon, 14 Oct 2024 14:57:22 +0300 Subject: [PATCH] Add build method to QueryOnlineReadOnly mode --- ydb/_grpc/grpcwrapper/ydb_query_public_types.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py index 9888a677..fc952652 100644 --- a/ydb/_grpc/grpcwrapper/ydb_query_public_types.py +++ b/ydb/_grpc/grpcwrapper/ydb_query_public_types.py @@ -70,6 +70,10 @@ def __init__(self, allow_inconsistent_reads: bool = False): def name(self): return self._name + def with_allow_inconsistent_reads(self) -> "QueryOnlineReadOnly": + self.allow_inconsistent_reads = True + return self + def to_proto(self) -> ydb_query_pb2.OnlineModeSettings: return ydb_query_pb2.OnlineModeSettings(allow_inconsistent_reads=self.allow_inconsistent_reads)