diff --git a/.github/workflows/slo-report.yml b/.github/workflows/slo-report.yml new file mode 100644 index 000000000..b17e50adf --- /dev/null +++ b/.github/workflows/slo-report.yml @@ -0,0 +1,22 @@ +name: slo-report + +on: + workflow_run: + workflows: ['slo'] + types: + - completed + +jobs: + test-ydb-slo-action: + runs-on: ubuntu-latest + name: Publish YDB SLO Report + permissions: + contents: read + pull-requests: write + if: github.event.workflow_run.conclusion == 'success' + steps: + - name: Publish YDB SLO Report + uses: ydb-platform/ydb-slo-action/report@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + run_id: ${{ github.event.workflow_run.id }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d4a5a33d..e9d6aee55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ * Fixed send optional arguments to the server with `ydb.ParamsBuilder` +## v3.88.0 +* Removed UUID methods from ydb.ParamsBuilder() + ## v3.87.0 * BREAK OLD STYLE WORK WITH UUID. See https://github.com/ydb-platform/ydb-go-sdk/issues/1501 for details. At the version you must explicit choose way for work with uuid: old with bug or new (fixed). diff --git a/internal/cmd/gtrace/writer.go b/internal/cmd/gtrace/writer.go index 463f544f8..ffa748791 100644 --- a/internal/cmd/gtrace/writer.go +++ b/internal/cmd/gtrace/writer.go @@ -337,6 +337,11 @@ func (w *Writer) compose(trace *Trace) { w.code(`func (`, t, ` *`, trace.Name, `) Compose(`, x, ` *`, trace.Name, `, opts ...`+trace.Name+`ComposeOption) `) w.line(`*`, trace.Name, ` {`) w.block(func() { + w.line(`if `, t, ` == nil {`) + w.block(func() { + w.line(`return x`) + }) + w.line(`}`) w.line(`var `, ret, ` `, trace.Name, ``) if len(trace.Hooks) > 0 { w.line(`options := `, unexported(trace.Name), `ComposeOptions{}`) diff --git a/internal/params/dict.go b/internal/params/dict.go index acf253663..67c3f47fa 100644 --- a/internal/params/dict.go +++ b/internal/params/dict.go @@ -444,18 +444,18 @@ func (d *dictValue) YSON(v []byte) *dict { return d.pair.parent } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (d *dictValue) UUID(v [16]byte) *dict { +// d.pair.parent.values = append(d.pair.parent.values, value.DictValueField{ +// K: d.pair.keyValue, +// V: value.UUIDWithIssue1501Value(v), +// }) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (d *dictValue) UUID(v [16]byte) *dict { - d.pair.parent.values = append(d.pair.parent.values, value.DictValueField{ - K: d.pair.keyValue, - V: value.UUIDWithIssue1501Value(v), - }) - - return d.pair.parent -} +// return d.pair.parent +//} func (d *dictValue) Uuid(v uuid.UUID) *dict { //nolint:revive,stylecheck d.pair.parent.values = append(d.pair.parent.values, value.DictValueField{ diff --git a/internal/params/dict_test.go b/internal/params/dict_test.go index eaa096f90..05b5bc2fa 100644 --- a/internal/params/dict_test.go +++ b/internal/params/dict_test.go @@ -347,22 +347,6 @@ func TestDict(t *testing.T) { }, }, }, - { - method: "UUID", - args: []any{[...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, - - expected: expected{ - Type: &Ydb.Type{ - Type: &Ydb.Type_TypeId{TypeId: Ydb.Type_UUID}, - }, - Value: &Ydb.Value{ - Value: &Ydb.Value_Low_128{ - Low_128: 651345242494996240, - }, - High_128: 72623859790382856, - }, - }, - }, { method: "Uuid", args: []any{uuid.UUID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, diff --git a/internal/params/list.go b/internal/params/list.go index 55f42f742..dba0f37e6 100644 --- a/internal/params/list.go +++ b/internal/params/list.go @@ -167,15 +167,15 @@ func (l *listItem) YSON(v []byte) *list { return l.parent } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (l *listItem) UUID(v [16]byte) *list { +// l.parent.values = append(l.parent.values, value.UUIDWithIssue1501Value(v)) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (l *listItem) UUID(v [16]byte) *list { - l.parent.values = append(l.parent.values, value.UUIDWithIssue1501Value(v)) - - return l.parent -} +// return l.parent +//} func (l *listItem) Uuid(v uuid.UUID) *list { //nolint:revive,stylecheck l.parent.values = append(l.parent.values, value.Uuid(v)) diff --git a/internal/params/list_test.go b/internal/params/list_test.go index e6a771c79..336eb7a53 100644 --- a/internal/params/list_test.go +++ b/internal/params/list_test.go @@ -346,22 +346,6 @@ func TestList(t *testing.T) { }, }, }, - { - method: "UUID", - args: []any{[...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, - - expected: expected{ - Type: &Ydb.Type{ - Type: &Ydb.Type_TypeId{TypeId: Ydb.Type_UUID}, - }, - Value: &Ydb.Value{ - Value: &Ydb.Value_Low_128{ - Low_128: 651345242494996240, - }, - High_128: 72623859790382856, - }, - }, - }, { method: "Uuid", args: []any{uuid.UUID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, diff --git a/internal/params/optional.go b/internal/params/optional.go index 9e392cdd5..e5701aca9 100644 --- a/internal/params/optional.go +++ b/internal/params/optional.go @@ -155,15 +155,15 @@ func (p *optional) YSON(v *[]byte) *optionalBuilder { return &optionalBuilder{opt: p} } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (p *optional) UUID(v *[16]byte) *optionalBuilder { +// p.value = value.NullableUUIDValue(v) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (p *optional) UUID(v *[16]byte) *optionalBuilder { - p.value = value.NullableUUIDValue(v) - - return &optionalBuilder{opt: p} -} +// return &optionalBuilder{opt: p} +//} func (p *optional) Uuid(v *uuid.UUID) *optionalBuilder { //nolint:revive,stylecheck p.value = value.NullableUuidValue(v) diff --git a/internal/params/optional_test.go b/internal/params/optional_test.go index c677d27e3..e65d4eb48 100644 --- a/internal/params/optional_test.go +++ b/internal/params/optional_test.go @@ -346,22 +346,6 @@ func TestOptional(t *testing.T) { }, }, }, - { - method: "UUID", - args: []any{p([...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16})}, - - expected: expected{ - Type: &Ydb.Type{ - Type: &Ydb.Type_TypeId{TypeId: Ydb.Type_UUID}, - }, - Value: &Ydb.Value{ - Value: &Ydb.Value_Low_128{ - Low_128: 651345242494996240, - }, - High_128: 72623859790382856, - }, - }, - }, { method: "Uuid", args: []any{p(uuid.UUID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16})}, diff --git a/internal/params/parameters.go b/internal/params/parameters.go index 58b0fc45c..c0cdbfa62 100644 --- a/internal/params/parameters.go +++ b/internal/params/parameters.go @@ -297,10 +297,10 @@ func (p *Parameter) YSON(v []byte) Builder { return p.parent } -// removed for https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -//func (p *Parameter) UUID(v [16]byte) Builder { -// return p.UUIDWithIssue1501Value(v) -//} +//// removed for https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +////func (p *Parameter) UUID(v [16]byte) Builder { +//// return p.UUIDWithIssue1501Value(v) +////} // UUIDWithIssue1501Value is field serializer for save data with format bug. // For any new code use Uuid diff --git a/internal/params/set.go b/internal/params/set.go index 7759f7118..58374b7a2 100644 --- a/internal/params/set.go +++ b/internal/params/set.go @@ -168,15 +168,15 @@ func (s *setItem) YSON(v []byte) *set { return s.parent } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (s *setItem) UUID(v [16]byte) *set { +// s.parent.values = append(s.parent.values, value.UUIDWithIssue1501Value(v)) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (s *setItem) UUID(v [16]byte) *set { - s.parent.values = append(s.parent.values, value.UUIDWithIssue1501Value(v)) - - return s.parent -} +// return s.parent +//} func (s *setItem) Uuid(v uuid.UUID) *set { //nolint:revive,stylecheck s.parent.values = append(s.parent.values, value.Uuid(v)) diff --git a/internal/params/set_test.go b/internal/params/set_test.go index ceaf1a584..fe35b57e4 100644 --- a/internal/params/set_test.go +++ b/internal/params/set_test.go @@ -346,22 +346,6 @@ func TestSet(t *testing.T) { }, }, }, - { - method: "UUID", - args: []any{[...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, - - expected: expected{ - Type: &Ydb.Type{ - Type: &Ydb.Type_TypeId{TypeId: Ydb.Type_UUID}, - }, - Value: &Ydb.Value{ - Value: &Ydb.Value_Low_128{ - Low_128: 651345242494996240, - }, - High_128: 72623859790382856, - }, - }, - }, { method: "Uuid", args: []any{uuid.UUID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, diff --git a/internal/params/struct.go b/internal/params/struct.go index bf70c5eda..8e192cfb9 100644 --- a/internal/params/struct.go +++ b/internal/params/struct.go @@ -233,18 +233,18 @@ func (s *structValue) YSON(v []byte) *structure { return s.parent } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (s *structValue) UUID(v [16]byte) *structure { +// s.parent.values = append(s.parent.values, value.StructValueField{ +// Name: s.name, +// V: value.UUIDWithIssue1501Value(v), +// }) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (s *structValue) UUID(v [16]byte) *structure { - s.parent.values = append(s.parent.values, value.StructValueField{ - Name: s.name, - V: value.UUIDWithIssue1501Value(v), - }) - - return s.parent -} +// return s.parent +//} func (s *structValue) Uuid(v uuid.UUID) *structure { //nolint:revive,stylecheck s.parent.values = append(s.parent.values, value.StructValueField{ diff --git a/internal/params/struct_test.go b/internal/params/struct_test.go index 10098ab64..b07478d48 100644 --- a/internal/params/struct_test.go +++ b/internal/params/struct_test.go @@ -715,41 +715,6 @@ func TestStruct(t *testing.T) { }, }, }, - { - name: xtest.CurrentFileLine(), - builder: Builder{}.Param("$x").BeginStruct().Field("col1"). - UUID([...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}).EndStruct(), - params: map[string]*Ydb.TypedValue{ - "$x": { - Type: &Ydb.Type{ - Type: &Ydb.Type_StructType{ - StructType: &Ydb.StructType{ - Members: []*Ydb.StructMember{ - { - Name: "col1", - Type: &Ydb.Type{ - Type: &Ydb.Type_TypeId{ - TypeId: Ydb.Type_UUID, - }, - }, - }, - }, - }, - }, - }, - Value: &Ydb.Value{ - Items: []*Ydb.Value{ - { - Value: &Ydb.Value_Low_128{ - Low_128: 651345242494996240, - }, - High_128: 72623859790382856, - }, - }, - }, - }, - }, - }, { name: xtest.CurrentFileLine(), builder: Builder{}.Param("$x").BeginStruct().Field("col1"). diff --git a/internal/params/tuple.go b/internal/params/tuple.go index cc6d75ebd..c4354bcaa 100644 --- a/internal/params/tuple.go +++ b/internal/params/tuple.go @@ -167,15 +167,15 @@ func (t *tupleItem) YSON(v []byte) *tuple { return t.parent } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (t *tupleItem) UUID(v [16]byte) *tuple { +// t.parent.values = append(t.parent.values, value.UUIDWithIssue1501Value(v)) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (t *tupleItem) UUID(v [16]byte) *tuple { - t.parent.values = append(t.parent.values, value.UUIDWithIssue1501Value(v)) - - return t.parent -} +// return t.parent +//} func (t *tupleItem) Uuid(v uuid.UUID) *tuple { //nolint:revive,stylecheck t.parent.values = append(t.parent.values, value.Uuid(v)) diff --git a/internal/params/tuple_test.go b/internal/params/tuple_test.go index 72811eaa4..18e5a2772 100644 --- a/internal/params/tuple_test.go +++ b/internal/params/tuple_test.go @@ -346,22 +346,6 @@ func TestTuple(t *testing.T) { }, }, }, - { - method: "UUID", - args: []any{[...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, - - expected: expected{ - Type: &Ydb.Type{ - Type: &Ydb.Type_TypeId{TypeId: Ydb.Type_UUID}, - }, - Value: &Ydb.Value{ - Value: &Ydb.Value_Low_128{ - Low_128: 651345242494996240, - }, - High_128: 72623859790382856, - }, - }, - }, { method: "Uuid", args: []any{uuid.UUID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, diff --git a/internal/params/variant_struct.go b/internal/params/variant_struct.go index 5ac30e758..8aeff5210 100644 --- a/internal/params/variant_struct.go +++ b/internal/params/variant_struct.go @@ -234,18 +234,18 @@ func (vsf *variantStructField) YSON() *variantStruct { return vsf.parent } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (vsf *variantStructField) UUID() *variantStruct { +// vsf.parent.fields = append(vsf.parent.fields, types.StructField{ +// Name: vsf.name, +// T: types.UUID, +// }) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (vsf *variantStructField) UUID() *variantStruct { - vsf.parent.fields = append(vsf.parent.fields, types.StructField{ - Name: vsf.name, - T: types.UUID, - }) - - return vsf.parent -} +// return vsf.parent +//} func (vsf *variantStructField) Uuid() *variantStruct { //nolint:revive,stylecheck vsf.parent.fields = append(vsf.parent.fields, types.StructField{ @@ -468,17 +468,17 @@ func (vsi *variantStructItem) YSON(v []byte) *variantStructBuilder { } } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (vsi *variantStructItem) UUID(v [16]byte) *variantStructBuilder { +// vsi.parent.value = value.UUIDWithIssue1501Value(v) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (vsi *variantStructItem) UUID(v [16]byte) *variantStructBuilder { - vsi.parent.value = value.UUIDWithIssue1501Value(v) - - return &variantStructBuilder{ - parent: vsi.parent, - } -} +// return &variantStructBuilder{ +// parent: vsi.parent, +// } +//} func (vsi *variantStructItem) Uuid(v uuid.UUID) *variantStructBuilder { //nolint:revive,stylecheck vsi.parent.value = value.Uuid(v) diff --git a/internal/params/variant_struct_test.go b/internal/params/variant_struct_test.go index 36a46c951..c461362a0 100644 --- a/internal/params/variant_struct_test.go +++ b/internal/params/variant_struct_test.go @@ -370,23 +370,6 @@ func TestVariantStruct(t *testing.T) { }, }, }, - { - method: "UUID", - itemArgs: []any{[...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, - - expected: expected{ - Type: &Ydb.Type{ - Type: &Ydb.Type_TypeId{TypeId: Ydb.Type_UUID}, - }, - Value: &Ydb.Value{ - Value: &Ydb.Value_Low_128{ - Low_128: 651345242494996240, - }, - High_128: 72623859790382856, - VariantIndex: 0, - }, - }, - }, { method: "Uuid", itemArgs: []any{uuid.UUID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, diff --git a/internal/params/variant_tuple.go b/internal/params/variant_tuple.go index 9fb87dcdd..faa9689cb 100644 --- a/internal/params/variant_tuple.go +++ b/internal/params/variant_tuple.go @@ -169,15 +169,15 @@ func (vtt *variantTupleTypes) YSON() *variantTupleTypes { return vtt } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (vtt *variantTupleTypes) UUID() *variantTupleTypes { +// vtt.tuple.types = append(vtt.tuple.types, types.UUID) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (vtt *variantTupleTypes) UUID() *variantTupleTypes { - vtt.tuple.types = append(vtt.tuple.types, types.UUID) - - return vtt -} +// return vtt +//} func (vtt *variantTupleTypes) Uuid() *variantTupleTypes { //nolint:revive,stylecheck vtt.tuple.types = append(vtt.tuple.types, types.UUID) @@ -385,17 +385,17 @@ func (vti *variantTupleItem) YSON(v []byte) *variantTupleBuilder { } } -// UUID has data corruption bug and will be removed in next version. +//// UUID has data corruption bug and will be removed in next version. +//// +//// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. +//// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 +//func (vti *variantTupleItem) UUID(v [16]byte) *variantTupleBuilder { +// vti.tuple.value = value.UUIDWithIssue1501Value(v) // -// Deprecated: Use Uuid (prefer) or UUIDWithIssue1501Value (for save old behavior) instead. -// https://github.com/ydb-platform/ydb-go-sdk/issues/1501 -func (vti *variantTupleItem) UUID(v [16]byte) *variantTupleBuilder { - vti.tuple.value = value.UUIDWithIssue1501Value(v) - - return &variantTupleBuilder{ - tuple: vti.tuple, - } -} +// return &variantTupleBuilder{ +// tuple: vti.tuple, +// } +//} func (vti *variantTupleItem) Uuid(v uuid.UUID) *variantTupleBuilder { //nolint:revive,stylecheck vti.tuple.value = value.Uuid(v) diff --git a/internal/params/variant_tuple_test.go b/internal/params/variant_tuple_test.go index 3f5676619..c8f894fa8 100644 --- a/internal/params/variant_tuple_test.go +++ b/internal/params/variant_tuple_test.go @@ -369,23 +369,6 @@ func TestVariantTuple(t *testing.T) { }, }, }, - { - method: "UUID", - itemArgs: []any{[...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, - - expected: expected{ - Type: &Ydb.Type{ - Type: &Ydb.Type_TypeId{TypeId: Ydb.Type_UUID}, - }, - Value: &Ydb.Value{ - Value: &Ydb.Value_Low_128{ - Low_128: 651345242494996240, - }, - High_128: 72623859790382856, - VariantIndex: 0, - }, - }, - }, { method: "Uuid", itemArgs: []any{[...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}}, diff --git a/internal/version/version.go b/internal/version/version.go index 0608cc9a0..030b23c4d 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -2,7 +2,7 @@ package version const ( Major = "3" - Minor = "87" + Minor = "88" Patch = "0" Package = "ydb-go-sdk" diff --git a/trace/coordination_gtrace.go b/trace/coordination_gtrace.go index 422f61153..96c025c82 100644 --- a/trace/coordination_gtrace.go +++ b/trace/coordination_gtrace.go @@ -29,6 +29,9 @@ func WithCoordinationPanicCallback(cb func(e interface{})) CoordinationComposeOp // Compose returns a new Coordination which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Coordination) Compose(x *Coordination, opts ...CoordinationComposeOption) *Coordination { + if t == nil { + return x + } var ret Coordination options := coordinationComposeOptions{} for _, opt := range opts { diff --git a/trace/discovery_gtrace.go b/trace/discovery_gtrace.go index 20d40ebda..0d5aca55f 100644 --- a/trace/discovery_gtrace.go +++ b/trace/discovery_gtrace.go @@ -26,6 +26,9 @@ func WithDiscoveryPanicCallback(cb func(e interface{})) DiscoveryComposeOption { // Compose returns a new Discovery which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Discovery) Compose(x *Discovery, opts ...DiscoveryComposeOption) *Discovery { + if t == nil { + return x + } var ret Discovery options := discoveryComposeOptions{} for _, opt := range opts { diff --git a/trace/driver_gtrace.go b/trace/driver_gtrace.go index 4abf7ef74..fa217f4a5 100644 --- a/trace/driver_gtrace.go +++ b/trace/driver_gtrace.go @@ -26,6 +26,9 @@ func WithDriverPanicCallback(cb func(e interface{})) DriverComposeOption { // Compose returns a new Driver which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Driver) Compose(x *Driver, opts ...DriverComposeOption) *Driver { + if t == nil { + return x + } var ret Driver options := driverComposeOptions{} for _, opt := range opts { diff --git a/trace/query_gtrace.go b/trace/query_gtrace.go index 890c81f2b..e7e93a3e6 100644 --- a/trace/query_gtrace.go +++ b/trace/query_gtrace.go @@ -28,6 +28,9 @@ func WithQueryPanicCallback(cb func(e interface{})) QueryComposeOption { // Compose returns a new Query which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Query) Compose(x *Query, opts ...QueryComposeOption) *Query { + if t == nil { + return x + } var ret Query options := queryComposeOptions{} for _, opt := range opts { diff --git a/trace/ratelimiter_gtrace.go b/trace/ratelimiter_gtrace.go index 607e8a33d..6f97a8343 100644 --- a/trace/ratelimiter_gtrace.go +++ b/trace/ratelimiter_gtrace.go @@ -22,6 +22,9 @@ func WithRatelimiterPanicCallback(cb func(e interface{})) RatelimiterComposeOpti // Compose returns a new Ratelimiter which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Ratelimiter) Compose(x *Ratelimiter, opts ...RatelimiterComposeOption) *Ratelimiter { + if t == nil { + return x + } var ret Ratelimiter return &ret } diff --git a/trace/retry_gtrace.go b/trace/retry_gtrace.go index a8a6ba50e..784ef4275 100644 --- a/trace/retry_gtrace.go +++ b/trace/retry_gtrace.go @@ -26,6 +26,9 @@ func WithRetryPanicCallback(cb func(e interface{})) RetryComposeOption { // Compose returns a new Retry which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Retry) Compose(x *Retry, opts ...RetryComposeOption) *Retry { + if t == nil { + return x + } var ret Retry options := retryComposeOptions{} for _, opt := range opts { diff --git a/trace/scheme_gtrace.go b/trace/scheme_gtrace.go index e960696ca..dab48b9be 100644 --- a/trace/scheme_gtrace.go +++ b/trace/scheme_gtrace.go @@ -26,6 +26,9 @@ func WithSchemePanicCallback(cb func(e interface{})) SchemeComposeOption { // Compose returns a new Scheme which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Scheme) Compose(x *Scheme, opts ...SchemeComposeOption) *Scheme { + if t == nil { + return x + } var ret Scheme options := schemeComposeOptions{} for _, opt := range opts { diff --git a/trace/scripting_gtrace.go b/trace/scripting_gtrace.go index c3de7b27f..83abc5f53 100644 --- a/trace/scripting_gtrace.go +++ b/trace/scripting_gtrace.go @@ -26,6 +26,9 @@ func WithScriptingPanicCallback(cb func(e interface{})) ScriptingComposeOption { // Compose returns a new Scripting which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Scripting) Compose(x *Scripting, opts ...ScriptingComposeOption) *Scripting { + if t == nil { + return x + } var ret Scripting options := scriptingComposeOptions{} for _, opt := range opts { diff --git a/trace/sql_gtrace.go b/trace/sql_gtrace.go index f90054629..618984641 100644 --- a/trace/sql_gtrace.go +++ b/trace/sql_gtrace.go @@ -27,6 +27,9 @@ func WithDatabaseSQLPanicCallback(cb func(e interface{})) DatabaseSQLComposeOpti // Compose returns a new DatabaseSQL which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *DatabaseSQL) Compose(x *DatabaseSQL, opts ...DatabaseSQLComposeOption) *DatabaseSQL { + if t == nil { + return x + } var ret DatabaseSQL options := databaseSQLComposeOptions{} for _, opt := range opts { diff --git a/trace/table_gtrace.go b/trace/table_gtrace.go index ef197a33b..cf63d54dd 100644 --- a/trace/table_gtrace.go +++ b/trace/table_gtrace.go @@ -26,6 +26,9 @@ func WithTablePanicCallback(cb func(e interface{})) TableComposeOption { // Compose returns a new Table which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Table) Compose(x *Table, opts ...TableComposeOption) *Table { + if t == nil { + return x + } var ret Table options := tableComposeOptions{} for _, opt := range opts { diff --git a/trace/topic_gtrace.go b/trace/topic_gtrace.go index 1f4709892..34d5560c9 100644 --- a/trace/topic_gtrace.go +++ b/trace/topic_gtrace.go @@ -26,6 +26,9 @@ func WithTopicPanicCallback(cb func(e interface{})) TopicComposeOption { // Compose returns a new Topic which has functional fields composed both from t and x. // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals func (t *Topic) Compose(x *Topic, opts ...TopicComposeOption) *Topic { + if t == nil { + return x + } var ret Topic options := topicComposeOptions{} for _, opt := range opts {