gf icon indicating copy to clipboard operation
gf copied to clipboard

feat(database/gdb): add `time` field type for value converting for/from field

Open CyJaySong opened this issue 1 year ago • 13 comments

Convert Time based on fieldType

CyJaySong avatar Jul 26 '24 06:07 CyJaySong

@gqcn 移除gtimedriver.Valuer 接口实现,使用ConvertValueForField中的类型匹配规则进行序列化

CyJaySong avatar Jul 30 '24 01:07 CyJaySong

@gqcn 移除的 接口实现,使用中的类型匹配规则进行序列化gtime``driver.Valuer``ConvertValueForField

我觉得没啥必要加这个接口,用Scan和Value和标准库一样,就可以

wln32 avatar Aug 02 '24 02:08 wln32

@gqcn 移除的 接口实现,使用中的类型匹配规则进行序列化 gtimedriver.ValuerConvertValueForField

我觉得没啥必要加这个接口,用Scan和Value和标准库一样,就可以

没加接口了啊,新加的接口移除掉了

CyJaySong avatar Aug 02 '24 02:08 CyJaySong

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@gqcn removed the interface implementation, use the type matching rules in serialization gtime driver.ValuerConvertValueForField

I don’t think there is any need to add this interface. Just use Scan and Value the same as the standard library.

No interfaces are added. The newly added interfaces have been removed.

Issues-translate-bot avatar Aug 02 '24 02:08 Issues-translate-bot

我觉得不应该移除 gtime.Timedriver.Valuer 接口实现, 如果项目使用的是其他 orm,如 gorm,而字段类型又是 gtime.Time,可能会导致无法序列化为数据库中对应的类型。

wufeng5702 avatar Aug 03 '24 13:08 wufeng5702

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I think the driver.Valuer interface implementation of gtime.Time should not be removed, If the project uses other ORM, such as gorm, and the field type is gtime.Time, it may not be serialized to the corresponding type in the database.

Issues-translate-bot avatar Aug 03 '24 13:08 Issues-translate-bot

@gqcn 这个ci失败看着不像我这边的问题,我没改gview

CyJaySong avatar Aug 15 '24 05:08 CyJaySong

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@gqcn This CI failure doesn’t look like a problem on my side. I didn’t change gview.

Issues-translate-bot avatar Aug 15 '24 05:08 Issues-translate-bot

@gqcn 这个ci失败看着不像我这边的问题,我没改gview

可能是github服务故障导致的:

https://www.githubstatus.com/incidents/kz4khcgdsfdv

试试重新运行一下 action

wufeng5702 avatar Aug 15 '24 06:08 wufeng5702

@niluan304 怎么重新Action

CyJaySong avatar Aug 15 '24 09:08 CyJaySong

@gqcn 不看看了吗

CyJaySong avatar Aug 27 '24 00:08 CyJaySong

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@gqcn Don’t you want to take a look?

Issues-translate-bot avatar Aug 27 '24 00:08 Issues-translate-bot