Describe the feature
I have a Go struct with a field that I'd like to be serialized into multiple database columns for efficiency purposes. For example
type Book struct {
// Format: libraries/123/books/456
Name string
}
And a database schema like:
CREATE TABLE Books (
LibraryId INTEGER -- e.g. 123
BookId INTEGER -- e.g. 456
);
My understanding is that the current Serializer/Scanner interface only supports a 1:1 mapping between fields and database columns.
Motivation
The format of the struct field is determined by API design style. But I'd like to store the struct field in a more compact, efficient representation in the database. The alternative is to create two structs, one for the API and one for the database, but that's a bit cumbersome and annoying to maintain.
Related Issues
Comment From: github-actions[bot]
This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days