@@ -1260,11 +1260,21 @@ class TValueParser::TImpl {
12601260 return GetProto ().bytes_value ();
12611261 }
12621262
1263+ const std::string& GetBytes () const {
1264+ CheckPrimitive (NYdb::EPrimitiveType::Bytes);
1265+ return GetProto ().bytes_value ();
1266+ }
1267+
12631268 const std::string& GetUtf8 () const {
12641269 CheckPrimitive (NYdb::EPrimitiveType::Utf8);
12651270 return GetProto ().text_value ();
12661271 }
12671272
1273+ const std::string& GetText () const {
1274+ CheckPrimitive (NYdb::EPrimitiveType::Text);
1275+ return GetProto ().text_value ();
1276+ }
1277+
12681278 const std::string& GetYson () const {
12691279 CheckPrimitive (NYdb::EPrimitiveType::Yson);
12701280 return GetProto ().bytes_value ();
@@ -1635,9 +1645,9 @@ class TValueParser::TImpl {
16351645 case NYdb::EPrimitiveType::TzDatetime:
16361646 case NYdb::EPrimitiveType::TzTimestamp:
16371647 return Ydb::Value::kTextValue ;
1638- case NYdb::EPrimitiveType::String :
1648+ case NYdb::EPrimitiveType::Bytes :
16391649 return Ydb::Value::kBytesValue ;
1640- case NYdb::EPrimitiveType::Utf8 :
1650+ case NYdb::EPrimitiveType::Text :
16411651 return Ydb::Value::kTextValue ;
16421652 case NYdb::EPrimitiveType::Yson:
16431653 return Ydb::Value::kBytesValue ;
@@ -1780,10 +1790,18 @@ const std::string& TValueParser::GetString() const {
17801790 return Impl_->GetString ();
17811791}
17821792
1793+ const std::string& TValueParser::GetBytes () const {
1794+ return Impl_->GetBytes ();
1795+ }
1796+
17831797const std::string& TValueParser::GetUtf8 () const {
17841798 return Impl_->GetUtf8 ();
17851799}
17861800
1801+ const std::string& TValueParser::GetText () const {
1802+ return Impl_->GetText ();
1803+ }
1804+
17871805const std::string& TValueParser::GetYson () const {
17881806 return Impl_->GetYson ();
17891807}
@@ -1912,10 +1930,18 @@ std::optional<std::string> TValueParser::GetOptionalString() const {
19121930 RET_OPT_VALUE (std::string, String);
19131931}
19141932
1933+ std::optional<std::string> TValueParser::GetOptionalBytes () const {
1934+ RET_OPT_VALUE (std::string, Bytes);
1935+ }
1936+
19151937std::optional<std::string> TValueParser::GetOptionalUtf8 () const {
19161938 RET_OPT_VALUE (std::string, Utf8);
19171939}
19181940
1941+ std::optional<std::string> TValueParser::GetOptionalText () const {
1942+ RET_OPT_VALUE (std::string, Text);
1943+ }
1944+
19191945std::optional<std::string> TValueParser::GetOptionalYson () const {
19201946 RET_OPT_VALUE (std::string, Yson);
19211947}
@@ -2228,11 +2254,21 @@ class TValueBuilderImpl {
22282254 GetValue ().set_bytes_value (TStringType{value});
22292255 }
22302256
2257+ void Bytes (const std::string& value) {
2258+ FillPrimitiveType (EPrimitiveType::Bytes);
2259+ GetValue ().set_bytes_value (TStringType{value});
2260+ }
2261+
22312262 void Utf8 (const std::string& value) {
22322263 FillPrimitiveType (EPrimitiveType::Utf8);
22332264 GetValue ().set_text_value (TStringType{value});
22342265 }
22352266
2267+ void Text (const std::string& value) {
2268+ FillPrimitiveType (EPrimitiveType::Text);
2269+ GetValue ().set_text_value (TStringType{value});
2270+ }
2271+
22362272 void Yson (const std::string& value) {
22372273 FillPrimitiveType (EPrimitiveType::Yson);
22382274 GetValue ().set_bytes_value (TStringType{value});
@@ -3001,12 +3037,24 @@ TDerived& TValueBuilderBase<TDerived>::String(const std::string& value) {
30013037 return static_cast <TDerived&>(*this );
30023038}
30033039
3040+ template <typename TDerived>
3041+ TDerived& TValueBuilderBase<TDerived>::Bytes(const std::string& value) {
3042+ Impl_->Bytes (value);
3043+ return static_cast <TDerived&>(*this );
3044+ }
3045+
30043046template <typename TDerived>
30053047TDerived& TValueBuilderBase<TDerived>::Utf8(const std::string& value) {
30063048 Impl_->Utf8 (value);
30073049 return static_cast <TDerived&>(*this );
30083050}
30093051
3052+ template <typename TDerived>
3053+ TDerived& TValueBuilderBase<TDerived>::Text(const std::string& value) {
3054+ Impl_->Text (value);
3055+ return static_cast <TDerived&>(*this );
3056+ }
3057+
30103058template <typename TDerived>
30113059TDerived& TValueBuilderBase<TDerived>::Yson(const std::string& value) {
30123060 Impl_->Yson (value);
@@ -3180,11 +3228,21 @@ TDerived& TValueBuilderBase<TDerived>::OptionalString(const std::optional<std::s
31803228 SET_OPT_VALUE_FROM_OPTIONAL (String);
31813229}
31823230
3231+ template <typename TDerived>
3232+ TDerived& TValueBuilderBase<TDerived>::OptionalBytes(const std::optional<std::string>& value) {
3233+ SET_OPT_VALUE_FROM_OPTIONAL (Bytes);
3234+ }
3235+
31833236template <typename TDerived>
31843237TDerived& TValueBuilderBase<TDerived>::OptionalUtf8(const std::optional<std::string>& value) {
31853238 SET_OPT_VALUE_FROM_OPTIONAL (Utf8);
31863239}
31873240
3241+ template <typename TDerived>
3242+ TDerived& TValueBuilderBase<TDerived>::OptionalText(const std::optional<std::string>& value) {
3243+ SET_OPT_VALUE_FROM_OPTIONAL (Text);
3244+ }
3245+
31883246template <typename TDerived>
31893247TDerived& TValueBuilderBase<TDerived>::OptionalYson(const std::optional<std::string>& value) {
31903248 SET_OPT_VALUE_FROM_OPTIONAL (Yson);
0 commit comments