-
Notifications
You must be signed in to change notification settings - Fork 60
crud: refactor optional types to use go-option #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
crud: refactor optional types to use go-option #498
Conversation
|
Later, I'll add the Tuple and Any type to the go-option library and make the code even more typesafe. |
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
499ecc6 to
21bd65d
Compare
|
The required changes have been added. |
|
The commit message should be something like: -> |
| 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). | ||
|
|
There was a problem hiding this comment.
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:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| values[0], exists[0] = opts.Timeout.Get() // Method Get() from go-options is same. | |
| values[0], exists[0] = opts.Timeout.Get() |
crud/compile_test.go
Outdated
| // TestSomeAny checks the operation of SomeAny. | ||
| func TestSomeAny(t *testing.T) { |
There was a problem hiding this comment.
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.
crud/compile_test.go
Outdated
| // TestOptionTypesCompilation verifies that all option types are compiled correctly. | ||
| func TestOptionTypesCompilation(t *testing.T) { |
There was a problem hiding this comment.
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.
e6f4b4e to
f2c9c14
Compare
- 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
f2c9c14 to
6ac2dcf
Compare
Changed #492