-
Notifications
You must be signed in to change notification settings - Fork 30
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
More refactor around extended time #978
Conversation
@@ -10,16 +10,20 @@ import ( | |||
|
|||
type Date struct{} | |||
|
|||
func (Date) ToKindDetails() typing.KindDetails { | |||
return typing.NewExtendedTimeDetails(typing.ETime, ext.DateKindType, "") | |||
func (Date) layout() string { |
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.
Specifying a layout
@@ -284,14 +284,14 @@ func TestField_ParseValue(t *testing.T) { | |||
field := Field{Type: Int64, DebeziumType: MicroTime} | |||
value, err := field.ParseValue(int64(54720000000)) | |||
assert.NoError(t, err) | |||
assert.Equal(t, "15:12:00.000000", value.(*ext.ExtendedTime).String("")) | |||
assert.Equal(t, "15:12:00.000000", value.(*ext.ExtendedTime).GetTime().Format("15:04:05.000000")) |
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.
Could we use MicroTime{}.layout()
here instead of hardcoding the layout?
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.
I think we'll run into a cyclical dependency import since it's not in the same package :(
ExtendedTime.String()
to go throughGetTime()