@@ -11,6 +11,7 @@ import (
1111
1212 "github.com/tarantool/go-tarantool/v3"
1313 "github.com/tarantool/go-tarantool/v3/crud"
14+ "github.com/tarantool/go-option"
1415)
1516
1617const validSpace = "test" // Any valid value != default.
@@ -102,7 +103,7 @@ func BenchmarkLenRequest(b *testing.B) {
102103 buf .Reset ()
103104 req := crud .MakeLenRequest (spaceName ).
104105 Opts (crud.LenOpts {
105- Timeout : crud . MakeOptFloat64 (3.5 ),
106+ Timeout : option . SomeFloat64 (3.5 ),
106107 })
107108 if err := req .Body (nil , enc ); err != nil {
108109 b .Error (err )
@@ -121,9 +122,9 @@ func BenchmarkSelectRequest(b *testing.B) {
121122 buf .Reset ()
122123 req := crud .MakeSelectRequest (spaceName ).
123124 Opts (crud.SelectOpts {
124- Timeout : crud . MakeOptFloat64 (3.5 ),
125- VshardRouter : crud . MakeOptString ("asd" ),
126- Balance : crud . MakeOptBool (true ),
125+ Timeout : option . SomeFloat64 (3.5 ),
126+ VshardRouter : option . SomeString ("asd" ),
127+ Balance : option . SomeBool (true ),
127128 })
128129 if err := req .Body (nil , enc ); err != nil {
129130 b .Error (err )
@@ -636,7 +637,7 @@ func TestRequestsVshardRouter(t *testing.T) {
636637 map [string ]interface {}{"vshard_router" : "custom_router" },
637638 }),
638639 target : crud .MakeInsertRequest (validSpace ).Opts (crud.InsertOpts {
639- VshardRouter : crud . MakeOptString ("custom_router" ),
640+ VshardRouter : option . SomeString ("custom_router" ),
640641 }),
641642 },
642643 {
@@ -647,7 +648,7 @@ func TestRequestsVshardRouter(t *testing.T) {
647648 map [string ]interface {}{"vshard_router" : "custom_router" },
648649 }),
649650 target : crud .MakeInsertObjectRequest (validSpace ).Opts (crud.InsertObjectOpts {
650- VshardRouter : crud . MakeOptString ("custom_router" ),
651+ VshardRouter : option . SomeString ("custom_router" ),
651652 }),
652653 },
653654 {
@@ -658,7 +659,7 @@ func TestRequestsVshardRouter(t *testing.T) {
658659 map [string ]interface {}{"vshard_router" : "custom_router" },
659660 }),
660661 target : crud .MakeInsertManyRequest (validSpace ).Opts (crud.InsertManyOpts {
661- VshardRouter : crud . MakeOptString ("custom_router" ),
662+ VshardRouter : option . SomeString ("custom_router" ),
662663 }),
663664 },
664665 {
@@ -669,7 +670,7 @@ func TestRequestsVshardRouter(t *testing.T) {
669670 map [string ]interface {}{"vshard_router" : "custom_router" },
670671 }),
671672 target : crud .MakeInsertObjectManyRequest (validSpace ).Opts (crud.InsertObjectManyOpts {
672- VshardRouter : crud . MakeOptString ("custom_router" ),
673+ VshardRouter : option . SomeString ("custom_router" ),
673674 }),
674675 },
675676 {
@@ -680,7 +681,7 @@ func TestRequestsVshardRouter(t *testing.T) {
680681 map [string ]interface {}{"vshard_router" : "custom_router" },
681682 }),
682683 target : crud .MakeGetRequest (validSpace ).Opts (crud.GetOpts {
683- VshardRouter : crud . MakeOptString ("custom_router" ),
684+ VshardRouter : option . SomeString ("custom_router" ),
684685 }),
685686 },
686687 {
@@ -692,7 +693,7 @@ func TestRequestsVshardRouter(t *testing.T) {
692693 map [string ]interface {}{"vshard_router" : "custom_router" },
693694 }),
694695 target : crud .MakeUpdateRequest (validSpace ).Opts (crud.UpdateOpts {
695- VshardRouter : crud . MakeOptString ("custom_router" ),
696+ VshardRouter : option . SomeString ("custom_router" ),
696697 }),
697698 },
698699 {
@@ -703,7 +704,7 @@ func TestRequestsVshardRouter(t *testing.T) {
703704 map [string ]interface {}{"vshard_router" : "custom_router" },
704705 }),
705706 target : crud .MakeDeleteRequest (validSpace ).Opts (crud.DeleteOpts {
706- VshardRouter : crud . MakeOptString ("custom_router" ),
707+ VshardRouter : option . SomeString ("custom_router" ),
707708 }),
708709 },
709710 {
@@ -714,7 +715,7 @@ func TestRequestsVshardRouter(t *testing.T) {
714715 map [string ]interface {}{"vshard_router" : "custom_router" },
715716 }),
716717 target : crud .MakeReplaceRequest (validSpace ).Opts (crud.ReplaceOpts {
717- VshardRouter : crud . MakeOptString ("custom_router" ),
718+ VshardRouter : option . SomeString ("custom_router" ),
718719 }),
719720 },
720721 {
@@ -725,7 +726,7 @@ func TestRequestsVshardRouter(t *testing.T) {
725726 map [string ]interface {}{"vshard_router" : "custom_router" },
726727 }),
727728 target : crud .MakeReplaceObjectRequest (validSpace ).Opts (crud.ReplaceObjectOpts {
728- VshardRouter : crud . MakeOptString ("custom_router" ),
729+ VshardRouter : option . SomeString ("custom_router" ),
729730 }),
730731 },
731732 {
@@ -736,7 +737,7 @@ func TestRequestsVshardRouter(t *testing.T) {
736737 map [string ]interface {}{"vshard_router" : "custom_router" },
737738 }),
738739 target : crud .MakeReplaceManyRequest (validSpace ).Opts (crud.ReplaceManyOpts {
739- VshardRouter : crud . MakeOptString ("custom_router" ),
740+ VshardRouter : option . SomeString ("custom_router" ),
740741 }),
741742 },
742743 {
@@ -747,7 +748,7 @@ func TestRequestsVshardRouter(t *testing.T) {
747748 map [string ]interface {}{"vshard_router" : "custom_router" },
748749 }),
749750 target : crud .MakeReplaceObjectManyRequest (validSpace ).Opts (crud.ReplaceObjectManyOpts {
750- VshardRouter : crud . MakeOptString ("custom_router" ),
751+ VshardRouter : option . SomeString ("custom_router" ),
751752 }),
752753 },
753754 {
@@ -759,7 +760,7 @@ func TestRequestsVshardRouter(t *testing.T) {
759760 map [string ]interface {}{"vshard_router" : "custom_router" },
760761 }),
761762 target : crud .MakeUpsertRequest (validSpace ).Opts (crud.UpsertOpts {
762- VshardRouter : crud . MakeOptString ("custom_router" ),
763+ VshardRouter : option . SomeString ("custom_router" ),
763764 }),
764765 },
765766 {
@@ -771,7 +772,7 @@ func TestRequestsVshardRouter(t *testing.T) {
771772 map [string ]interface {}{"vshard_router" : "custom_router" },
772773 }),
773774 target : crud .MakeUpsertObjectRequest (validSpace ).Opts (crud.UpsertObjectOpts {
774- VshardRouter : crud . MakeOptString ("custom_router" ),
775+ VshardRouter : option . SomeString ("custom_router" ),
775776 }),
776777 },
777778 {
@@ -782,7 +783,7 @@ func TestRequestsVshardRouter(t *testing.T) {
782783 map [string ]interface {}{"vshard_router" : "custom_router" },
783784 }),
784785 target : crud .MakeUpsertManyRequest (validSpace ).Opts (crud.UpsertManyOpts {
785- VshardRouter : crud . MakeOptString ("custom_router" ),
786+ VshardRouter : option . SomeString ("custom_router" ),
786787 }),
787788 },
788789 {
@@ -793,7 +794,7 @@ func TestRequestsVshardRouter(t *testing.T) {
793794 map [string ]interface {}{"vshard_router" : "custom_router" },
794795 }),
795796 target : crud .MakeUpsertObjectManyRequest (validSpace ).Opts (crud.UpsertObjectManyOpts {
796- VshardRouter : crud . MakeOptString ("custom_router" ),
797+ VshardRouter : option . SomeString ("custom_router" ),
797798 }),
798799 },
799800 {
@@ -804,7 +805,7 @@ func TestRequestsVshardRouter(t *testing.T) {
804805 map [string ]interface {}{"vshard_router" : "custom_router" },
805806 }),
806807 target : crud .MakeSelectRequest (validSpace ).Opts (crud.SelectOpts {
807- VshardRouter : crud . MakeOptString ("custom_router" ),
808+ VshardRouter : option . SomeString ("custom_router" ),
808809 }),
809810 },
810811 {
@@ -815,7 +816,7 @@ func TestRequestsVshardRouter(t *testing.T) {
815816 map [string ]interface {}{"vshard_router" : "custom_router" },
816817 }),
817818 target : crud .MakeMinRequest (validSpace ).Opts (crud.MinOpts {
818- VshardRouter : crud . MakeOptString ("custom_router" ),
819+ VshardRouter : option . SomeString ("custom_router" ),
819820 }),
820821 },
821822 {
@@ -826,7 +827,7 @@ func TestRequestsVshardRouter(t *testing.T) {
826827 map [string ]interface {}{"vshard_router" : "custom_router" },
827828 }),
828829 target : crud .MakeMaxRequest (validSpace ).Opts (crud.MaxOpts {
829- VshardRouter : crud . MakeOptString ("custom_router" ),
830+ VshardRouter : option . SomeString ("custom_router" ),
830831 }),
831832 },
832833 {
@@ -836,7 +837,7 @@ func TestRequestsVshardRouter(t *testing.T) {
836837 map [string ]interface {}{"vshard_router" : "custom_router" },
837838 }),
838839 target : crud .MakeTruncateRequest (validSpace ).Opts (crud.TruncateOpts {
839- VshardRouter : crud . MakeOptString ("custom_router" ),
840+ VshardRouter : option . SomeString ("custom_router" ),
840841 }),
841842 },
842843 {
@@ -846,7 +847,7 @@ func TestRequestsVshardRouter(t *testing.T) {
846847 map [string ]interface {}{"vshard_router" : "custom_router" },
847848 }),
848849 target : crud .MakeLenRequest (validSpace ).Opts (crud.LenOpts {
849- VshardRouter : crud . MakeOptString ("custom_router" ),
850+ VshardRouter : option . SomeString ("custom_router" ),
850851 }),
851852 },
852853 {
@@ -857,7 +858,7 @@ func TestRequestsVshardRouter(t *testing.T) {
857858 map [string ]interface {}{"vshard_router" : "custom_router" },
858859 }),
859860 target : crud .MakeCountRequest (validSpace ).Opts (crud.CountOpts {
860- VshardRouter : crud . MakeOptString ("custom_router" ),
861+ VshardRouter : option . SomeString ("custom_router" ),
861862 }),
862863 },
863864 {
@@ -866,7 +867,7 @@ func TestRequestsVshardRouter(t *testing.T) {
866867 map [string ]interface {}{"vshard_router" : "custom_router" },
867868 }),
868869 target : crud .MakeStorageInfoRequest ().Opts (crud.StorageInfoOpts {
869- VshardRouter : crud . MakeOptString ("custom_router" ),
870+ VshardRouter : option . SomeString ("custom_router" ),
870871 }),
871872 },
872873 {
@@ -876,7 +877,7 @@ func TestRequestsVshardRouter(t *testing.T) {
876877 map [string ]interface {}{"vshard_router" : "custom_router" },
877878 }),
878879 target : crud .MakeSchemaRequest ().Opts (crud.SchemaOpts {
879- VshardRouter : crud . MakeOptString ("custom_router" ),
880+ VshardRouter : option . SomeString ("custom_router" ),
880881 }),
881882 },
882883 {
@@ -886,7 +887,7 @@ func TestRequestsVshardRouter(t *testing.T) {
886887 map [string ]interface {}{"vshard_router" : "custom_router" },
887888 }),
888889 target : crud .MakeSchemaRequest ().Space (validSpace ).Opts (crud.SchemaOpts {
889- VshardRouter : crud . MakeOptString ("custom_router" ),
890+ VshardRouter : option . SomeString ("custom_router" ),
890891 }),
891892 },
892893 }
0 commit comments