We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在 scan 时 将 JobDetail 传入时,解析不出来,传入 JobDetail.Job 时可以解析
The text was updated successfully, but these errors were encountered:
因为
type JobDetail struct { Job } //等价于 type JobDetail struct { Job Job }
目前没有对这种方式做直接处理。解决办法是:自己手动给Job实现ByteUnmarshaler
type ByteUnmarshaler interface { UnmarshalByte(data []byte) error }
ByteUnmarshaler参考
type human struct { Age int `ddb:"ag"` Extra *extraInfo `ddb:"ext"` } type extraInfo struct { Hobbies []string `json:"hobbies"` LuckyNumber int `json:"ln"` } func (ext *extraInfo) UnmarshalByte(data []byte) error { return json.Unmarshal(data, ext) } //if the type of ext column in a table is varchar(stored legal json string) or json(mysql5.7) var student human err := scanner.Scan(rows, &student) // ...
或者,你先把数据ScanMap,然后再进行处理
Sorry, something went wrong.
No branches or pull requests
在 scan 时 将 JobDetail 传入时,解析不出来,传入 JobDetail.Job 时可以解析
The text was updated successfully, but these errors were encountered: