Skip to content

Conversation

@babyTsakhes
Copy link
Collaborator

  • Remove: OptUint, OptInt, OptFloat64, OptString, OptBool, OptTuple.
  • Remove: MakeOptUint, MakeOptInt, MakeOptFloat64, MakeOptString, MakeOptBool, MakeOptTuple.
  • Add: OptAny = option.Generic[interface{}] .
  • Add: MakeOptAny constructor.
  • Update: All option structs to use option.* types.
  • Fix: Test type inconsistencies.

Changed #492

@babyTsakhes
Copy link
Collaborator Author

Later, I'll add the Tuple and Any type to the go-option library and make the code even more typesafe.

@babyTsakhes babyTsakhes marked this pull request as ready for review November 25, 2025 16:26
The welcome flags for the IPROTO_FEATURE_IS_SYNC functions have been added and
IPROTO_FEATURE_INSERT_ARROW for IPROTO_FEATURE_INSERT_ARROW protocol functions.
Changed it CHANGELOG.md in the previous version, it was in the wrong version.

Changed #466
@babyTsakhes babyTsakhes force-pushed the babyTsakhes/gh-492-replace-usage-of-optional-types-in-crud-with-go-option branch 2 times, most recently from 499ecc6 to 21bd65d Compare December 1, 2025 18:36
@babyTsakhes
Copy link
Collaborator Author

The required changes have been added.

@oleg-jukovec
Copy link
Collaborator

The commit message should be something like:

iproto: add missing IPROTO feature flags to greeting negotiation

The welcome flags for the IPROTO_FEATURE_IS_SYNC functions have been added and
IPROTO_FEATURE_INSERT_ARROW for IPROTO_FEATURE_INSERT_ARROW protocol functions.
Changed it CHANGELOG.md in the previous version, it was in the wrong version.

Changed #466

->

doc: move entry about IPROTO to the right place

Follows #466

added `IsSync(bool)` method for `BeginRequest`/`CommitRequest` (#447).
- Added missing IPROTO feature flags to greeting negotiation
(iproto.IPROTO_FEATURE_IS_SYNC, iproto.IPROTO_FEATURE_INSERT_ARROW) (#466).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove the extra line:

Suggested change

crud/get.go Outdated
VshardRouter option.String
// Fields is field names for getting only a subset of fields.
Fields OptTuple
Fields option.Any // Type Any is instead of a local type Tuple.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Fields option.Any // Type Any is instead of a local type Tuple.
Fields option.Any

crud/options.go Outdated
values := [optsCnt]interface{}{}
exists := [optsCnt]bool{}
values[0], exists[0] = opts.Timeout.Get()
values[0], exists[0] = opts.Timeout.Get() // Method Get() from go-options is same.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
values[0], exists[0] = opts.Timeout.Get() // Method Get() from go-options is same.
values[0], exists[0] = opts.Timeout.Get()

Comment on lines 55 to 56
// TestSomeAny checks the operation of SomeAny.
func TestSomeAny(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we don't need this test. Please delete it if so.

Comment on lines 11 to 12
// TestOptionTypesCompilation verifies that all option types are compiled correctly.
func TestOptionTypesCompilation(t *testing.T) {
Copy link
Collaborator

@oleg-jukovec oleg-jukovec Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. I don't understand why we need this test. Please, remove it if we don't need it.

@babyTsakhes babyTsakhes force-pushed the babyTsakhes/gh-492-replace-usage-of-optional-types-in-crud-with-go-option branch 2 times, most recently from e6f4b4e to f2c9c14 Compare December 1, 2025 22:28
- Remove: OptUint, OptInt, OptFloat64, OptString, OptBool, OptTuple.
- Remove: MakeOptUint, MakeOptInt, MakeOptFloat64, MakeOptString, MakeOptBool, MakeOptTuple.
- Update: All option structs to use option.* types.
- Add type Any from go-option.
- Fix: Test type inconsistencies.

Closes #492
@babyTsakhes babyTsakhes force-pushed the babyTsakhes/gh-492-replace-usage-of-optional-types-in-crud-with-go-option branch from f2c9c14 to 6ac2dcf Compare December 1, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants