@@ -669,6 +669,153 @@ func TestSet(t *testing.T) {
669669 },
670670 },
671671 },
672+ {
673+ name : xtest .CurrentFileLine (),
674+ builder : Builder {}.Param ("$x" ).Set ().AddItem ().JSON (`{"a": 1,"b": "B"}` ).Build (),
675+ params : map [string ]* Ydb.TypedValue {
676+ "$x" : {
677+ Type : & Ydb.Type {
678+ Type : & Ydb.Type_DictType {
679+ DictType : & Ydb.DictType {
680+ Key : & Ydb.Type {
681+ Type : & Ydb.Type_TypeId {
682+ TypeId : Ydb .Type_JSON ,
683+ },
684+ },
685+ Payload : & Ydb.Type {
686+ Type : & Ydb.Type_VoidType {},
687+ },
688+ },
689+ },
690+ },
691+ Value : & Ydb.Value {
692+ Pairs : []* Ydb.ValuePair {
693+ {
694+ Key : & Ydb.Value {
695+ Value : & Ydb.Value_TextValue {
696+ TextValue : `{"a": 1,"b": "B"}` ,
697+ },
698+ },
699+ Payload : & Ydb.Value {
700+ Value : & Ydb.Value_NullFlagValue {},
701+ },
702+ },
703+ },
704+ },
705+ },
706+ },
707+ },
708+ {
709+ name : xtest .CurrentFileLine (),
710+ builder : Builder {}.Param ("$x" ).Set ().AddItem ().JSONDocument (`{"a": 1,"b": "B"}` ).Build (),
711+ params : map [string ]* Ydb.TypedValue {
712+ "$x" : {
713+ Type : & Ydb.Type {
714+ Type : & Ydb.Type_DictType {
715+ DictType : & Ydb.DictType {
716+ Key : & Ydb.Type {
717+ Type : & Ydb.Type_TypeId {
718+ TypeId : Ydb .Type_JSON_DOCUMENT ,
719+ },
720+ },
721+ Payload : & Ydb.Type {
722+ Type : & Ydb.Type_VoidType {},
723+ },
724+ },
725+ },
726+ },
727+ Value : & Ydb.Value {
728+ Pairs : []* Ydb.ValuePair {
729+ {
730+ Key : & Ydb.Value {
731+ Value : & Ydb.Value_TextValue {
732+ TextValue : `{"a": 1,"b": "B"}` ,
733+ },
734+ },
735+ Payload : & Ydb.Value {
736+ Value : & Ydb.Value_NullFlagValue {},
737+ },
738+ },
739+ },
740+ },
741+ },
742+ },
743+ },
744+ {
745+ name : xtest .CurrentFileLine (),
746+ builder : Builder {}.Param ("$x" ).Set ().AddItem ().YSON ([]byte (`[ 1; 2; 3; 4; 5 ]` )).Build (),
747+ params : map [string ]* Ydb.TypedValue {
748+ "$x" : {
749+ Type : & Ydb.Type {
750+ Type : & Ydb.Type_DictType {
751+ DictType : & Ydb.DictType {
752+ Key : & Ydb.Type {
753+ Type : & Ydb.Type_TypeId {
754+ TypeId : Ydb .Type_YSON ,
755+ },
756+ },
757+ Payload : & Ydb.Type {
758+ Type : & Ydb.Type_VoidType {},
759+ },
760+ },
761+ },
762+ },
763+ Value : & Ydb.Value {
764+ Pairs : []* Ydb.ValuePair {
765+ {
766+ Key : & Ydb.Value {
767+ Value : & Ydb.Value_BytesValue {
768+ BytesValue : []byte (`[ 1; 2; 3; 4; 5 ]` ),
769+ },
770+ },
771+ Payload : & Ydb.Value {
772+ Value : & Ydb.Value_NullFlagValue {},
773+ },
774+ },
775+ },
776+ },
777+ },
778+ },
779+ },
780+ {
781+ name : xtest .CurrentFileLine (),
782+ builder : Builder {}.Param ("$x" ).Set ().AddItem ().
783+ UUID ([... ]byte {1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 }).
784+ Build (),
785+ params : map [string ]* Ydb.TypedValue {
786+ "$x" : {
787+ Type : & Ydb.Type {
788+ Type : & Ydb.Type_DictType {
789+ DictType : & Ydb.DictType {
790+ Key : & Ydb.Type {
791+ Type : & Ydb.Type_TypeId {
792+ TypeId : Ydb .Type_UUID ,
793+ },
794+ },
795+ Payload : & Ydb.Type {
796+ Type : & Ydb.Type_VoidType {},
797+ },
798+ },
799+ },
800+ },
801+ Value : & Ydb.Value {
802+ Pairs : []* Ydb.ValuePair {
803+ {
804+ Key : & Ydb.Value {
805+ Value : & Ydb.Value_Low_128 {
806+ Low_128 : 651345242494996240 ,
807+ },
808+ High_128 : 72623859790382856 ,
809+ },
810+ Payload : & Ydb.Value {
811+ Value : & Ydb.Value_NullFlagValue {},
812+ },
813+ },
814+ },
815+ },
816+ },
817+ },
818+ },
672819 } {
673820 t .Run (tt .name , func (t * testing.T ) {
674821 a := allocator .New ()
0 commit comments