Closed makorne closed 3 months ago
hi) json type not yet implemented.
hah, it's already impelmentd in simple ydb (without sqlx) @makorne You need to use TypedValue{type: Json, value: TextValue}
But I cant use this
use ydb_unofficial::generated::ydb::r#type::PrimitiveTypeId::Json;
use ydb_unofficial::generated::ydb::TypedValue;
like
TypedValue{ r#type: Json, value: Some(json_str.to_owned())}
mismatched types [E0308] expected `Option<Type>`, found `PrimitiveTypeId`
becouse ydb_unofficial::generated::ydb::Type dont have a Json type:
Enum [ydb_grpc_bindings](https://docs.rs/ydb-grpc-bindings/0.0.1/ydb_grpc_bindings/index.html)::[generated](https://docs.rs/ydb-grpc-bindings/0.0.1/ydb_grpc_bindings/generated/index.html)::[ydb](https://docs.rs/ydb-grpc-bindings/0.0.1/ydb_grpc_bindings/generated/ydb/index.html)::[type](https://docs.rs/ydb-grpc-bindings/0.0.1/ydb_grpc_bindings/generated/ydb/type/index.html)::[Type](https://docs.rs/ydb-grpc-bindings/0.0.1/ydb_grpc_bindings/generated/ydb/type/enum.Type.html#)
[source](https://docs.rs/ydb-grpc-bindings/0.0.1/src/ydb_grpc_bindings/generated/ydb.rs.html#418-450) ·
pub enum Type { TypeId(i32), DecimalType(DecimalType), OptionalType(Box<OptionalType>), ListType(Box<ListType>), TupleType(TupleType), StructType(StructType), DictType(Box<DictType>), VariantType(VariantType), TaggedType(Box<TaggedType>), VoidType(i32), NullType(i32), EmptyListType(i32), EmptyDictType(i32), PgType(PgType), }
Please any example?
//use ydb::Value; It works with ydb official
use ydb_unofficial::generated::ydb::value::Value;
How to store json? Thanks!